bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prefer documented autoconf macro 'm4_if' over 'ifelse'


From: Bruno Haible
Subject: Re: Prefer documented autoconf macro 'm4_if' over 'ifelse'
Date: Tue, 04 Aug 2020 01:54:34 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; )

Likewise here (from gettext):


2020-08-03  Bruno Haible  <bruno@clisp.org>

        Prefer documented autoconf macro 'm4_if' over 'ifelse'.
        * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Use m4_if instead of ifelse.

diff --git a/m4/progtest.m4 b/m4/progtest.m4
index f28010a..0355e61 100644
--- a/m4/progtest.m4
+++ b/m4/progtest.m4
@@ -1,4 +1,4 @@
-# progtest.m4 serial 8 (gettext-0.20.2)
+# progtest.m4 serial 9 (gettext-0.21.1)
 dnl Copyright (C) 1996-2003, 2005, 2008-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,
@@ -16,7 +16,7 @@ dnl They are *not* in the public domain.
 dnl Authors:
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
 
-AC_PREREQ([2.50])
+AC_PREREQ([2.53])
 
 # Search path for a program which passes the given test.
 
@@ -61,7 +61,7 @@ AC_CACHE_VAL([ac_cv_path_$1],
     ;;
   *)
     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    for ac_dir in m4_if([$5], , $PATH, [$5]); do
       IFS="$ac_save_IFS"
       test -z "$ac_dir" && ac_dir=.
       for ac_exec_ext in '' $ac_executable_extensions; do
@@ -77,12 +77,12 @@ AC_CACHE_VAL([ac_cv_path_$1],
     IFS="$ac_save_IFS"
 dnl If no 4th arg is given, leave the cache variable unset,
 dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+m4_if([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 ])dnl
     ;;
 esac])dnl
 $1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+if test m4_if([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
   AC_MSG_RESULT([$][$1])
 else
   AC_MSG_RESULT([no])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]