diff options
author | Eric Blake <eblake@redhat.com> | 2010-02-23 10:57:38 -0700 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2010-02-23 10:57:38 -0700 |
commit | 801e7da121dc91ff6b0602ae68a10d910914e7d9 (patch) | |
tree | 5d380d2011f5c553b159805ef5f7d9b5b617a884 /m4/warn-on-use.m4 | |
parent | 06e606ded42cacc1bd5397e69f51d9a8aee80928 (diff) | |
download | gnulib-801e7da121dc91ff6b0602ae68a10d910914e7d9.tar.gz |
warn-on-use: work with old autoconf
Before autoconf documented the AS_VAR_* interfaces, it used to
require the user to pre-expand the pushed macro name. Newer
autoconf can see through macros, but this is one case where
breaking the rule of thumb and underquoting does not hurt.
* m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Accomodate older
AS_VAR semantics of autoconf 2.60.
Reported by Bruno Haible.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'm4/warn-on-use.m4')
-rw-r--r-- | m4/warn-on-use.m4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4 index ab46422bab..42daae87b8 100644 --- a/m4/warn-on-use.m4 +++ b/m4/warn-on-use.m4 @@ -1,4 +1,4 @@ -# warn-on-use.m4 serial 1 +# warn-on-use.m4 serial 2 dnl Copyright (C) 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -30,12 +30,12 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE], for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], - [gl_Symbol], + gl_Symbol, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], - [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])]) - AS_VAR_IF([gl_Symbol], [yes], + [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) + AS_VAR_IF(gl_Symbol, [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts |