From 27acf968e7774dfbb955b8db32f18a0199362a60 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 17 Oct 2000 16:34:10 +0000 Subject: [PATCH] * 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. --- ChangeLog | 8 +++++ TODO | 3 ++ acgeneral.m4 | 16 ++++++---- configure | 66 ++++++++++++++++++++--------------------- lib/autoconf/general.m4 | 16 ++++++---- 5 files changed, 64 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95e50a5f..518c91cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-10-17 Morten Eriksen + + * 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 * acgeneral.m4 (_AC_INIT_PREPARE): Move the diff --git a/TODO b/TODO index 63fe8f59..cf46994b 100644 --- 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 diff --git a/acgeneral.m4 b/acgeneral.m4 index e7751070..b866ea59 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -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 diff --git a/configure b/configure index 5286f7cd..8eb782a1 100755 --- 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 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index e7751070..b866ea59 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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