autotools: fix detection with clang

This patch improve detection of type of nfq_get_payload() by only
converting to error the warning we have when using the wrong type.
pull/15/merge
Eric Leblond 13 years ago committed by Victor Julien
parent e0ddcdd194
commit adbf85c4a9

@ -557,7 +557,11 @@ AC_INIT(configure.ac)
# check if the argument to nfq_get_payload is signed or unsigned
AC_MSG_CHECKING([for signed nfq_get_payload payload argument])
STORECFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Werror"
if test `basename $CC` = "clang"; then
CFLAGS="${CFLAGS} -Werror=incompatible-pointer-types"
else
CFLAGS="${CFLAGS} -Werror=pointer-sign"
fi
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[
@ -571,7 +575,7 @@ AC_INIT(configure.ac)
[libnetfilter_queue_nfq_get_payload_signed="no"])
AC_MSG_RESULT($libnetfilter_queue_nfq_get_payload_signed)
if test "x$libnetfilter_queue_nfq_get_payload_signed" = "xyes"; then
AC_DEFINE([NFQ_GET_PAYLOAD_SIGNED], [], [For signed version of nfq_get_payload])
AC_DEFINE([NFQ_GET_PAYLOAD_SIGNED], [1], [For signed version of nfq_get_payload])
fi
CFLAGS="${STORECFLAGS}"
;;

Loading…
Cancel
Save