[tools] missing-macros: extend fake-gtk-doc-check.m4 (fixes autoreconf in orbit2...
[openwrt.git] / tools / missing-macros / src / m4 / mfx_cppflags.m4
1 # serial 1
2
3 AC_DEFUN([mfx_PROG_CPPFLAGS], [
4 AC_MSG_CHECKING([whether the C preprocessor needs special flags])
5
6 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
7 [[#include <limits.h>
8 #if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
9 # include "your C preprocessor is broken 1"
10 #elif (0xffffu == 0xfffffffful)
11 # include "your C preprocessor is broken 2"
12 #elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
13 # include "your C preprocessor is broken 3"
14 #endif
15 ]], [[ ]]
16 )])
17
18 mfx_save_CPPFLAGS=$CPPFLAGS
19 mfx_tmp=ERROR
20 for mfx_arg in "" -no-cpp-precomp
21 do
22 CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
23 _AC_COMPILE_IFELSE([],
24 [mfx_tmp=$mfx_arg
25 break])
26 done
27 CPPFLAGS=$mfx_save_CPPFLAGS
28 rm -f conftest.$ac_ext conftest.$ac_objext
29 case x$mfx_tmp in
30 x)
31 AC_MSG_RESULT([none needed]) ;;
32 xERROR)
33 AC_MSG_RESULT([ERROR])
34 AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
35 ;;
36 *)
37 AC_MSG_RESULT([$mfx_tmp])
38 CPPFLAGS="$mfx_tmp $CPPFLAGS"
39 ;;
40 esac
41 ])# mfx_PROG_CPPFLAGS
This page took 0.046838 seconds and 5 git commands to generate.