]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4: Replace some ifelse with ifval or m4_default, or
authorAkim Demaille <akim@epita.fr>
Tue, 14 Mar 2000 08:41:15 +0000 (08:41 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 14 Mar 2000 08:41:15 +0000 (08:41 +0000)
even nothing when not needed.
* acspecific.m4: Likewise.

ChangeLog
acgeneral.m4
acspecific.m4
lib/autoconf/general.m4
lib/autoconf/specific.m4

index 873a65c174b28d331647d9cb9532e1f3c3ff78e0..34d86b0afef75993d5a7c9a21651a8d00b126aca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-03-14  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4: Replace some ifelse with ifval or m4_default, or
+       even nothing when not needed.
+       * acspecific.m4: Likewise.
+
 2000-03-14  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (_AC_INIT_PREPARE): Insert the Autoconf version in
index 2259898e6d8620ab21d6d0065ed7f650247f1a15..8b89f7f0c1edbb8692a947345a52d6e02ab84e15 100644 (file)
@@ -1338,7 +1338,7 @@ AC_DIVERT_POP()dnl
 @%:@ Check whether --enable-[$1] or --disable-[$1] was given.
 if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
   enableval="[$enable_]patsubst([$1], -, _)"
-  ifelse([$3], , :, [$3])
+  $3
 ifval([$4], [else
   $4
 ])dnl
@@ -1370,7 +1370,7 @@ AC_DIVERT_POP()dnl
 @%:@ Check whether --with-[$1] or --without-[$1] was given.
 if test "[${with_]patsubst([$1], -, _)+set}" = set; then
   withval="[$with_]patsubst([$1], -, _)"
-  ifelse([$3], , :, [$3])
+  $3
 ifval([$4], [else
   $4
 ])dnl
@@ -2274,7 +2274,7 @@ ifelse([$2], [$4],
 [  else
     # Default is a loser.
     AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
-ifelse([$5], , [\$]PATH, [$5])])
+m4_default([$5], [\$PATH])])
 ])dnl
   fi
 fi
@@ -2323,7 +2323,7 @@ AC_CACHE_VAL(ac_cv_path_$1,
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$4], , $PATH, [$4])"
+  ac_dummy="m4_default([$4], [$PATH])"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_word"; then
@@ -2805,7 +2805,7 @@ EOF
 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
 dnl Don't remove the temporary files here, so they can be examined.
-  ifelse([$2], , :, [$2])
+  m4_default([$2], [:])
 else
   echo "configure: failed program was:" >&AC_FD_CC
   cat conftest.$ac_ext >&AC_FD_CC
index 7de2b0385ef88c2d96862ec30a69a3cc184a62ef..602533a996f7883ce58cece75c515d64144a3321 100644 (file)
@@ -89,7 +89,8 @@ AC_SUBST(ECHO_T)dnl
 AC_DEFUN(AC_PROG_CC,
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
-ifelse([$1], ,
+ifval([$1],
+      [AC_CHECK_PROGS(CC, [$1])],
 [
   AC_CHECK_PROG(CC, gcc, gcc)
   if test -z "$CC"; then
@@ -98,7 +99,7 @@ ifelse([$1], ,
       AC_CHECK_PROGS(CC, cl)
     fi
   fi
-], [AC_CHECK_PROGS(CC, [$1])])
+])
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
index 2259898e6d8620ab21d6d0065ed7f650247f1a15..8b89f7f0c1edbb8692a947345a52d6e02ab84e15 100644 (file)
@@ -1338,7 +1338,7 @@ AC_DIVERT_POP()dnl
 @%:@ Check whether --enable-[$1] or --disable-[$1] was given.
 if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
   enableval="[$enable_]patsubst([$1], -, _)"
-  ifelse([$3], , :, [$3])
+  $3
 ifval([$4], [else
   $4
 ])dnl
@@ -1370,7 +1370,7 @@ AC_DIVERT_POP()dnl
 @%:@ Check whether --with-[$1] or --without-[$1] was given.
 if test "[${with_]patsubst([$1], -, _)+set}" = set; then
   withval="[$with_]patsubst([$1], -, _)"
-  ifelse([$3], , :, [$3])
+  $3
 ifval([$4], [else
   $4
 ])dnl
@@ -2274,7 +2274,7 @@ ifelse([$2], [$4],
 [  else
     # Default is a loser.
     AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
-ifelse([$5], , [\$]PATH, [$5])])
+m4_default([$5], [\$PATH])])
 ])dnl
   fi
 fi
@@ -2323,7 +2323,7 @@ AC_CACHE_VAL(ac_cv_path_$1,
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$4], , $PATH, [$4])"
+  ac_dummy="m4_default([$4], [$PATH])"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_word"; then
@@ -2805,7 +2805,7 @@ EOF
 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
 dnl Don't remove the temporary files here, so they can be examined.
-  ifelse([$2], , :, [$2])
+  m4_default([$2], [:])
 else
   echo "configure: failed program was:" >&AC_FD_CC
   cat conftest.$ac_ext >&AC_FD_CC
index 7de2b0385ef88c2d96862ec30a69a3cc184a62ef..602533a996f7883ce58cece75c515d64144a3321 100644 (file)
@@ -89,7 +89,8 @@ AC_SUBST(ECHO_T)dnl
 AC_DEFUN(AC_PROG_CC,
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
-ifelse([$1], ,
+ifval([$1],
+      [AC_CHECK_PROGS(CC, [$1])],
 [
   AC_CHECK_PROG(CC, gcc, gcc)
   if test -z "$CC"; then
@@ -98,7 +99,7 @@ ifelse([$1], ,
       AC_CHECK_PROGS(CC, cl)
     fi
   fi
-], [AC_CHECK_PROGS(CC, [$1])])
+])
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])