[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_VAR_IF_INDIR => AC_VAR_INDIR_IFELSE
From: |
Akim Demaille |
Subject: |
AC_VAR_IF_INDIR => AC_VAR_INDIR_IFELSE |
Date: |
12 Oct 2000 15:01:39 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* acgeneral.m4 (AC_VAR_IN_INDIR, AC_VAR_IF_SET): Rename as...
(AC_VAR_INDIR_IFELSE, AC_VAR_SET_IFELSE): this.
2000-10-12 Akim Demaille <address@hidden>
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.566
diff -u -r1.566 acgeneral.m4
--- acgeneral.m4 2000/10/12 10:12:43 1.566
+++ acgeneral.m4 2000/10/12 12:51:28
@@ -776,8 +776,8 @@
# TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
# output as is, with no formating.
define([AH_VERBATIM],
-[AC_VAR_IF_INDIR([$1],,
- [AH_OUTPUT([$1], _AC_SH_QUOTE([[$2]]))])
+[AC_VAR_INDIR_IFELSE([$1],,
+ [AH_OUTPUT([$1], _AC_SH_QUOTE([[$2]]))])
])
@@ -946,11 +946,11 @@
# AC_VAR_SET(ac_$var, val)
# and expect the right thing to happen.
-# AC_VAR_IF_INDIR(EXPRESSION, IF-INDIR, IF-NOT-INDIR)
-# ---------------------------------------------------
+# AC_VAR_INDIR_IFELSE(EXPRESSION, IF-INDIR, IF-NOT-INDIR)
+# -------------------------------------------------------
# If EXPRESSION has shell indirections ($var or `expr`), expand
# IF-INDIR, else IF-NOT-INDIR.
-define([AC_VAR_IF_INDIR],
+define([AC_VAR_INDIR_IFELSE],
[ifelse(regexp([$1], [[`$]]),
-1, [$3],
[$2])])
@@ -961,9 +961,9 @@
# If the variable contains indirections (e.g. `ac_cv_func_$ac_func')
# perform whenever possible at m4 level, otherwise sh level.
define([AC_VAR_SET],
-[AC_VAR_IF_INDIR([$1],
- [eval "$1=$2"],
- [$1=$2])])
+[AC_VAR_INDIR_IFELSE([$1],
+ [eval "$1=$2"],
+ [$1=$2])])
# AC_VAR_GET(VARIABLE)
@@ -972,9 +972,9 @@
# Evaluates to $VARIABLE if there are no indirection in VARIABLE,
# else into the appropriate `eval' sequence.
define([AC_VAR_GET],
-[AC_VAR_IF_INDIR([$1],
- [`eval echo '${'patsubst($1, [[\\`]], [\\\&])'}'`],
- [$[]$1])])
+[AC_VAR_INDIR_IFELSE([$1],
+ [`eval echo '${'patsubst($1, [[\\`]], [\\\&])'}'`],
+ [$[]$1])])
# AC_VAR_TEST_SET(VARIABLE)
@@ -982,17 +982,17 @@
# Expands into the `test' expression which is true if VARIABLE
# is set. Polymorphic. Should be dnl'ed.
define([AC_VAR_TEST_SET],
-[AC_VAR_IF_INDIR([$1],
- [eval "test \"\${$1+set}\" = set"],
- [test "${$1+set}" = set])])
+[AC_VAR_INDIR_IFELSE([$1],
+ [eval "test \"\${$1+set}\" = set"],
+ [test "${$1+set}" = set])])
-# AC_VAR_IF_SET(VARIABLE, IF-TRUE, IF-FALSE)
+# AC_VAR_SET_IFELSE(VARIABLE, IF-TRUE, IF-FALSE)
# ------------------------------------------
# Implement a shell `if-then-else' depending whether VARIABLE is set
# or not. Polymorphic.
-define([AC_VAR_IF_SET],
+define([AC_VAR_SET_IFELSE],
[AC_SHELL_IFELSE([AC_VAR_TEST_SET([$1])], [$2], [$3])])
@@ -1028,10 +1028,10 @@
# named VALUE. VALUE does not need to be a valid shell variable name:
# the transliteration is handled here. To be dnl'ed.
define([AC_VAR_PUSHDEF],
-[AC_VAR_IF_INDIR([$2],
-[ac_$1=AC_TR_SH($2)
+[AC_VAR_INDIR_IFELSE([$2],
+ [ac_$1=AC_TR_SH($2)
pushdef([$1], [$ac_[$1]])],
-[pushdef([$1], [AC_TR_SH($2)])])])
+ [pushdef([$1], [AC_TR_SH($2)])])])
# AC_VAR_POPDEF(VARNAME)
@@ -1057,12 +1057,12 @@
# `#define'. sh/m4 polymorphic. Make sure to update the definition
# of `$ac_tr_cpp' if you change this.
define([AC_TR_CPP],
-[AC_VAR_IF_INDIR([$1],
- [`echo "$1" | $ac_tr_cpp`],
- [patsubst(translit([[$1]],
- [*abcdefghijklmnopqrstuvwxyz],
- [PABCDEFGHIJKLMNOPQRSTUVWXYZ]),
- [[^A-Z0-9_]], [_])])])
+[AC_VAR_INDIR_IFELSE([$1],
+ [`echo "$1" | $ac_tr_cpp`],
+ [patsubst(translit([[$1]],
+ [*abcdefghijklmnopqrstuvwxyz],
+ [PABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+ [[^A-Z0-9_]], [_])])])
# AC_TR_SH(EXPRESSION)
@@ -1071,10 +1071,10 @@
# sh/m4 polymorphic.
# Make sure to update the definition of `$ac_tr_sh' if you change this.
define([AC_TR_SH],
-[AC_VAR_IF_INDIR([$1],
- [`echo "$1" | $ac_tr_sh`],
- [patsubst(translit([[$1]], [*+], [pp]),
- [[^a-zA-Z0-9_]], [_])])])
+[AC_VAR_INDIR_IFELSE([$1],
+ [`echo "$1" | $ac_tr_sh`],
+ [patsubst(translit([[$1]], [*+], [pp]),
+ [[^a-zA-Z0-9_]], [_])])])
@@ -2591,9 +2591,9 @@
[AC_DIAGNOSE(syntax,
[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
[where no actions should be taken])])dnl
-AC_VAR_IF_SET([$1],
- [echo $ECHO_N "(cached) $ECHO_C" >&AC_FD_MSG],
- [$2])])
+AC_VAR_SET_IFELSE([$1],
+ [echo $ECHO_N "(cached) $ECHO_C" >&AC_FD_MSG],
+ [$2])])
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
@@ -2977,7 +2977,8 @@
# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
# variables are not a valid argument.
AC_DEFUN([AC_CHECK_MEMBER],
-[AC_VAR_IF_INDIR([$1], [AC_FATAL([$0: requires literal arguments])])dnl
+[AC_VAR_INDIR_IFELSE([$1],
+ [AC_FATAL([$0: requires literal arguments])])dnl
ifelse(regexp([$1], [\.]), -1,
[AC_FATAL([$0: Did not see any dot in `$1'])])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -3718,9 +3719,9 @@
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
# We don't use AC_SUBST/2 because it forces an unneeded eol.
define([_AC_LIBOBJ],
-[AC_VAR_IF_INDIR([$1],
- [$2],
- [AC_LIBOBJ_DECL([$1])])dnl
+[AC_VAR_INDIR_IFELSE([$1],
+ [$2],
+ [AC_LIBOBJ_DECL([$1])])dnl
AC_SUBST([LIBOBJS])dnl
LIBOBJS="$LIBOBJS $1.$ac_objext"])
@@ -3793,7 +3794,8 @@
# AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES])
# --------------------------------------------
AC_DEFUN([AC_CHECK_SIZEOF],
-[AC_VAR_IF_INDIR([$1], [AC_FATAL([$0: requires literal arguments])])dnl
+[AC_VAR_INDIR_IFELSE([$1],
+ [AC_FATAL([$0: requires literal arguments])])dnl
AC_CHECK_TYPE([$1], [], [], [$3])
AC_CACHE_CHECK([size of $1], AC_TR_SH([ac_cv_sizeof_$1]),
[if test "$AC_TR_SH([ac_cv_type_$1])" = yes; then
@@ -4380,9 +4382,9 @@
[_AC_CONFIG_UNIQUE([$1])dnl
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
m4_append([_AC_LIST_SUBDIRS], [ $1])dnl
-AC_VAR_IF_INDIR([$1],
- [AC_DIAGNOSE(syntax,
- [$0: you should use literals])])
+AC_VAR_INDIR_IELSE([$1],
+ [AC_DIAGNOSE(syntax,
+ [$0: you should use literals])])
AC_DIVERT([DEFAULTS], [ac_subdirs_all="$ac_subdirs_all $1"])
AC_SUBST(subdirs, "$subdirs $1")dnl
])
- AC_VAR_IF_INDIR => AC_VAR_INDIR_IFELSE,
Akim Demaille <=