[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
51-m4-if.patch
From: |
Akim Demaille |
Subject: |
51-m4-if.patch |
Date: |
Tue, 28 Nov 2000 09:04:48 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* m4sugar.m4 (ifval, ifset, ifdef, ifndef, m4_ifvanl): Rename as...
(m4_ifval, m4_ifset, m4_ifdef, m4_ifndef, m4_ifvaln): this.
(m4_n): New macro.
(m4_ifvaln): Use it.
* autoconf.m4 (ifdef): Restore it.
Index: acgeneral.m4
--- acgeneral.m4 Sat, 18 Nov 2000 16:20:09 +0100 akim (ace/27_acgeneral.
1.169.8.96 644)
+++ acgeneral.m4 Sun, 26 Nov 2000 17:12:17 +0100 akim (ace/27_acgeneral.
1.169.8.96 644)
@@ -238,8 +238,8 @@ m4_define([AC_PROVIDE],
# check macros which are provided without letting her know how the
# information is coded.
m4_define([AC_PROVIDE_IFELSE],
-[ifdef([AC_PROVIDE_$1],
- [$2], [$3])])
+[m4_ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])
@@ -682,11 +682,11 @@ m4_define([_AC_INIT_NOTICE],
[m4_divert_text([NOTICE],
address@hidden:@ Guess values for system-dependent variables and create
Makefiles.
@%:@ Generated by Autoconf AC_ACVERSION[]dnl
-ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
+m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
-ifset([AC_PACKAGE_BUGREPORT],
- [m4_divert_text([NOTICE],
- address@hidden:@
+m4_ifset([AC_PACKAGE_BUGREPORT],
+ [m4_divert_text([NOTICE],
+ address@hidden:@
@%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
])
@@ -743,7 +743,7 @@ m4_define([_AC_INIT_DEFAULTS],
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me ifset([AC_PACKAGE_STRING],
+It was created by $as_me m4_ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
> $[0] address@hidden
@@ -1280,7 +1280,7 @@ m4_define([_AC_INIT_HELP],
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<EOF
-\`configure' configures ifset([AC_PACKAGE_STRING],
+\`configure' configures m4_ifset([AC_PACKAGE_STRING],
[AC_PACKAGE_STRING],
[this package]) to adapt to many kinds of systems.
@@ -1362,14 +1362,14 @@ m4_define([_AC_INIT_HELP],
fi
if test -n "$ac_init_help"; then
-ifset([AC_PACKAGE_STRING],
+m4_ifset([AC_PACKAGE_STRING],
[ case $ac_init_help in
short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
esac])
cat <<\EOF
m4_divert_pop()dnl
m4_divert_push([HELP_END])dnl
-ifset([AC_PACKAGE_BUGREPORT], [
+m4_ifset([AC_PACKAGE_BUGREPORT], [
Report bugs to <AC_PACKAGE_BUGREPORT>.])
EOF
fi
@@ -1421,9 +1421,9 @@ m4_define([_AC_INIT_VERSION],
[m4_divert_text([VERSION_BEGIN],
[if $ac_init_version; then
cat <<\EOF])dnl
-ifset([AC_PACKAGE_STRING],
-[m4_divert_text([VERSION_BEGIN],
- [configure (AC_PACKAGE_STRING) AC_ACVERSION])])
+m4_ifset([AC_PACKAGE_STRING],
+ [m4_divert_text([VERSION_BEGIN],
+ [configure (AC_PACKAGE_STRING) AC_ACVERSION])])
m4_divert_text([VERSION_END],
[EOF
exit 0
@@ -1511,8 +1511,8 @@ m4_define([_AC_INIT_PREPARE],
# ----------------------------------------
# This macro is used only for Autoupdate.
AU_DEFUN([AC_INIT],
-[ifval([$2], [[AC_INIT($@)]],
- [ifval([$1],
+[m4_ifval([$2], [[AC_INIT($@)]],
+ [m4_ifval([$1],
[[AC_INIT]
AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
])
@@ -1525,7 +1525,7 @@ m4_define([_AC_INIT_PREPARE],
# Note that the order is important: first initialize, then set the
# AC_CONFIG_SRCDIR.
m4_define([AC_INIT],
-[ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
+[m4_ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
m4_divert_text([BINSH], address@hidden:@! /bin/sh])
_AC_INIT_DEFAULTS()dnl
m4_divert_pop()dnl to BODY
@@ -1538,7 +1538,7 @@ m4_define([AC_INIT],
dnl it dumps into a diversion prepared by _AC_INIT_VERSION.
_AC_INIT_NOTICE
_AC_INIT_COPYRIGHT
-ifval([$2], , [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
+m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
])
@@ -1568,7 +1568,7 @@ AC_DEFUN([AC_ARG_ENABLE],
if test "[${enable_]m4_patsubst([$1], -, _)+set}" = set; then
enableval="[$enable_]m4_patsubst([$1], -, _)"
$3
-m4_ifvanl([$4], [else
+m4_ifvaln([$4], [else
$4])dnl
fi; dnl
])# AC_ARG_ENABLE
@@ -1596,7 +1596,7 @@ AC_DEFUN([AC_ARG_WITH],
if test "[${with_]m4_patsubst([$1], -, _)+set}" = set; then
withval="[$with_]m4_patsubst([$1], -, _)"
$3
-m4_ifvanl([$4], [else
+m4_ifvaln([$4], [else
$4])dnl
fi; dnl
])# AC_ARG_WITH
@@ -2054,7 +2054,7 @@ m4_define([AC_DEFINE_TRACE],
# die. The third argument is used by autoheader.
m4_define([AC_DEFINE],
[AC_DEFINE_TRACE([$1])dnl
-ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
+m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
EOF
@@ -2066,7 +2066,7 @@ m4_define([AC_DEFINE],
# Similar, but perform shell substitutions $ ` \ once on VALUE.
m4_define([AC_DEFINE_UNQUOTED],
[AC_DEFINE_TRACE([$1])dnl
-ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
+m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
EOF
@@ -2102,7 +2102,7 @@ m4_define([_AC_SUBST_SED_PROGRAM])
# Beware that if you change this macro, you also have to change the
# sed script at the top of _AC_OUTPUT_FILES.
m4_define([AC_SUBST],
-[m4_ifvanl([$2], [$1=$2])[]dnl
+[m4_ifvaln([$2], [$1=$2])[]dnl
_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
])# AC_SUBST
@@ -2385,18 +2385,18 @@ AC_DEFUN([AC_CHECK_PROG],
[if test -n "$$1"; then
ac_cv_prog_$1="$$1" # Let the user override the test.
else
-m4_ifvanl([$6],
+m4_ifvaln([$6],
[ ac_prog_rejected=no])dnl
AC_SHELL_PATH_WALK([$5],
[test -f "$ac_dir/$ac_word" || continue
-m4_ifvanl([$6],
+m4_ifvaln([$6],
[if test "$ac_dir/$ac_word" = "$6"; then
ac_prog_rejected=yes
continue
fi])dnl
ac_cv_prog_$1="$3"
break])
-m4_ifvanl([$6],
+m4_ifvaln([$6],
[if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_$1
@@ -2419,7 +2419,7 @@ AC_DEFUN([AC_CHECK_PROG],
fi])dnl
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_CHECK_PROGS will keep looking.
-m4_ifvanl([$4],
+m4_ifvaln([$4],
[ test -z "$ac_cv_prog_$1" && ac_cv_prog_$1="$4"])dnl
fi])dnl
$1=$ac_cv_prog_$1
@@ -2441,7 +2441,7 @@ AC_DEFUN([AC_CHECK_PROGS],
AC_CHECK_PROG([$1], [$ac_prog], [$ac_prog], , [$4])
test -n "$$1" && break
done
-m4_ifvanl([$3], [test -n "$$1" || $1="$3"])])
+m4_ifvaln([$3], [test -n "$$1" || $1="$3"])])
# AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
@@ -2463,7 +2463,7 @@ AC_DEFUN([AC_PATH_PROG],
fi])
dnl If no 3rd arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
-m4_ifvanl([$3],
+m4_ifvaln([$3],
[ test -z "$ac_cv_path_$1" && ac_cv_path_$1="$3"])dnl
;;
esac])dnl
@@ -2485,7 +2485,7 @@ AC_DEFUN([AC_PATH_PROGS],
AC_PATH_PROG([$1], [$ac_prog], , [$4])
test -n "$$1" && break
done
-m4_ifvanl([$3], [test -n "$$1" || $1="$3"])dnl
+m4_ifvaln([$3], [test -n "$$1" || $1="$3"])dnl
])
@@ -2644,7 +2644,7 @@ AC_DEFUN([AC_SEARCH_LIBS],
# And ``ac_save_LIBS' is too tempting a name, so let's leave them some
# freedom.
AC_DEFUN([AC_CHECK_LIB],
-[ifval([$3], , [AH_CHECK_LIB([$1])])dnl
+[m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl
AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
AC_ARG_VAR([LDFLAGS], [linker flags, e.g. -L<lib dir> if you have libraries in
a nonstandard directory <lib dir>])
AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
@@ -2758,7 +2758,7 @@ AC_DEFUN([AC_EGREP_CPP],
dnl Quote $1 to prevent m4 from eating character classes
egrep "[$1]" >/dev/null 2>&1; then
m4_default([$3], :)
-m4_ifvanl([$4], [else
+m4_ifvaln([$4], [else
$4])dnl
fi
rm -f conftest*
@@ -2786,16 +2786,16 @@ AC_DEFUN([AC_EGREP_HEADER],
# Try to compile PROGRAM.
# This macro can be used during the selection of a compiler.
m4_define([_AC_COMPILE_IFELSE],
-[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
+[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext
if AC_TRY_EVAL(ac_compile) && test -s conftest.$ac_objext; then
m4_default([$2], :)
else
echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
-m4_ifvanl([$3],[ $3])dnl
+m4_ifvaln([$3],[ $3])dnl
fi
-rm -f conftest.$ac_objext ifval([$1], [conftest.$ac_ext])[]dnl
+rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
])# _AC_COMPILE_IFELSE
@@ -2827,16 +2827,16 @@ AC_DEFUN([AC_TRY_COMPILE],
# Try to link PROGRAM.
# This macro can be used during the selection of a compiler.
m4_define([_AC_LINK_IFELSE],
-[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
+[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext conftest$ac_exeext
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
m4_default([$2], :)
else
echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
-m4_ifvanl([$3], [ $3])dnl
+m4_ifvaln([$3], [ $3])dnl
fi
-rm -f conftest$ac_exeext ifval([$1], [conftest.$ac_ext])[]dnl
+rm -f conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
])# _AC_LINK_IFELSE
@@ -2868,7 +2868,7 @@ AC_DEFUN([AC_TRY_LINK],
# ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------
AU_DEFUN([AC_COMPILE_CHECK],
-[m4_ifvanl([$1], [AC_CHECKING([for $1])])dnl
+[m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
])
@@ -2885,7 +2885,7 @@ AC_DEFUN([AC_TRY_LINK],
# Compile, link, and run.
# This macro can be used during the selection of a compiler.
m4_define([_AC_RUN_IFELSE],
-[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
+[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest$ac_exeext
AC_TRY_EVAL(ac_link) &&
(./conftest$ac_exeext) >&AS_MESSAGE_LOG_FD 2>&1;
@@ -2895,8 +2895,8 @@ m4_define([_AC_RUN_IFELSE],
[echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
-m4_ifvanl([$3], [$3])dnl])
-rm -f conftest$ac_exeext ifval([$1], [conftest.$ac_ext])[]dnl
+m4_ifvaln([$3], [$3])dnl])
+rm -f conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
])# _AC_RUN_IFELSE
@@ -2914,8 +2914,8 @@ AC_DEFUN([AC_RUN_IFELSE],
# [ACTION-IF-CROSS-COMPILING])
# --------------------------------------------------------
AC_DEFUN([AC_TRY_RUN],
-[ifval([$4], [],
- [AC_DIAGNOSE([cross],
+[m4_ifval([$4], [],
+ [AC_DIAGNOSE([cross],
[$0 called without default to allow cross compiling])])dnl
if test "$cross_compiling" = yes; then
m4_default([$4],
@@ -3403,9 +3403,9 @@ m4_define([AC_FILE_DEPENDENCY_TRACE], []
# Be sure that a missing dependency is expressed as a dependency upon
# `DEST.in'.
m4_define([_AC_CONFIG_DEPENDENCY],
-[ifval([$2],
- [AC_FILE_DEPENDENCY_TRACE($@)],
- [AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])])
+[m4_ifval([$2],
+ [AC_FILE_DEPENDENCY_TRACE($@)],
+ [AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])])
# _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]]...)
@@ -3455,8 +3455,9 @@ m4_define([_AC_CONFIG_UNIQUE],
# `configure' to `config.status'. Note that $[1] is not over quoted as
# was the case in AC_OUTPUT_COMMANDS.
m4_define([_AC_CONFIG_COMMANDS_INIT],
-[ifval([$1],
-[m4_append([_AC_OUTPUT_COMMANDS_INIT], [$1
+[m4_ifval([$1],
+ [m4_append([_AC_OUTPUT_COMMANDS_INIT],
+ [$1
])])])
# Initialize.
@@ -3708,9 +3709,9 @@ m4_define([_AC_LIST_SUBDIRS])
# proper modern macros.
AU_DEFUN([AC_OUTPUT],
-[m4_ifvanl([$1],
+[m4_ifvaln([$1],
[AC_CONFIG_FILES([$1])])dnl
-m4_ifvanl([$2$3],
+m4_ifvaln([$2$3],
[AC_CONFIG_COMMANDS(default, [[$2]], [[$3]])])dnl
[AC_OUTPUT]],
[`AC_OUTPUT' should be used without arguments.])
@@ -3725,10 +3726,10 @@ m4_define([_AC_LIST_SUBDIRS])
# shells die. Unfortunately the limit is not known precisely...
m4_define([AC_OUTPUT],
[dnl Dispatch the extra arguments to their native macros.
-ifval([$1],
- [AC_CONFIG_FILES([$1])])dnl
-ifval([$2$3],
- [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
+m4_ifval([$1],
+ [AC_CONFIG_FILES([$1])])dnl
+m4_ifval([$2$3],
+ [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
AC_CACHE_SAVE
test "x$prefix" = xNONE && prefix=$ac_default_prefix
@@ -3742,7 +3743,7 @@ m4_define([AC_OUTPUT],
ac_vpsub=['/^[ ]*VPATH[ ]*=[^:]*$/d']
fi
-ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
+m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
dnl Commands to run before creating config.status.
AC_OUTPUT_COMMANDS_PRE()dnl
@@ -3794,7 +3795,7 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
----------------------------------------------------------------------
-This file was extended by $as_me ifset([AC_PACKAGE_STRING],
+This file was extended by $as_me m4_ifset([AC_PACKAGE_STRING],
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
> $[0] address@hidden
on `(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -3832,31 +3833,31 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
-V, --version print version number, then exit
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
-ifset([AC_LIST_FILES],
+m4_ifset([AC_LIST_FILES],
[[ --file=FILE[:TEMPLATE]
instantiate the configuration file FILE
]])dnl
-ifset([AC_LIST_HEADERS],
+m4_ifset([AC_LIST_HEADERS],
[[ --header=FILE[:TEMPLATE]
instantiate the configuration header FILE
]])dnl
-ifset([AC_LIST_FILES],
+m4_ifset([AC_LIST_FILES],
[Configuration files:
$config_files
])dnl
-ifset([AC_LIST_HEADERS],
+m4_ifset([AC_LIST_HEADERS],
[Configuration headers:
$config_headers
])dnl
-ifset([AC_LIST_LINKS],
+m4_ifset([AC_LIST_LINKS],
[Configuration links:
$config_links
])dnl
-ifset([AC_LIST_COMMANDS],
+m4_ifset([AC_LIST_COMMANDS],
[Configuration commands:
$config_commands
@@ -3957,28 +3958,28 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
dnl Issue this section only if there were actually config files.
dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_LIST_COMMANDS,
dnl or AC_LIST_LINKS is set.
-ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
+m4_ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
[cat >>$CONFIG_STATUS <<\EOF
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
if $ac_need_defaults; then
-ifset([AC_LIST_FILES], [ : ${CONFIG_FILES=$config_files}
+m4_ifset([AC_LIST_FILES], [ : ${CONFIG_FILES=$config_files}
])dnl
-ifset([AC_LIST_HEADERS], [ : ${CONFIG_HEADERS=$config_headers}
+m4_ifset([AC_LIST_HEADERS], [ : ${CONFIG_HEADERS=$config_headers}
])dnl
-ifset([AC_LIST_LINKS], [ : ${CONFIG_LINKS=$config_links}
+m4_ifset([AC_LIST_LINKS], [ : ${CONFIG_LINKS=$config_links}
])dnl
-ifset([AC_LIST_COMMANDS], [ : ${CONFIG_COMMANDS=$config_commands}
+m4_ifset([AC_LIST_COMMANDS], [ : ${CONFIG_COMMANDS=$config_commands}
])dnl
fi
AS_TMPDIR(cs)
EOF
-])[]dnl ifval
+])[]dnl m4_ifval
dnl We output the INIT-CMDS first for obvious reasons :)
-ifset([_AC_OUTPUT_COMMANDS_INIT],
+m4_ifset([_AC_OUTPUT_COMMANDS_INIT],
[cat >>$CONFIG_STATUS <<EOF
#
# INIT-COMMANDS section.
@@ -3990,10 +3991,10 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
dnl The following four sections are in charge of their own here
dnl documenting into $CONFIG_STATUS.
-ifset([AC_LIST_FILES], [_AC_OUTPUT_FILES()])dnl
-ifset([AC_LIST_HEADERS], [_AC_OUTPUT_HEADERS()])dnl
-ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
-ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
+m4_ifset([AC_LIST_FILES], [_AC_OUTPUT_FILES()])dnl
+m4_ifset([AC_LIST_HEADERS], [_AC_OUTPUT_HEADERS()])dnl
+m4_ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
+m4_ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
cat >>$CONFIG_STATUS <<\EOF
@@ -4226,7 +4227,7 @@ m4_define([_AC_OUTPUT_FILES],
rm -f $tmp/out
fi
-ifset([AC_LIST_FILES_COMMANDS],
+m4_ifset([AC_LIST_FILES_COMMANDS],
[ # Run the commands associated with the file.
case $ac_file in
AC_LIST_FILES_COMMANDS()dnl
@@ -4467,7 +4468,7 @@ m4_define([_AC_OUTPUT_HEADERS],
cat $tmp/config.h
rm -f $tmp/config.h
fi
-ifset([AC_LIST_HEADERS_COMMANDS],
+m4_ifset([AC_LIST_HEADERS_COMMANDS],
[ # Run the commands associated with the file.
case $ac_file in
AC_LIST_HEADERS_COMMANDS()dnl
@@ -4527,7 +4528,7 @@ m4_define([_AC_OUTPUT_LINKS],
ln $srcdir/$ac_source $ac_dest; then :; else
AC_MSG_ERROR([cannot link $ac_dest to $srcdir/$ac_source])
fi
-ifset([AC_LIST_LINKS_COMMANDS],
+m4_ifset([AC_LIST_LINKS_COMMANDS],
[ # Run the commands associated with the file.
case $ac_file in
AC_LIST_LINKS_COMMANDS()dnl
Index: aclang.m4
--- aclang.m4 Sat, 18 Nov 2000 12:03:30 +0100 akim (ace/b/32_aclang.m4 1.5.3.50
644)
+++ aclang.m4 Sun, 26 Nov 2000 17:12:17 +0100 akim (ace/b/32_aclang.m4 1.5.3.50
644)
@@ -103,7 +103,7 @@ m4_define([AC_LANG_CASE],
# Call the specialization of MACRO for LANG with ARGS. Complain if
# unavailable.
m4_define([_AC_LANG_DISPATCH],
-[ifdef([$1($2)],
+[m4_ifdef([$1($2)],
[m4_indir([$1($2)], m4_shiftn(2, $@))],
[AC_FATAL([$1: unknown language: $2])])])
@@ -466,7 +466,7 @@ m4_define([AC_LANG_SOURCE(Fortran 77)],
# -----------------------------------------------
# Yes, we discard the PROLOGUE.
m4_define([AC_LANG_PROGRAM(Fortran 77)],
-[ifval([$1],
+[m4_ifval([$1],
[m4_warn([syntax], [$0: ignoring PROLOGUE: $1])])dnl
program main
$2
@@ -724,7 +724,7 @@ AC_DEFUN([AC_PROG_CC],
[AC_LANG_PUSH(C)
AC_ARG_VAR([CC], [C compiler command])
AC_ARG_VAR([CFLAGS], [C compiler flags])
-ifval([$1],
+m4_ifval([$1],
[AC_CHECK_TOOLS(CC, [$1])],
[AC_CHECK_TOOL(CC, gcc)
if test -z "$CC"; then
Index: autoconf.m4
--- autoconf.m4 Sun, 26 Nov 2000 16:58:07 +0100 akim (ace/28_autoconf.m 1.16
644)
+++ autoconf.m4 Sun, 26 Nov 2000 17:17:53 +0100 akim (ace/28_autoconf.m 1.16
644)
@@ -46,6 +46,7 @@
m4_copy_unm4([m4_divnum])
m4_copy_unm4([m4_errprint])
m4_copy_unm4([m4_esyscmd])
+m4_copy_unm4([m4_ifdef])
m4_copy_unm4([m4_incr])
m4_copy_unm4([m4_index])
m4_copy_unm4([m4_indir])
Index: m4sh.m4
--- m4sh.m4 Sat, 18 Nov 2000 15:03:42 +0100 akim (ace/b/41_m4sh.m4 1.9 644)
+++ m4sh.m4 Sun, 26 Nov 2000 17:15:39 +0100 akim (ace/b/41_m4sh.m4 1.9 644)
@@ -105,10 +105,10 @@
# | fi
# with simplifications is IF-TRUE and/or IF-FALSE is empty.
m4_define([AS_IFELSE],
-[ifval([$2$3],
+[m4_ifval([$2$3],
[if $1; then
- ifval([$2], [$2], :)
-m4_ifvanl([$3],
+ m4_ifval([$2], [$2], :)
+m4_ifvaln([$3],
[else
$3])dnl
fi
@@ -213,28 +213,28 @@ m4_define([_AS_ECHO],
# AS_MESSAGE(STRING, [FD = AS_MESSAGE_FD])
# --------------------------------------------
m4_define([AS_MESSAGE],
-[ifset([AS_MESSAGE_LOG_FD],
- [{ _AS_ECHO([$as_me:__oline__: $1], [AS_MESSAGE_LOG_FD])
+[m4_ifset([AS_MESSAGE_LOG_FD],
+ [{ _AS_ECHO([$as_me:__oline__: $1], [AS_MESSAGE_LOG_FD])
_AS_ECHO($@);}],
- [_AS_ECHO($@)])[]dnl
+ [_AS_ECHO($@)])[]dnl
])
# AS_WARN(PROBLEM)
# ----------------
m4_define([AS_WARN],
-[ifset([AS_MESSAGE_LOG_FD],
- [{ _AS_ECHO([$as_me:__oline__: WARNING: $1], [AS_MESSAGE_LOG_FD])
+[m4_ifset([AS_MESSAGE_LOG_FD],
+ [{ _AS_ECHO([$as_me:__oline__: WARNING: $1], [AS_MESSAGE_LOG_FD])
_AS_ECHO([$as_me: warning: $1], 2); }],
- [_AS_ECHO([$as_me: warning: $1], 2)])[]dnl
+ [_AS_ECHO([$as_me: warning: $1], 2)])[]dnl
])# AS_WARN
# AS_ERROR(ERROR, [EXIT-STATUS = 1])
# ----------------------------------
m4_define([AS_ERROR],
-[{ifset([AC_LOG_FD],
- [_AS_ECHO([$as_me:__oline__: error: $1], [AS_MESSAGE_LOG_FD])
+[{m4_ifset([AC_LOG_FD],
+ [_AS_ECHO([$as_me:__oline__: error: $1], [AS_MESSAGE_LOG_FD])
])[]dnl
_AS_ECHO([$as_me: error: $1], 2)
AS_EXIT([$2]); }[]dnl
Index: m4sugar.m4
--- m4sugar.m4 Sun, 26 Nov 2000 16:58:07 +0100 akim (ace/b/27_libm4.m4 1.39 644)
+++ m4sugar.m4 Sun, 26 Nov 2000 17:12:17 +0100 akim (ace/b/27_libm4.m4 1.39 644)
@@ -121,6 +121,7 @@ m4_define([m4_copy_unm4],
m4_rename_m4([esyscmd])
m4_rename_m4([eval])
m4_rename_m4([format])
+m4_rename_m4([ifdef])
m4_rename_m4([incr])
m4_rename_m4([index])
m4_rename_m4([indir])
@@ -156,7 +157,7 @@ m4_define([m4_location], [__file__:__lin
# m4_errprintn(MSG)
# -----------------
# Same as `errprint', but with the missing end of line.
-m4_define([m4_errprint], [m4_errprint([$1
+m4_define([m4_errprintn], [m4_errprint([$1
])])
@@ -277,9 +278,8 @@ m4_define([m4_warn],
# Declare that the FILE was loading; and warn if it has already
# been included.
m4_define([m4_include_unique],
-[ifdef([m4_include($1)],
- [m4_warn([syntax],
- [file `$1' included several times])])dnl
+[m4_ifdef([m4_include($1)],
+ [m4_warn([syntax], [file `$1' included several times])])dnl
m4_define([m4_include($1)])])
@@ -308,52 +308,62 @@ m4_define([m4_sinclude],
## 5. Additional branching constructs. ##
## ------------------------------------ ##
-# Both `ifval' and `ifset' tests against the empty string. The
-# difference is that `ifset' is specialized on macros.
+# Both `m4_ifval' and `m4_ifset' tests against the empty string. The
+# difference is that `m4_ifset' is specialized on macros.
#
# In case of arguments of macros, eg $[1], it makes little difference.
-# In the case of a macro `FOO', you don't want to check `ifval(FOO,
+# In the case of a macro `FOO', you don't want to check `m4_ifval(FOO,
# TRUE)', because if `FOO' expands with commas, there is a shifting of
-# the arguments. So you want to run `ifval([FOO])', but then you just
+# the arguments. So you want to run `m4_ifval([FOO])', but then you just
# compare the *string* `FOO' against `', which, of course fails.
#
-# So you want a variation of `ifset' that expects a macro name as $[1].
+# So you want a variation of `m4_ifset' that expects a macro name as $[1].
# If this macro is both defined and defined to a non empty value, then
# it runs TRUE etc.
-# ifval(COND, [IF-TRUE], [IF-FALSE])
-# ----------------------------------
+# m4_ifval(COND, [IF-TRUE], [IF-FALSE])
+#--- ----------------------------------
# If COND is not the empty string, expand IF-TRUE, otherwise IF-FALSE.
-# Comparable to ifdef.
-m4_define([ifval], [ifelse([$1], [], [$3], [$2])])
+# Comparable to m4_ifdef.
+m4_define([m4_ifval],
+[ifelse([$1], [], [$3], [$2])])
+
+
+# m4_n(TEXT)
+# ----------
+# If TEXT is not empty, return TEXT and a new line, otherwise nothing.
+m4_define([m4_n],
+[ifelse([$1],
+ [], [],
+ [$1
+])])
-# m4_ifvanl(COND, [IF-TRUE], [IF-FALSE])
+# m4_ifvaln(COND, [IF-TRUE], [IF-FALSE])
# --------------------------------------
-# Same as `ifval', but add an extra newline to IF-TRUE or IF-FALSE
+# Same as `m4_ifval', but add an extra newline to IF-TRUE or IF-FALSE
# unless that argument is empty.
-m4_define([m4_ifvanl], [ifelse([$1], [],
-[ifelse([$3], [], [], [$3
-])],
-[ifelse([$2], [], [], [$2
-])])])
+m4_define([m4_ifvaln],
+[ifelse([$1],
+ [], [m4_n([$3])],
+ [m4_n([$2])])])
-# ifset(MACRO, [IF-TRUE], [IF-FALSE])
-# -----------------------------------
+# m4_ifset(MACRO, [IF-TRUE], [IF-FALSE])
+# --------------------------------------
# If MACRO has no definition, or of its definition is the empty string,
# expand IF-FALSE, otherwise IF-TRUE.
-m4_define([ifset],
-[ifdef([$1],
- [ifelse(m4_defn([$1]), [], [$3], [$2])],
- [$3])])
+m4_define([m4_ifset],
+[m4_ifdef([$1],
+ [ifelse(m4_defn([$1]), [], [$3], [$2])],
+ [$3])])
# ifndef(NAME, [IF-NOT-DEFINED], [IF-DEFINED])
-# --------------------------------------------
-m4_define([ifndef],
-[ifdef([$1], [$3], [$2])])
+# -----------------------------------------------
+m4_define([m4_ifndef],
+[m4_ifdef([$1], [$3], [$2])])
# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
@@ -424,7 +434,8 @@ m4_define([m4_do],
# m4_default(EXP1, EXP2)
# ----------------------
# Returns EXP1 if non empty, otherwise EXP2.
-m4_define([m4_default], [ifval([$1], [$1], [$2])])
+m4_define([m4_default],
+[m4_ifval([$1], [$1], [$2])])
# m4_shiftn(N, ...)
@@ -445,8 +456,8 @@ m4_define([_m4_shiftn],
# _m4_dumpdefs_up(NAME)
# ---------------------
m4_define([_m4_dumpdefs_up],
-[ifdef([$1],
- [m4_pushdef([_m4_dumpdefs], m4_defn([$1]))dnl
+[m4_ifdef([$1],
+ [m4_pushdef([_m4_dumpdefs], m4_defn([$1]))dnl
m4_dumpdef([$1])dnl
m4_popdef([$1])dnl
_m4_dumpdefs_up([$1])])])
@@ -455,8 +466,8 @@ m4_define([_m4_dumpdefs_up],
# _m4_dumpdefs_down(NAME)
# -----------------------
m4_define([_m4_dumpdefs_down],
-[ifdef([_m4_dumpdefs],
- [m4_pushdef([$1], m4_defn([_m4_dumpdefs]))dnl
+[m4_ifdef([_m4_dumpdefs],
+ [m4_pushdef([$1], m4_defn([_m4_dumpdefs]))dnl
m4_popdef([_m4_dumpdefs])dnl
_m4_dumpdefs_down([$1])])])
@@ -636,9 +647,9 @@ m4_define([_m4_foreach],
# If DIVERSION-NAME is the name of a diversion, return its number, otherwise
# return makeNUMBER.
m4_define([_m4_divert],
-[ifdef([_m4_divert($1)],
- [m4_indir([_m4_divert($1)])],
- [$1])])
+[m4_ifdef([_m4_divert($1)],
+ [m4_indir([_m4_divert($1)])],
+ [$1])])
# KILL is only used to suppress output.
m4_define([_m4_divert(KILL)], -1)
@@ -674,8 +685,8 @@ m4_define([m4_divert_push],
# Change the diversion stream to its previous value, unstacking it.
m4_define([m4_divert_pop],
[m4_popdef([_m4_divert_diversion])dnl
-ifndef([_m4_divert_diversion],
- [m4_fatal([too many m4_divert_pop])])dnl
+m4_ifndef([_m4_divert_diversion],
+ [m4_fatal([too many m4_divert_pop])])dnl
m4_divert(_m4_divert_diversion)dnl
])
@@ -1046,11 +1057,11 @@ m4_define([_m4_divert(GROW)], 1000
# -----------------------
# Dump the expansion stack.
m4_define([m4_expansion_stack_dump],
-[ifdef([_m4_expansion_stack],
- [m4_errprintn(m4_defn([_m4_expansion_stack]))dnl
+[m4_ifdef([_m4_expansion_stack],
+ [m4_errprintn(m4_defn([_m4_expansion_stack]))dnl
m4_popdef([_m4_expansion_stack])dnl
m4_expansion_stack_dump()],
- [m4_errprintn(m4_location[: the top level])])])
+ [m4_errprintn(m4_location[: the top level])])])
# _m4_defun_pro(MACRO-NAME)
@@ -1060,9 +1071,9 @@ m4_define([_m4_defun_pro],
[m4_pushdef([_m4_expansion_stack],
m4_defn([m4_location($1)])[: $1 is expanded from...])dnl
m4_pushdef([_m4_expanding($1)])dnl
-ifdef([_m4_divert_dump],
- [m4_divert_push(m4_defn([_m4_divert_diversion]))],
- [m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl
+m4_ifdef([_m4_divert_dump],
+ [m4_divert_push(m4_defn([_m4_divert_diversion]))],
+ [m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl
m4_divert_push([GROW])])dnl
])
@@ -1165,10 +1176,10 @@ m4_define([m4_before],
m4_define([m4_require],
[m4_pushdef([_m4_expansion_stack],
m4_location[: $1 is required by...])dnl
-ifdef([_m4_expanding($1)],
- [m4_fatal([$0: circular dependency of $1])])dnl
-ifndef([_m4_divert_dump],
- [m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl
+m4_ifdef([_m4_expanding($1)],
+ [m4_fatal([$0: circular dependency of $1])])dnl
+m4_ifndef([_m4_divert_dump],
+ [m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl
m4_provide_ifelse([$1],
[],
[m4_divert_push(m4_eval(_m4_divert_diversion - 1))dnl
@@ -1205,8 +1216,8 @@ m4_define([m4_provide],
# check macros which are provided without letting her know how the
# information is coded.
m4_define([m4_provide_ifelse],
-[ifdef([m4_provide($1)],
- [$2], [$3])])
+[m4_ifdef([m4_provide($1)],
+ [$2], [$3])])
## -------------------- ##
@@ -1342,7 +1353,7 @@ m4_define([m4_strip],
# => active
m4_define([m4_append],
[m4_define([$1],
- ifdef([$1], [m4_defn([$1])])[$2])])
+ m4_ifdef([$1], [m4_defn([$1])])[$2])])
# m4_list_append(MACRO-NAME, STRING)
@@ -1350,7 +1361,7 @@ m4_define([m4_append],
# Same as `m4_append', but each element is separated by `, '.
m4_define([m4_list_append],
[m4_define([$1],
- ifdef([$1], [m4_defn([$1]), ])[$2])])
+ m4_ifdef([$1], [m4_defn([$1]), ])[$2])])
# m4_foreach_quoted(VARIABLE, LIST, EXPRESSION)
- 51-m4-if.patch,
Akim Demaille <=