Alexandre Julliard : configure: Disable printf format checking for 64-bit Mingw builds.

Alexandre Julliard julliard at winehq.org
Mon Jan 16 13:01:32 CST 2012


Module: wine
Branch: master
Commit: b71f83ba6485fd81f91cfe878c69b446bc3af7a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b71f83ba6485fd81f91cfe878c69b446bc3af7a2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jan 16 16:31:11 2012 +0100

configure: Disable printf format checking for 64-bit Mingw builds.

---

 configure    |   28 ++++++++++++++++++++++++++++
 configure.ac |    5 +++++
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index d6293d2..ae531d0 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 8e6d96a..c9f6a63 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"




More information about the wine-cvs mailing list