Commit 8812d241 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Make sure that gcc is recent enough for building 64-bit code.

parent fd78e6e3
......@@ -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
......
......@@ -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
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment