Prefer documented autoconf macro 'm4_if' over 'ifelse'.
authorBruno Haible <bruno@clisp.org>
Sat, 1 Aug 2020 20:37:05 +0000 (22:37 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 1 Aug 2020 20:37:05 +0000 (22:37 +0200)
* m4/autobuild.m4 (AB_INIT): Use m4_if instead of ifelse.
* m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
* m4/javacomp.m4 (gt_JAVACOMP): Likewise.
* m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
* m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Likewise.

ChangeLog
m4/autobuild.m4
m4/csharpexec.m4
m4/javacomp.m4
m4/javaexec.m4
m4/libtextstyle.m4

index 4db1673e6f0689f3ad27bd5b5a3e1d6aac0bf3a8..4917f3a1bb39217d9a86796270f7bf1fa14b8b06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-08-01  Bruno Haible  <bruno@clisp.org>
+
+       Prefer documented autoconf macro 'm4_if' over 'ifelse'.
+       * m4/autobuild.m4 (AB_INIT): Use m4_if instead of ifelse.
+       * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
+       * m4/javacomp.m4 (gt_JAVACOMP): Likewise.
+       * m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
+       * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Likewise.
+
 2020-08-01  Bruno Haible  <bruno@clisp.org>
 
        libtextstyle-optional: Update tests.
index fd1ed879e2473f639808b4c351e23db588c3f7eb..91928c169c612770b290ec6c78afb87f62442e79 100644 (file)
@@ -1,4 +1,4 @@
-# autobuild.m4 serial 7
+# autobuild.m4 serial 8
 dnl Copyright (C) 2004, 2006-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([AB_INIT],
     AC_MSG_NOTICE([autobuild hostname... $hostname])
   fi
 
-  ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])])
+  m4_if([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])])
 
   date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
   if test "$?" != 0; then
index 6c10741e48282fbe149fdad13ff35cb0a6ab6b7c..5158a1a588aeba6c48d9ffaf1f07bcfb9c8b4565 100644 (file)
@@ -1,4 +1,4 @@
-# csharpexec.m4 serial 7
+# csharpexec.m4 serial 8
 dnl Copyright (C) 2003-2005, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,7 @@ AC_DEFUN([gt_CSHARPEXEC],
       mono)
         if test -n "$HAVE_MONO_IN_PATH" \
            && mono --version >/dev/null 2>/dev/null \
-           ifelse([$1], , , [&& mono $2/$1 >/dev/null 2>/dev/null]); then
+           m4_if([$1], , , [&& mono $2/$1 >/dev/null 2>/dev/null]); then
           HAVE_MONO=1
           ac_result="mono"
           break
@@ -41,7 +41,7 @@ AC_DEFUN([gt_CSHARPEXEC],
         ;;
       sscli)
         if test -n "$HAVE_CLIX_IN_PATH" \
-           ifelse([$1], , , [&& clix $2/$1 >/dev/null 2>/dev/null]); then
+           m4_if([$1], , , [&& clix $2/$1 >/dev/null 2>/dev/null]); then
           HAVE_CLIX=1
           case $host_os in
             cygwin* | mingw* | pw32*)
