Commit 76844337 by Richard Henderson Committed by Richard Henderson

configure.in: Add cpp stringify test.

        * configure.in: Add cpp stringify test.
        * acconfig.h (HAVE_CPP_STRINGIFY): New tag.
        * gengenrtl.c: Use it.
        * configure, config.in: Rebuild.

From-SVN: r17419
parent a3f80023
Mon Jan 19 10:11:52 1998 Richard Henderson <rth@cygnus.com>
* configure.in: Add cpp stringify test.
* acconfig.h (HAVE_CPP_STRINGIFY): New tag.
* gengenrtl.c: Use it.
* configure, config.in: Rebuild.
Mon Jan 19 09:43:15 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile.in (genrtl.c genrtl.h): Add dummy command for GNU make.
......
/* Define if your cpp understands the stringify operator. */
#undef HAVE_CPP_STRINGIFY
/* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
......
/* config.in. Generated automatically from configure.in by autoheader. */
/* Define if your cpp understands the stringify operator. */
#undef HAVE_CPP_STRINGIFY
/* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
......
......@@ -151,6 +151,19 @@ AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h un
AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
# See if the system preprocessor understands the ANSI C preprocessor
# stringification operator.
AC_MSG_CHECKING(whether cpp understands the stringify operator)
AC_CACHE_VAL(gcc_cv_c_have_stringify,
[AC_TRY_COMPILE(,
[#define S(x) #x
char *test = S(foo);],
gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
AC_MSG_RESULT($gcc_cv_c_have_stringify)
if test $gcc_cv_c_have_stringify = yes; then
AC_DEFINE(HAVE_CPP_STRINGIFY)
fi
# Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t.
AC_MSG_CHECKING(for inttypes.h)
......
......@@ -35,7 +35,7 @@ struct rtx_definition
const char *enumname, *name, *format;
};
#ifdef __STDC__
#if defined(HAVE_CPP_STRINGIFY) || (defined(__GNUC__) && defined(__STDC__))
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { # ENUM, NAME, FORMAT },
#else
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { "ENUM", NAME, FORMAT },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment