make/autoconf/basics.m4
changeset 58431 c8b0dcab20d7
parent 58270 2921ee5e9881
child 58549 9d9317fad3fe
equal deleted inserted replaced
58430:814156987833 58431:c8b0dcab20d7
   211 AC_DEFUN([BASIC_ABSOLUTE_PATH],
   211 AC_DEFUN([BASIC_ABSOLUTE_PATH],
   212 [
   212 [
   213   if test "x[$]$1" != x; then
   213   if test "x[$]$1" != x; then
   214     new_path="[$]$1"
   214     new_path="[$]$1"
   215 
   215 
   216     if [ [[ "$new_path" = ~* ]] ]; then
   216     # Use eval to expand a potential ~. This technique does not work if there
   217       # Use eval to expand a potential ~
   217     # are spaces in the path (which is valid at this point on Windows), so only
       
   218     # try to apply it if there is an actual ~ first in the path.
       
   219     if [ [[ "$new_path" = "~"* ]] ]; then
   218       eval new_path="$new_path"
   220       eval new_path="$new_path"
   219       if test ! -f "$new_path" && test ! -d "$new_path"; then
   221       if test ! -f "$new_path" && test ! -d "$new_path"; then
   220         AC_MSG_ERROR([The new_path of $1, which resolves as "$new_path", is not found.])
   222         AC_MSG_ERROR([The new_path of $1, which resolves as "$new_path", is not found.])
   221       fi
   223       fi
   222     fi
   224     fi