]> git.saurik.com Git - bison.git/blob - m4/c-bs-a.m4
* data/yacc.c: Guard the declaration of yytoknum also with
[bison.git] / m4 / c-bs-a.m4
1 # c-bs-a.m4 serial 4 (fileutils-4.1.3)
2 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License. As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
8
9 dnl From Paul Eggert.
10
11 AC_DEFUN([AC_C_BACKSLASH_A],
12 [
13 AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
14 [AC_TRY_COMPILE([],
15 [
16 #if '\a' == 'a'
17 syntax error;
18 #endif
19 char buf['\a' == 'a' ? -1 : 1];
20 buf[0] = '\a';
21 return buf[0] != "\a"[0];
22 ],
23 ac_cv_c_backslash_a=yes,
24 ac_cv_c_backslash_a=no)])
25 if test $ac_cv_c_backslash_a = yes; then
26 AC_DEFINE(HAVE_C_BACKSLASH_A, 1,
27 [Define if backslash-a works in C strings.])
28 fi
29 ])