Alexandre Julliard : configure: Make sure that gcc is recent enough for building 64-bit code.
Alexandre Julliard
julliard at winehq.org
Mon Jun 15 07:59:04 CDT 2009
Module: wine
Branch: master
Commit: 8812d241f0fb55293b9559eb3475f24b2f17c590
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8812d241f0fb55293b9559eb3475f24b2f17c590
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sun Jun 14 11:19:54 2009 +0200
configure: Make sure that gcc is recent enough for building 64-bit code.
---
configure | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 8 ++++++++
2 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 3130f70..5b973e4 100755
--- a/configure
+++ b/configure
@@ -3897,6 +3897,58 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
enable_win16=${enable_win16:-yes}
else
+ if test "x${GCC}" = "xyes"
+ then
+ { $as_echo "$as_me:$LINENO: checking whether $CC supports __builtin_ms_va_list" >&5
+$as_echo_n "checking whether $CC supports __builtin_ms_va_list... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+void func(__builtin_ms_va_list *args);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:$LINENO: error: You need gcc >= 4.4 to build Wine as 64-bit." >&5
+$as_echo "$as_me: error: You need gcc >= 4.4 to build Wine as 64-bit." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
TARGETFLAGS="-m64"
fi
diff --git a/configure.ac b/configure.ac
index 4b89c19..48c76fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,6 +139,14 @@ case $host in
AC_SUBST(TARGETFLAGS,"-m32")
enable_win16=${enable_win16:-yes}
else
+ if test "x${GCC}" = "xyes"
+ then
+ AC_MSG_CHECKING([whether $CC supports __builtin_ms_va_list])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>]], [[void func(__builtin_ms_va_list *args);]])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([You need gcc >= 4.4 to build Wine as 64-bit.])])
+ fi
AC_SUBST(TARGETFLAGS,"-m64")
fi
;;
More information about the wine-cvs
mailing list