1 dnl --------------------------------------------------------------------------
4 dnl Attempt to add the given option to CFLAGS, if it doesn't break compilation
5 dnl --------------------------------------------------------------------------
6 AC_DEFUN(PA_ADD_CFLAGS,
7 [AC_MSG_CHECKING([if $CC accepts $1])
8 pa_add_cflags__old_cflags="$CFLAGS"
10 AC_TRY_LINK([#include <stdio.h>],
11 [printf("Hello, World!\n");],
14 CFLAGS="$pa_add_cflags__old_cflags")])
16 dnl --------------------------------------------------------------------------
17 dnl PA_WORKING_STDBOOL
19 dnl See if we have a working <stdbool.h> and bool support; in particular,
20 dnl OpenWatcom 1.8 has a broken _Bool type that we don't want to use.
21 dnl --------------------------------------------------------------------------
22 AC_DEFUN(PA_WORKING_BOOL,
23 [AC_MSG_CHECKING([if $CC has a working bool type])
29 int foo(bool x, int y)
35 AC_DEFINE(HAVE_WORKING_BOOL, 1,
36 [Define to 1 if your compiler has a correct implementation of bool])],
37 [AC_MSG_RESULT([no])])