[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08-duplicate-check-ac-check-tools.patch
From: |
Akim Demaille |
Subject: |
08-duplicate-check-ac-check-tools.patch |
Date: |
16 Oct 2000 21:09:37 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
This patch addresses this aesthetic issue:
| /tmp % cat configure.in
| AC_INIT
| AC_PROG_F77(/bin/false)
| /tmp % ace
| /tmp % ./configure
| checking for /bin/false... no
| checking for /bin/false... no
| checking whether the Fortran 77 compiler works... no
| configure: error: Fortran 77 compiler cannot create executables
unfortunately, I was so shocked to see bad quotation there that I
couldn't help mixing quotation-fixes in the same patch. I'll whip
myself, I promise, but can't I apply it as is? Pleeeeeeez!
Anyway, afterwards:
| /tmp % ./configure
| checking for /bin/false... no
| checking whether the Fortran 77 compiler works... no
| configure: error: Fortran 77 compiler cannot create executables
Really, some day we have to rewrite all these macros :(.
Index: ChangeLog
from Akim Demaille <address@hidden>
* acgeneral.m4 (AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG)
(AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Fix
the quotation.
(AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Check with the
$ac_tool_prefix iff it is not empty.
2000-10-16 Akim Demaille <address@hidden>
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.573
diff -u -r1.573 acgeneral.m4
--- acgeneral.m4 2000/10/16 18:40:19 1.573
+++ acgeneral.m4 2000/10/16 19:01:03
@@ -3108,8 +3108,8 @@
AC_DEFUN([AC_CHECK_PROGS],
[for ac_prog in $2
do
-AC_CHECK_PROG([$1], $ac_prog, $ac_prog, , [$4])
-test -n "$$1" && break
+ AC_CHECK_PROG([$1], [$ac_prog], [$ac_prog], , [$4])
+ test -n "$$1" && break
done
m4_ifvanl([$3], [test -n "$$1" || $1="$3"])])
@@ -3137,13 +3137,12 @@
[ test -z "$ac_cv_path_$1" && ac_cv_path_$1="$3"])dnl
;;
esac])dnl
-$1=$ac_cv_path_$1
+AC_SUBST([$1], [$ac_cv_path_$1])
if test -n "$$1"; then
- AC_MSG_RESULT($$1)
+ AC_MSG_RESULT([$$1])
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
fi
-AC_SUBST($1)dnl
])# AC_PATH_PROG
@@ -3153,8 +3152,8 @@
AC_DEFUN([AC_PATH_PROGS],
[for ac_prog in $2
do
-AC_PATH_PROG($1, $ac_prog, , $4)
-test -n "$$1" && break
+ AC_PATH_PROG([$1], [$ac_prog], , [$4])
+ test -n "$$1" && break
done
m4_ifvanl([$3], [test -n "$$1" || $1="$3"])dnl
])
@@ -3176,14 +3175,12 @@
# -----------------------------------------------------------------------
# (Use different variables $1 and ac_pt_$1 so that cache vars don't conflict.)
AC_DEFUN([AC_PATH_TOOL],
-[AC_PATH_PROG($1, ${ac_tool_prefix}$2, , $4)
+[if test -n "$ac_tool_prefix"; then
+ AC_PATH_PROG([$1], [${ac_tool_prefix}$2], , [$4])
+fi
if test -z "$ac_cv_path_$1"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4])
- $1="$ac_pt_$1"
- else
- $1="$3"
- fi
+ AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4])
+ $1="$ac_pt_$1"
fi
])
@@ -3192,14 +3189,12 @@
# ------------------------------------------------------------------------
# (Use different variables $1 and ac_ct_$1 so that cache vars don't conflict.)
AC_DEFUN([AC_CHECK_TOOL],
-[AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, , $4)
+[if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], , [$4])
+fi
if test -z "$ac_cv_prog_$1"; then
- if test -n "$ac_tool_prefix"; then
- AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
- $1="$ac_ct_$1"
- else
- $1="$3"
- fi
+ AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
+ $1="$ac_ct_$1"
fi
])
@@ -3211,12 +3206,16 @@
# none can be found with a cross prefix, then use the first one that
# was found without the cross prefix.
AC_DEFUN([AC_CHECK_TOOLS],
-[for ac_prog in $2
-do
- AC_CHECK_PROG([$1], $ac_tool_prefix$ac_prog, $ac_tool_prefix$ac_prog,, [$4])
- test "$$1" != "" && break
-done
-if test "$$1" = ""; then
+[if test -n "$ac_tool_prefix"; then
+ for ac_prog in $2
+ do
+ AC_CHECK_PROG([$1],
+ [$ac_tool_prefix$ac_prog], [$ac_tool_prefix$ac_prog],,
+ [$4])
+ test "$$1" != "" && break
+ done
+fi
+if test -z "$$1"; then
AC_CHECK_PROGS([$1], [$2], [$3], [$4])
fi
])# AC_CHECK_TOOLS
- 08-duplicate-check-ac-check-tools.patch,
Akim Demaille <=