* doc/autoconf.texi (C Compiler): Adjust.
+2002-07-16 Akim Demaille <akim@epita.fr>
+
+ * lib/autoconf/c.m4 (AC_C_BACKSLASH_A): New.
+ * doc/autoconf.texi (C Compiler): Adjust.
+
2002-07-09 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi: Properly set the ``header'' part.
- 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.
@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
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.