diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-12-22 01:21:06 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-12-22 01:21:06 +0000 |
commit | 2c125b87a79c02d2caafb16c860d6ad507729f5d (patch) | |
tree | dff96fee1cdf140ee94f458cf4bc5dd5c1b1efef /tools/missing-macros/src/m4/mfx_cppflags.m4 | |
parent | fcc8d6c33fc6650138ade9e86910f44687be9d91 (diff) | |
download | master-31e0f0ae-2c125b87a79c02d2caafb16c860d6ad507729f5d.tar.gz master-31e0f0ae-2c125b87a79c02d2caafb16c860d6ad507729f5d.tar.bz2 master-31e0f0ae-2c125b87a79c02d2caafb16c860d6ad507729f5d.zip |
missing-macros: add missing serial numbers, split acc.m4 into mfx_acc.m4, mfx_cppflags.m4 and mfx_limits.m4
SVN-Revision: 24763
Diffstat (limited to 'tools/missing-macros/src/m4/mfx_cppflags.m4')
-rw-r--r-- | tools/missing-macros/src/m4/mfx_cppflags.m4 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/missing-macros/src/m4/mfx_cppflags.m4 b/tools/missing-macros/src/m4/mfx_cppflags.m4 new file mode 100644 index 0000000000..0ad9141c84 --- /dev/null +++ b/tools/missing-macros/src/m4/mfx_cppflags.m4 @@ -0,0 +1,41 @@ +# serial 1 + +AC_DEFUN([mfx_PROG_CPPFLAGS], [ +AC_MSG_CHECKING([whether the C preprocessor needs special flags]) + +AC_LANG_CONFTEST([AC_LANG_PROGRAM( +[[#include <limits.h> +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) +# include "your C preprocessor is broken 1" +#elif (0xffffu == 0xfffffffful) +# include "your C preprocessor is broken 2" +#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) +# include "your C preprocessor is broken 3" +#endif +]], [[ ]] +)]) + +mfx_save_CPPFLAGS=$CPPFLAGS +mfx_tmp=ERROR +for mfx_arg in "" -no-cpp-precomp +do + CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" + _AC_COMPILE_IFELSE([], +[mfx_tmp=$mfx_arg +break]) +done +CPPFLAGS=$mfx_save_CPPFLAGS +rm -f conftest.$ac_ext conftest.$ac_objext +case x$mfx_tmp in + x) + AC_MSG_RESULT([none needed]) ;; + xERROR) + AC_MSG_RESULT([ERROR]) + AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) + ;; + *) + AC_MSG_RESULT([$mfx_tmp]) + CPPFLAGS="$mfx_tmp $CPPFLAGS" + ;; +esac +])# mfx_PROG_CPPFLAGS |