summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-08-01 22:37:05 +0200
committerBruno Haible <bruno@clisp.org>2020-08-01 22:37:05 +0200
commit974e430fd72722cda11f461ec53db8f556609a19 (patch)
tree1ef438b963f07cf951a4d8ba27ef59e8059c956c
parent37b6f1294620be849f951dcb2f505207b435f88d (diff)
downloadgnulib-974e430fd72722cda11f461ec53db8f556609a19.tar.gz
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.
-rw-r--r--ChangeLog9
-rw-r--r--m4/autobuild.m44
-rw-r--r--m4/csharpexec.m46
-rw-r--r--m4/javacomp.m46
-rw-r--r--m4/javaexec.m414
-rw-r--r--m4/libtextstyle.m48
6 files changed, 28 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 4db1673e6f..4917f3a1bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
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.
* modules/libtextstyle-optional-tests (configure.ac): Invoke
gl_LIBTEXTSTYLE_OPTIONAL.
diff --git a/m4/autobuild.m4 b/m4/autobuild.m4
index fd1ed879e2..91928c169c 100644
--- a/m4/autobuild.m4
+++ b/m4/autobuild.m4
@@ -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
diff --git a/m4/csharpexec.m4 b/m4/csharpexec.m4
index 6c10741e48..5158a1a588 100644
--- a/m4/csharpexec.m4
+++ b/m4/csharpexec.m4
@@ -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*)
diff --git a/m4/javacomp.m4 b/m4/javacomp.m4
index f1bc38b38d..b5eea07954 100644
--- a/m4/javacomp.m4
+++ b/m4/javacomp.m4
@@ -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
diff --git a/m4/javaexec.m4 b/m4/javaexec.m4
index 4cbee7c86f..c69575b85d 100644
--- a/m4/javaexec.m4
+++ b/m4/javaexec.m4
@@ -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
diff --git a/m4/libtextstyle.m4 b/m4/libtextstyle.m4
index 0b1b1d2d43..a974966579 100644
--- a/m4/libtextstyle.m4
+++ b/m4/libtextstyle.m4
@@ -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 "])