common/autoconf/basics.m4

Print this page




 109     # space.
 110     complete="[$]$1"
 111     path="${complete%% *}"
 112     tmp="$complete EOL"
 113     arguments="${tmp#* }"
 114 
 115     # Cannot rely on the command "which" here since it doesn't always work.
 116     is_absolute_path=`$ECHO "$path" | $GREP ^/`
 117     if test -z "$is_absolute_path"; then
 118       # Path to executable is not absolute. Find it.
 119       IFS_save="$IFS"
 120       IFS=:
 121       for p in $PATH; do
 122         if test -f "$p/$path" && test -x "$p/$path"; then
 123           new_path="$p/$path"
 124           break
 125         fi
 126       done
 127       IFS="$IFS_save"
 128     else
 129       AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
 130       new_path="$path"
 131     fi
 132 
 133     if test "x$new_path" = x; then
 134       AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
 135       has_space=`$ECHO "$complete" | $GREP " "`
 136       if test "x$has_space" != x; then
 137         AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
 138       fi
 139       AC_MSG_ERROR([Cannot locate the the path of $1])
 140     fi
 141   fi
 142 
 143   # Now join together the path and the arguments once again
 144   if test "x$arguments" != xEOL; then
 145     new_complete="$new_path ${arguments% *}"
 146   else
 147     new_complete="$new_path"
 148   fi
 149 




 109     # space.
 110     complete="[$]$1"
 111     path="${complete%% *}"
 112     tmp="$complete EOL"
 113     arguments="${tmp#* }"
 114 
 115     # Cannot rely on the command "which" here since it doesn't always work.
 116     is_absolute_path=`$ECHO "$path" | $GREP ^/`
 117     if test -z "$is_absolute_path"; then
 118       # Path to executable is not absolute. Find it.
 119       IFS_save="$IFS"
 120       IFS=:
 121       for p in $PATH; do
 122         if test -f "$p/$path" && test -x "$p/$path"; then
 123           new_path="$p/$path"
 124           break
 125         fi
 126       done
 127       IFS="$IFS_save"
 128     else

 129       new_path="$path"
 130     fi
 131 
 132     if test "x$new_path" = x; then
 133       AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
 134       has_space=`$ECHO "$complete" | $GREP " "`
 135       if test "x$has_space" != x; then
 136         AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
 137       fi
 138       AC_MSG_ERROR([Cannot locate the the path of $1])
 139     fi
 140   fi
 141 
 142   # Now join together the path and the arguments once again
 143   if test "x$arguments" != xEOL; then
 144     new_complete="$new_path ${arguments% *}"
 145   else
 146     new_complete="$new_path"
 147   fi
 148