diff --git a/aclocal.m4 b/aclocal.m4 index d8d8ed7c..6ef19e1d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -9,7 +9,8 @@ AC_DEFUN(PA_ADD_CFLAGS, CFLAGS="$CFLAGS $1" AC_TRY_LINK([#include ], [printf("Hello, World!\n");], - AC_MSG_RESULT([yes]), + AC_MSG_RESULT([yes]) + CFLAGS="$pa_add_cflags__old_cflags ifelse([$2],[],[$1],[$2])", AC_MSG_RESULT([no]) CFLAGS="$pa_add_cflags__old_cflags")]) diff --git a/configure.in b/configure.in index a4b52d0d..82602c78 100644 --- a/configure.in +++ b/configure.in @@ -189,6 +189,11 @@ PA_ADD_CFLAGS([-W]) PA_ADD_CFLAGS([-Wall]) PA_ADD_CFLAGS([-std=c99]) PA_ADD_CFLAGS([-pedantic]) +dnl Suppress format warning on Windows targets due to their +PA_ADD_CFLAGS([-Wpedantic-ms-format],[-Wno-pedantic-ms-format]) +PA_ADD_CFLAGS([-Wc90-c99-compat]) +PA_ADD_CFLAGS([-Wlong-long],[-Wno-long-long]) +PA_ADD_CFLAGS([-Wwrite-strings]) AC_ARG_ENABLE([werror], [AC_HELP_STRING([--enable-werror], [compile with -Werror to error out on any warning])],