index f1bc38b38d25806168f079a78129a5a2d978870f..b5eea07954ded990fa2a786d7f59ffd5ce332be1 100644 (file)
@@ -1,4 +1,4 @@
-# javacomp.m4 serial 17
+# javacomp.m4 serial 18
 dnl Copyright (C) 2001-2003, 2006-2007, 2009-2020 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -85,7 +85,7 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gt_JAVACOMP],
 [
-  ifelse([$2], [], [AC_REQUIRE([gt_JAVAEXEC])], [])
+  m4_if([$2], [], [AC_REQUIRE([gt_JAVAEXEC])], [])
   AC_EGREP_CPP([yes], [
 #if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
   yes
@@ -95,7 +95,7 @@ AC_DEFUN([gt_JAVACOMP],
   test -n "$source_version" || {
     AC_MSG_ERROR([missing source-version argument to gt_@&t@JAVACOMP])
   }
-  ifelse([$2], [],
+  m4_if([$2], [],
     [if test -n "$HAVE_JAVAEXEC"; then
        dnl Use $CONF_JAVA to determine the JVM's version.
 changequote(,)dnl
index 4cbee7c86f7b5aea30726f189a24433209e824d2..c69575b85dd52172ed32cbe8f58c9e848ace4bf8 100644 (file)
@@ -1,4 +1,4 @@
-# javaexec.m4 serial 6
+# javaexec.m4 serial 7
 dnl Copyright (C) 2001-2003, 2006, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -37,14 +37,14 @@ AC_DEFUN([gt_JAVAEXEC],
     popdef([AC_MSG_RESULT])dnl
     popdef([AC_CHECKING])dnl
     popdef([AC_MSG_CHECKING])dnl
-    ifelse([$1], , , [
+    m4_if([$1], , , [
       save_CLASSPATH="$CLASSPATH"
       CLASSPATH="$2"${CLASSPATH+"$CLASSPATH_SEPARATOR$CLASSPATH"}
       ])
     export CLASSPATH
     if test -n "$HAVE_GIJ_IN_PATH" \
        && gij --version >/dev/null 2>/dev/null \
-       ifelse([$1], , , [&& {
+       m4_if([$1], , , [&& {
          echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
          gij $1 >&AS_MESSAGE_LOG_FD 2>&1
        }]); then
@@ -53,7 +53,7 @@ AC_DEFUN([gt_JAVAEXEC],
     else
       if test -n "$HAVE_JAVA_IN_PATH" \
          && java -version >/dev/null 2>/dev/null \
-         ifelse([$1], , , [&& {
+         m4_if([$1], , , [&& {
            echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
            java $1 >&AS_MESSAGE_LOG_FD 2>&1
          }]); then
@@ -62,7 +62,7 @@ AC_DEFUN([gt_JAVAEXEC],
       else
         if test -n "$HAVE_JRE_IN_PATH" \
            && (jre >/dev/null 2>/dev/null || test $? = 1) \
-           ifelse([$1], , , [&& {
+           m4_if([$1], , , [&& {
              echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
              jre $1 >&AS_MESSAGE_LOG_FD 2>&1
            }]); then
@@ -71,7 +71,7 @@ AC_DEFUN([gt_JAVAEXEC],
         else
           if test -n "$HAVE_JVIEW_IN_PATH" \
              && (jview -? >/dev/null 2>/dev/null || test $? = 1) \
-             ifelse([$1], , , [&& {
+             m4_if([$1], , , [&& {
                echo "$as_me:__oline__: gij $1" >&AS_MESSAGE_LOG_FD
                jview $1 >&AS_MESSAGE_LOG_FD 2>&1
              }]); then
@@ -83,7 +83,7 @@ AC_DEFUN([gt_JAVAEXEC],
         fi
       fi
     fi
-    ifelse([$1], , , [
+    m4_if([$1], , , [
       CLASSPATH="$save_CLASSPATH"
     ])
   fi
index 0b1b1d2d431649bcc69d56b6ca53b460a9ee9f40..a9749665796d01d78eb2baf1b13e456b345641a5 100644 (file)
@@ -1,4 +1,4 @@
-# libtextstyle.m4 serial 2
+# libtextstyle.m4 serial 3
 dnl Copyright (C) 2019-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,12 +21,12 @@ AC_DEFUN([gl_LIBTEXTSTYLE],
 [
   AC_REQUIRE([gl_LIBTEXTSTYLE_INITIALIZE])
   AC_REQUIRE([gl_LIBTEXTSTYLE_SEARCH])
-  pushdef([MINVERSION], ifelse([$1], [], [gl_LIBTEXTSTYLE_NEWEST_VERSION], [$1]))
+  pushdef([MINVERSION], m4_if([$1], [], [gl_LIBTEXTSTYLE_NEWEST_VERSION], [$1]))
   dnl Signal a fatal error if MINVERSION is not among the allowed values.
-  ifelse(ifelse(MINVERSION, [0.20], [x], [])ifelse(MINVERSION, [0.20.5], [x], []), [],
+  m4_if(m4_if(MINVERSION, [0.20], [x], [])m4_if(MINVERSION, [0.20.5], [x], []), [],
     [m4_fatal([The argument to gl_LIBTEXTSTYLE or gl_LIBTEXTSTYLE_OPTIONAL is not one of the expected values.])])
   dnl Store the specified minimum version in gl_libtextstyle_minversion.
-  dnl (This needs to be outside the ifelse. m4_divert_text inside ifelse does
+  dnl (This needs to be outside the m4_if. m4_divert_text inside m4_if does
   dnl not work reliably in Autoconf 2.69.)
   m4_divert_text([INIT_PREPARE],
     [gl_libtextstyle_minversion="$gl_libtextstyle_minversion MINVERSION "])