]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
1998-09-27 Ben Elliston <bje@cygnus.com>
authorBen Elliston <bje+keyword+gnu.7caf74@air.net.au>
Sat, 26 Sep 1998 23:28:30 +0000 (23:28 +0000)
committerBen Elliston <bje+keyword+gnu.7caf74@air.net.au>
Sat, 26 Sep 1998 23:28:30 +0000 (23:28 +0000)
* acspecific.m4 (AC_C_STRINGIZE): New macro to test the
availability of the stringizing operator in the C preprocessor.
Contributed by Arnold Robbins <arnold@gnu.org> on behalf of the
GNU AWK project.
* acconfig.h (HAVE_STRINGIZE): Add for the AC_C_STRINGIZE macro.

ChangeLog
acconfig.h
acspecific.m4
lib/autoconf/specific.m4

index 6ff280e16c06be52cb4cb4d990e4491b044e6d4a..9644fc0ac62b36b1b763515f7e77c1f7b86e3684 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,12 @@
 
        * acspecific.m4 (AC_PROG_INSTALL): Substitute `INSTALL_SCRIPT'.
        Contributed by Franc,ois Pinard <pinard@iro.umontreal.ca>.
+       (AC_C_STRINGIZE): New macro to test the availability of the
+       stringizing operator in the C preprocessor. Contributed by Arnold
+       Robbins <arnold@gnu.org> on behalf of the GNU AWK project.
 
+       * acconfig.h (HAVE_STRINGIZE): Add for the AC_C_STRINGIZE macro.
+               
        * testsuite/Makefile.in (check): If DejaGNU is not installed,
        print a warning and skip the `dejacheck' target (which will fail).
        (site.exp): Use tests to guard commands from generating error
index 5bf096c52105354fe7d44299990cf431e4d939b1..dd3a66501f9f4cb73a55520ae7cc92aa1f0f2269 100644 (file)
 /* Define if you have the strftime function.  */
 #undef HAVE_STRFTIME
 
+/* Define if you have the ANSI # stringizing operator in cpp. */
+#undef HAVE_STRINGIZE
+
 /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
 #undef HAVE_SYS_WAIT_H
 
index bb59c63cdbe6c3f4017e439108515c65431b665e..a99aa60fd8719d9626eb29de32ac3cef07dea4f2 100644 (file)
@@ -1768,6 +1768,22 @@ if test $ac_cv_c_const = no; then
 fi
 ])
 
+AC_DEFUN(AC_C_STRINGIZE, [
+AC_REQUIRE([AC_PROG_CPP])
+AC_MSG_CHECKING([for preprocessor stringizing operator])
+AC_CACHE_VAL(ac_cv_c_stringize,
+AC_EGREP_CPP([#teststring],[
+#define x(y) #y
+
+char *s = x(teststring);
+], ac_cv_c_stringize=no, ac_cv_c_stringize=yes))
+if test "${ac_cv_c_stringize}" = yes
+then
+        AC_DEFINE(HAVE_STRINGIZE)
+fi
+AC_MSG_RESULT([${ac_cv_c_stringize}])
+])dnl
+
 define(AC_ARG_ARRAY,
 [errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments
 )m4exit(4)])
index bb59c63cdbe6c3f4017e439108515c65431b665e..a99aa60fd8719d9626eb29de32ac3cef07dea4f2 100644 (file)
@@ -1768,6 +1768,22 @@ if test $ac_cv_c_const = no; then
 fi
 ])
 
+AC_DEFUN(AC_C_STRINGIZE, [
+AC_REQUIRE([AC_PROG_CPP])
+AC_MSG_CHECKING([for preprocessor stringizing operator])
+AC_CACHE_VAL(ac_cv_c_stringize,
+AC_EGREP_CPP([#teststring],[
+#define x(y) #y
+
+char *s = x(teststring);
+], ac_cv_c_stringize=no, ac_cv_c_stringize=yes))
+if test "${ac_cv_c_stringize}" = yes
+then
+        AC_DEFINE(HAVE_STRINGIZE)
+fi
+AC_MSG_RESULT([${ac_cv_c_stringize}])
+])dnl
+
 define(AC_ARG_ARRAY,
 [errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments
 )m4exit(4)])