From: Akim Demaille Date: Tue, 16 Jul 2002 13:37:53 +0000 (+0000) Subject: * lib/autoconf/c.m4 (AC_C_BACKSLASH_A): New. X-Git-Tag: AUTOCONF-2.53b~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=511b66576319c94018e2ea8bc2c7e7a77aee4b9f;p=thirdparty%2Fautoconf.git * lib/autoconf/c.m4 (AC_C_BACKSLASH_A): New. * doc/autoconf.texi (C Compiler): Adjust. --- diff --git a/ChangeLog b/ChangeLog index d1a1db16b..6a08211bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-07-16 Akim Demaille + + * lib/autoconf/c.m4 (AC_C_BACKSLASH_A): New. + * doc/autoconf.texi (C Compiler): Adjust. + 2002-07-09 Akim Demaille * doc/autoconf.texi: Properly set the ``header'' part. diff --git a/NEWS b/NEWS index 1450dcac5..cac2aec52 100644 --- a/NEWS +++ b/NEWS @@ -23,8 +23,10 @@ - AC_PROG_F77 default search no longer includes cf77 and cfg77. - New macros - AC_CONFIG_LIBOBJ_DIR, AC_GNU_SOURCE, AC_PROG_EGREP, AC_PROG_FGREP, - AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU, AC_TYPE_MBSTATE_T. + + AC_C_BACKSLASH_A, AC_CONFIG_LIBOBJ_DIR, AC_GNU_SOURCE, + AC_PROG_EGREP, AC_PROG_FGREP, AC_REPLACE_FNMATCH, + AC_FUNC_FNMATCH_GNU, AC_TYPE_MBSTATE_T. - AC_FUNC_GETLOADAVG looks for getloadavg.c in the CONFIG_LIBOBJ_DIR. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 4f1275df2..691cec2ee 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -4895,6 +4895,12 @@ features. To check for characteristics not listed here, use @code{AC_TRY_COMPILE} (@pxref{Examining Syntax}) or @code{AC_TRY_RUN} (@pxref{Run Time}) +@defmac AC_C_BACKSLASH_A +@acindex HAVE_C_BACKSLASH_A +Define @samp{HAVE_C_BACKSLASH_A} to 1 if the C compiler understands +@samp{\a}. +@end defmac + @defmac AC_C_BIGENDIAN (@ovar{action-if-true}, @ovar{action-if-false}, @ovar{action-if-unknown}) @acindex C_BIGENDIAN @cvindex WORDS_BIGENDIAN diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 405051a7f..dc4821fc5 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -793,6 +793,29 @@ esac AU_DEFUN([AC_PROG_CC_STDC], []) +# AC_C_BACKSLASH_A +# ---------------- +AC_DEFUN([AC_C_BACKSLASH_A], +[ + AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [[ +#if '\a' == 'a' + syntax error; +#endif + char buf['\a' == 'a' ? -1 : 1]; + buf[0] = '\a'; + return buf[0] != "\a"[0]; + ]])], + [ac_cv_c_backslash_a=yes], + [ac_cv_c_backslash_a=no])]) + if test $ac_cv_c_backslash_a = yes; then + AC_DEFINE(HAVE_C_BACKSLASH_A, 1, + [Define if backslash-a works in C strings.]) + fi +]) + + # AC_C_CROSS # ---------- # Has been merged into AC_PROG_CC.