]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_CHECK_TOOL): As AC_CHECK_PROG first tests the
authorAkim Demaille <akim@epita.fr>
Tue, 17 Oct 2000 16:34:10 +0000 (16:34 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 17 Oct 2000 16:34:10 +0000 (16:34 +0000)
value of the VARIABLE argument when looking for executables, we
need to set it to the correct value from AC_CHECK_TOOL when not
just passing on the incoming VARIABLE directly.
(AC_CHECK_TOOLS, AC_PATH_TOOL): Likewise.

ChangeLog
TODO
acgeneral.m4
configure
lib/autoconf/general.m4

index 95e50a5ff87c0de6b61bdbc63b1a31f152aef670..518c91cd135a0b4a61335d56e8c66563f9b018c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-10-17  Morten Eriksen  <mortene@sim.no>
+
+       * acgeneral.m4 (AC_CHECK_TOOL): As AC_CHECK_PROG first tests the
+       value of the VARIABLE argument when looking for executables, we
+       need to set it to the correct value from AC_CHECK_TOOL when not
+       just passing on the incoming VARIABLE directly.
+       (AC_CHECK_TOOLS, AC_PATH_TOOL): Likewise.
+
 2000-10-17  Assar Westerlund  <assar@sics.se>
 
        * acgeneral.m4 (_AC_INIT_PREPARE): Move the
diff --git a/TODO b/TODO
index 63fe8f59ff61cb1bde8ed5ba4fca6cb7db46e326..cf46994ba4428a0bee6dabfd688c293d2f562b86 100644 (file)
--- a/TODO
+++ b/TODO
@@ -33,6 +33,9 @@ For safety, we should check that configure scripts do not depend upon
 char intervals.  Introducing ac_A_Z etc. might make it more
 convenient.
 
+** AC_CHECK_TOOL...
+Write a test that checks that it honors the values set by the user.
+
 * Autoconf 2.51 or so
 
 ** AC_FUNC_GETLOADAVG
index e7751070f8d1c41cf3e4a6904638590275d2a78d..b866ea5939760736bf505b0aa18077e0608c7f60 100644 (file)
@@ -3183,10 +3183,11 @@ AC_DEFUN([AC_PATH_TOOL],
   AC_PATH_PROG([$1], [${ac_tool_prefix}$2], , [$4])
 fi
 if test -z "$ac_cv_path_$1"; then
+  ac_pt_$1=$$1
   AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4])
-  $1="$ac_pt_$1"
+  $1=$ac_pt_$1
 fi
-])
+])# AC_PATH_TOOL
 
 
 # AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
@@ -3197,10 +3198,11 @@ AC_DEFUN([AC_CHECK_TOOL],
   AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], , [$4])
 fi
 if test -z "$ac_cv_prog_$1"; then
+  ac_ct_$1=$$1
   AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
-  $1="$ac_ct_$1"
+  $1=$ac_ct_$1
 fi
-])
+])# AC_CHECK_TOOL
 
 
 # AC_CHECK_TOOLS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
@@ -3216,11 +3218,13 @@ AC_DEFUN([AC_CHECK_TOOLS],
     AC_CHECK_PROG([$1],
                   [$ac_tool_prefix$ac_prog], [$ac_tool_prefix$ac_prog],,
                   [$4])
-    test "$$1" != "" && break
+    test -n "$$1" && break
   done
 fi
 if test -z "$$1"; then
-  AC_CHECK_PROGS([$1], [$2], [$3], [$4])
+  ac_ct_$1=$$1
+  AC_CHECK_PROGS([ac_ct_$1], [$2], [$3], [$4])
+  $1=ac_ct_$1
 fi
 ])# AC_CHECK_TOOLS
 
index 5286f7cd0705facf0b7cd39e0720453fdb7dc586..8eb782a1de5c4ed179df5e0f74199e7cab21da3f 100755 (executable)
--- a/configure
+++ b/configure
@@ -8,6 +8,39 @@
 # Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Support unset when possible.
+if (unset FOO) >/dev/null 2>&1; then
+  ac_unset=unset
+else
+  ac_unset=false
+fi
+
+# NLS nuisances.
+$ac_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$ac_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$ac_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$ac_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$ac_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$ac_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$ac_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$ac_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+ac_nl='
+'
+IFS="  $ac_nl"
+
+# CDPATH.
+$ac_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
 
 #
 # Initializations.
@@ -583,39 +616,6 @@ gives unlimited permission to copy, distribute and modify it.
 EOF
   exit 0
 fi
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-
-# Support unset when possible.
-if (unset FOO) >/dev/null 2>&1; then
-  ac_unset=unset
-else
-  ac_unset=false
-fi
-
-# NLS nuisances.
-$ac_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
-$ac_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
-$ac_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
-$ac_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
-$ac_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
-$ac_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
-$ac_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
-$ac_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-ac_nl='
-'
-IFS="  $ac_nl"
-
-# CDPATH.
-$ac_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
 
 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
 
index e7751070f8d1c41cf3e4a6904638590275d2a78d..b866ea5939760736bf505b0aa18077e0608c7f60 100644 (file)
@@ -3183,10 +3183,11 @@ AC_DEFUN([AC_PATH_TOOL],
   AC_PATH_PROG([$1], [${ac_tool_prefix}$2], , [$4])
 fi
 if test -z "$ac_cv_path_$1"; then
+  ac_pt_$1=$$1
   AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4])
-  $1="$ac_pt_$1"
+  $1=$ac_pt_$1
 fi
-])
+])# AC_PATH_TOOL
 
 
 # AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
@@ -3197,10 +3198,11 @@ AC_DEFUN([AC_CHECK_TOOL],
   AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], , [$4])
 fi
 if test -z "$ac_cv_prog_$1"; then
+  ac_ct_$1=$$1
   AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
-  $1="$ac_ct_$1"
+  $1=$ac_ct_$1
 fi
-])
+])# AC_CHECK_TOOL
 
 
 # AC_CHECK_TOOLS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
@@ -3216,11 +3218,13 @@ AC_DEFUN([AC_CHECK_TOOLS],
     AC_CHECK_PROG([$1],
                   [$ac_tool_prefix$ac_prog], [$ac_tool_prefix$ac_prog],,
                   [$4])
-    test "$$1" != "" && break
+    test -n "$$1" && break
   done
 fi
 if test -z "$$1"; then
-  AC_CHECK_PROGS([$1], [$2], [$3], [$4])
+  ac_ct_$1=$$1
+  AC_CHECK_PROGS([ac_ct_$1], [$2], [$3], [$4])
+  $1=ac_ct_$1
 fi
 ])# AC_CHECK_TOOLS