summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-03-16 17:52:12 -0600
committerEric Blake <eblake@redhat.com>2010-07-02 12:08:20 -0600
commit71972deac8c02dd9eff4e2dd0fc137add0eb8720 (patch)
treeda4be32515c59d69cba8e172531c66ab4f755fdf
parent07263c965a03c979f4712c6c5cfe9243911af0f9 (diff)
downloadautoconf-71972deac8c02dd9eff4e2dd0fc137add0eb8720.tar.gz
Use AS_LITERAL_WORD_IF as appropriate.
* lib/autoconf/autoheader.m4 (AH_VERBATIM): Use new macro. * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE, AC_CACHE_VAL) (AS_CACHE_CHECK, AC_DEFINE_TRACE, _AC_LIBOBJ): Likewise. * lib/autoconf/libs.m4 (AC_CHECK_LIB): Likewise. * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Likewise. * lib/m4sugar/m4sh.m4 (AS_UNSET, AS_VAR_COPY, AS_VAR_GET) (AS_VAR_IF, AS_VAR_SET, AS_VAR_TEST_SET): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
-rw-r--r--ChangeLog9
-rw-r--r--lib/autoconf/autoheader.m42
-rw-r--r--lib/autoconf/general.m410
-rw-r--r--lib/autoconf/libs.m42
-rw-r--r--lib/autoconf/status.m42
-rw-r--r--lib/m4sugar/m4sh.m412
6 files changed, 23 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 354e9486..dc2fa006 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-07-02 Eric Blake <eblake@redhat.com>
+ Use AS_LITERAL_WORD_IF as appropriate.
+ * lib/autoconf/autoheader.m4 (AH_VERBATIM): Use new macro.
+ * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE, AC_CACHE_VAL)
+ (AS_CACHE_CHECK, AC_DEFINE_TRACE, _AC_LIBOBJ): Likewise.
+ * lib/autoconf/libs.m4 (AC_CHECK_LIB): Likewise.
+ * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Likewise.
+ * lib/m4sugar/m4sh.m4 (AS_UNSET, AS_VAR_COPY, AS_VAR_GET)
+ (AS_VAR_IF, AS_VAR_SET, AS_VAR_TEST_SET): Likewise.
+
Add AS_LITERAL_WORD_IF.
* lib/m4sugar/m4sh.m4 (_AS_LITERAL_IF): Also reject shell quoting
characters as non-literal, and provide way to reject space.
diff --git a/lib/autoconf/autoheader.m4 b/lib/autoconf/autoheader.m4
index 920c81f9..f89d042d 100644
--- a/lib/autoconf/autoheader.m4
+++ b/lib/autoconf/autoheader.m4
@@ -45,7 +45,7 @@ m4_define([AH_OUTPUT], [])
#
# Quote for Perl '' strings, which are those used by Autoheader.
m4_define([AH_VERBATIM],
-[AS_LITERAL_IF([$1],
+[AS_LITERAL_WORD_IF([$1],
[AH_OUTPUT(_m4_expand([$1]), AS_ESCAPE([[$2]], [\']))])])
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 666ba561..fc4905b7 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1733,7 +1733,7 @@ AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
# This macro does nothing, it's a hook to be read with `autoconf --trace'.
# It announces FILE is required in the auxdir.
m4_define([AC_REQUIRE_AUX_FILE],
-[AS_LITERAL_IF([$1], [],
+[AS_LITERAL_WORD_IF([$1], [],
[m4_fatal([$0: requires a literal argument])])])
@@ -2008,7 +2008,7 @@ rm -f confcache[]dnl
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
# Should be dnl'ed. Try to catch common mistakes.
m4_defun([AC_CACHE_VAL],
-[AS_LITERAL_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
+[AS_LITERAL_WORD_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
[AC_DIAGNOSE([syntax],
[$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
@@ -2031,7 +2031,7 @@ AS_VAR_SET_IF([$1],
m4_defun([AC_CACHE_CHECK],
[AC_MSG_CHECKING([$1])
AC_CACHE_VAL([$2], [$3])dnl
-AS_LITERAL_IF([$2],
+AS_LITERAL_WORD_IF([$2],
[AC_MSG_RESULT([$$2])],
[AS_VAR_COPY([ac_res], [$2])
AC_MSG_RESULT([$ac_res])])dnl
@@ -2067,7 +2067,7 @@ AS_IDENTIFIER_IF([$1], [],
# This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
# out non literal symbols. CPP-SYMBOL must not include any parameters.
m4_define([AC_DEFINE_TRACE],
-[AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$1]))])])
+[AS_LITERAL_WORD_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$1]))])])
# AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
@@ -2904,7 +2904,7 @@ AC_DEFUN([AC_LIBSOURCES],
# --------------------------------------------
# We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
m4_define([_AC_LIBOBJ],
-[AS_LITERAL_IF([$1],
+[AS_LITERAL_WORD_IF([$1],
[AC_LIBSOURCE([$1.c])],
[$2])dnl
case " $LIB@&t@OBJS " in
diff --git a/lib/autoconf/libs.m4 b/lib/autoconf/libs.m4
index e3fa36db..ec961aad 100644
--- a/lib/autoconf/libs.m4
+++ b/lib/autoconf/libs.m4
@@ -99,7 +99,7 @@ AS_VAR_POPDEF([ac_Search])dnl
# freedom.
AC_DEFUN([AC_CHECK_LIB],
[m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl
-AS_LITERAL_IF([$1],
+AS_LITERAL_WORD_IF([$1],
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])],
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl
AC_CACHE_CHECK([for $2 in -l$1], [ac_Lib],
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index b9e70264..52b7a3d1 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -1102,7 +1102,7 @@ AC_DEFUN([AC_CONFIG_SUBDIRS],
_AC_CONFIG_COMPUTE_DEST(], [))])]dnl
[m4_append([_AC_LIST_SUBDIRS], [$1], [
])]dnl
-[AS_LITERAL_IF([$1], [],
+[AS_LITERAL_WORD_IF([$1], [],
[AC_DIAGNOSE([syntax], [$0: you should use literals])])]dnl
[AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])])
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 41b92f6e..b3c6006a 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -628,7 +628,7 @@ as_unset=as_fn_unset])
# a variable that is not already set. You should not unset MAIL and
# MAILCHECK, as that triggers a bug in Bash 2.01.
m4_defun([AS_UNSET],
-[{ AS_LITERAL_IF([$1], [], [eval ])$1=; unset $1;}])
+[{ AS_LITERAL_WORD_IF([$1], [], [eval ])$1=; unset $1;}])
@@ -1919,7 +1919,7 @@ m4_defun_init([AS_VAR_ARITH],
# Set the polymorphic shell variable DEST to the contents of the polymorphic
# shell variable SOURCE.
m4_define([AS_VAR_COPY],
-[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
+[AS_LITERAL_WORD_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
# AS_VAR_GET(VARIABLE)
@@ -1930,7 +1930,7 @@ m4_define([AS_VAR_COPY],
# This macro is deprecated because it sometimes mishandles trailing newlines;
# use AS_VAR_COPY instead.
m4_define([AS_VAR_GET],
-[AS_LITERAL_IF([$1],
+[AS_LITERAL_WORD_IF([$1],
[$$1],
[`eval 'as_val=${'_AS_ESCAPE([[$1]], [`], [\])'};AS_ECHO(["$as_val"])'`])])
@@ -1940,7 +1940,7 @@ m4_define([AS_VAR_GET],
# Implement a shell `if test $VARIABLE = VALUE; then-else'.
# Polymorphic, and avoids sh expansion error upon interrupt or term signal.
m4_define([AS_VAR_IF],
-[AS_LITERAL_IF([$1],
+[AS_LITERAL_WORD_IF([$1],
[AS_IF([test "x$$1" = x""$2]],
[AS_VAR_COPY([as_val], [$1])
AS_IF([test "x$as_val" = x""$2]]), [$3], [$4])])
@@ -2006,7 +2006,7 @@ m4_pushdef([$1], [$as_[$1]])])])
# expansion of VALUE. VALUE is immune to field splitting and file
# name expansion.
m4_define([AS_VAR_SET],
-[AS_LITERAL_IF([$1],
+[AS_LITERAL_WORD_IF([$1],
[$1=$2],
[eval "$1=AS_ESCAPE([$2])"])])
@@ -2024,7 +2024,7 @@ m4_define([AS_VAR_SET_IF],
# Expands into the `test' expression which is true if VARIABLE
# is set. Polymorphic.
m4_define([AS_VAR_TEST_SET],
-[AS_LITERAL_IF([$1],
+[AS_LITERAL_WORD_IF([$1],
[test "${$1+set}" = set],
[{ as_var=$1; eval "test \"\${$as_var+set}\" = set"; }])])