]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Determine whether the C compiler knows about \a.
authorBruno Haible <bruno@clisp.org>
Wed, 23 Aug 2000 21:01:37 +0000 (21:01 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 23 Aug 2000 21:01:37 +0000 (21:01 +0000)
ChangeLog
configure.in
m4/ChangeLog
m4/Makefile.am
m4/c-bs-a.m4 [new file with mode: 0644]

index b60e9cedb158c94f24c76b231b377de0288a2ab0..34d039d02d70a945693923067570433cb3f74a78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-08-23  Bruno Haible  <haible@clisp.cons.org>
+
+       * configure.in: Invoke AC_C_BACKSLASH_A.
+
 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
 
        * Makefile.am (EXTRA_DIST): Add aclocal.sh.
index ebe52aa1ceaa905512502486f700ea5bc320c63d..a7a64787e6c515fd10ebf742af07dae4cc3a9eb6 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.12)
-AC_REVISION($Revision: 1.2 $)
+AC_REVISION($Revision: 1.3 $)
 AC_INIT(src/msgfmt.c)
 AM_INIT_AUTOMAKE(gettext, 0.10.36)
 AM_CONFIG_HEADER(config.h)
@@ -27,6 +27,7 @@ AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_C_INLINE
+AC_C_BACKSLASH_A
 AC_TYPE_OFF_T
 AC_TYPE_SIZE_T
 AM_TYPE_PTRDIFF_T
index 435b3fcfe12d128f6b457c989697055840801e7c..2e66947841051acd4a17afc51b14ea954fa92d4e 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-23  Bruno Haible  <haible@clisp.cons.org>
+
+       * c-bs-a.m4: New file, from sh-utils-2.0j.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
 
        * Makefile.am (EXTRA_DIST): Add codeset.m4, iconv.m4.
index 1d71491fee8b13fdd7ce1d35a4aa8df0ba881395..88175e8f29b0bce260dbf781595116c8276568c2 100644 (file)
@@ -7,4 +7,5 @@ aclocal_DATA = gettext.m4 isc-posix.m4 lcmessage.m4 progtest.m4
 # find . -type f -name '*.m4' -printf '%f\n'|sort |fmt |tr '\012' @ \
 #   |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
 EXTRA_DIST = README \
-codeset.m4 gettext.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4
+c-bs-a.m4 codeset.m4 gettext.m4 iconv.m4 isc-posix.m4 lcmessage.m4 \
+progtest.m4
diff --git a/m4/c-bs-a.m4 b/m4/c-bs-a.m4
new file mode 100644 (file)
index 0000000..d9e6e11
--- /dev/null
@@ -0,0 +1,23 @@
+#serial 3
+
+dnl From Paul Eggert.
+
+AC_DEFUN(AC_C_BACKSLASH_A,
+[
+  AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
+   [AC_TRY_COMPILE([],
+     [
+#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
+])