New module 'mbfile'.
[gnulib.git] / m4 / c-bs-a.m4
1 # c-bs-a.m4 serial 5
2
3 # Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # From Paul Eggert.
9
10 AC_DEFUN([AC_C_BACKSLASH_A],
11 [
12   AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
13    [AC_TRY_COMPILE([],
14      [
15 #if '\a' == 'a'
16       syntax error;
17 #endif
18       char buf['\a' == 'a' ? -1 : 1];
19       buf[0] = '\a';
20       return buf[0] != "\a"[0];
21      ],
22      ac_cv_c_backslash_a=yes,
23      ac_cv_c_backslash_a=no)])
24   if test $ac_cv_c_backslash_a = yes; then
25     AC_DEFINE(HAVE_C_BACKSLASH_A, 1,
26       [Define if backslash-a works in C strings.])
27   fi
28 ])