8231594: Configure fails on some Linux systems
authorerikj
Tue, 01 Oct 2019 08:11:02 -0700
changeset 58431 c8b0dcab20d7
parent 58430 814156987833
child 58432 76ed605b95a4
child 58433 a7c95e2f8814
8231594: Configure fails on some Linux systems Reviewed-by: tbell, ihse
make/autoconf/basics.m4
--- a/make/autoconf/basics.m4	Tue Oct 01 07:37:39 2019 -0700
+++ b/make/autoconf/basics.m4	Tue Oct 01 08:11:02 2019 -0700
@@ -213,8 +213,10 @@
   if test "x[$]$1" != x; then
     new_path="[$]$1"
 
-    if [ [[ "$new_path" = ~* ]] ]; then
-      # Use eval to expand a potential ~
+    # Use eval to expand a potential ~. This technique does not work if there
+    # are spaces in the path (which is valid at this point on Windows), so only
+    # try to apply it if there is an actual ~ first in the path.
+    if [ [[ "$new_path" = "~"* ]] ]; then
       eval new_path="$new_path"
       if test ! -f "$new_path" && test ! -d "$new_path"; then
         AC_MSG_ERROR([The new_path of $1, which resolves as "$new_path", is not found.])