common/autoconf/basics.m4

changeset 718
e7c09a983c3c
parent 717
e247ee3924d5
child 725
03e60e87d92a
equal deleted inserted replaced
717:e247ee3924d5 718:e7c09a983c3c
58 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 58 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59 BASIC_FIXUP_PATH_MSYS($1) 59 BASIC_FIXUP_PATH_MSYS($1)
60 else 60 else
61 # We're on a posix platform. Hooray! :) 61 # We're on a posix platform. Hooray! :)
62 path="[$]$1" 62 path="[$]$1"
63
64 if test ! -f "$path" && test ! -d "$path"; then
65 AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
66 fi
67
68 has_space=`$ECHO "$path" | $GREP " "` 63 has_space=`$ECHO "$path" | $GREP " "`
69 if test "x$has_space" != x; then 64 if test "x$has_space" != x; then
70 AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.]) 65 AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
71 AC_MSG_ERROR([Spaces are not allowed in this path.]) 66 AC_MSG_ERROR([Spaces are not allowed in this path.])
72 fi 67 fi
68
69 # Use eval to expand a potential ~
70 eval path="$path"
71 if test ! -f "$path" && test ! -d "$path"; then
72 AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
73 fi
74
75 $1="`cd "$path"; $THEPWDCMD`"
73 fi 76 fi
74 ]) 77 ])
75 78
76 # This will make sure the given variable points to a executable 79 # This will make sure the given variable points to a executable
77 # with a full and proper path. This means: 80 # with a full and proper path. This means:

mercurial