Files
openwrt-armor-g5/tools/missing-macros/src/m4/mfx_cppflags.m4
domenico 27c9d80f51
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 12:51:15 +02:00

42 lines
997 B
Plaintext

# 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