From b71f83ba6485fd81f91cfe878c69b446bc3af7a2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 16 Jan 2012 16:31:11 +0100 Subject: [PATCH] configure: Disable printf format checking for 64-bit Mingw builds. --- configure | 28 ++++++++++++++++++++++++++++ configure.ac | 5 +++++ 2 files changed, 33 insertions(+) diff --git a/configure b/configure index d6293d2e8ee..ae531d0484f 100755 --- a/configure +++ b/configure @@ -12192,6 +12192,34 @@ if test $ac_cv_cflags__fno_omit_frame_pointer = yes; then : fi ;; esac + case $host in + x86_64-*mingw32*|x86_64-*cygwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wno-format" >&5 +$as_echo_n "checking whether the compiler supports -Wno-format... " >&6; } +if ${ac_cv_cflags__Wno_format+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_wine_try_cflags_saved=$CFLAGS +CFLAGS="$CFLAGS -Wno-format" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(int argc, char **argv) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_cflags__Wno_format=yes +else + ac_cv_cflags__Wno_format=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CFLAGS=$ac_wine_try_cflags_saved +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wno_format" >&5 +$as_echo "$ac_cv_cflags__Wno_format" >&6; } +if test $ac_cv_cflags__Wno_format = yes; then : + EXTRACFLAGS="$EXTRACFLAGS -Wno-format" +fi ;; + esac + saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wpointer-arith -Werror" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken string.h that generates warnings with -Wpointer-arith" >&5 diff --git a/configure.ac b/configure.ac index 8e6d96af2fa..c9f6a63c91f 100644 --- a/configure.ac +++ b/configure.ac @@ -1716,6 +1716,11 @@ then *i[[3456789]]86*) WINE_TRY_CFLAGS([-fno-omit-frame-pointer]) ;; esac + dnl mingw uses Windows 64-bit types, not Unix ones + case $host in + x86_64-*mingw32*|x86_64-*cygwin*) WINE_TRY_CFLAGS([-Wno-format]) ;; + esac + dnl Check for noisy string.h saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wpointer-arith -Werror"