From 2aa8e871d465ff11ddb4c044918d5d73029400f8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 8 Oct 2004 23:39:16 +0000 Subject: [PATCH] Build Wine as 32-bit by default on x86-64, and added a --enable-win64 option for people who want to play with 64-bit support. --- configure | 18 ++++++++++++++++++ configure.ac | 12 ++++++++++++ 2 files changed, 30 insertions(+) diff --git a/configure b/configure index 8bf1dec30a9..2bb7b49d49c 100755 --- a/configure +++ b/configure @@ -863,6 +863,8 @@ Optional Features: --disable-win16 do not include Win16 support --disable-debug compile out all debugging messages --disable-trace compile out TRACE messages + --enable-win64 build a Win64 emulator on AMD64 (won't run Win32 + binaries) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1377,6 +1379,11 @@ if test "${enable_trace+set}" = set; then enableval="$enable_trace" fi; +# Check whether --enable-win64 or --disable-win64 was given. +if test "${enable_win64+set}" = set; then + enableval="$enable_win64" + +fi; # Check whether --with-opengl or --without-opengl was given. @@ -1478,6 +1485,17 @@ host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +case $host in + x86_64*linux*) + if test "x$enable_win64" != "xyes" + then + test -n "$CC" || CC="gcc -m32" + test -n "$LD" || LD="ld -m elf_i386" + test -n "$AS" || AS="as --32" + fi + ;; +esac + echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` diff --git a/configure.ac b/configure.ac index ef88545daf4..00a1f8713ae 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,7 @@ dnl **** Command-line arguments **** AC_ARG_ENABLE(win16, AC_HELP_STRING([--disable-win16],[do not include Win16 support])) AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages])) AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages])) +AC_ARG_ENABLE(win64, AC_HELP_STRING([--enable-win64], [build a Win64 emulator on AMD64 (won't run Win32 binaries)])) AC_ARG_WITH(opengl, AC_HELP_STRING([--without-opengl],[do not use OpenGL])) AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses])) @@ -39,6 +40,17 @@ fi dnl **** Check for some programs **** AC_CANONICAL_HOST +case $host in + x86_64*linux*) + if test "x$enable_win64" != "xyes" + then + test -n "$CC" || CC="gcc -m32" + test -n "$LD" || LD="ld -m elf_i386" + test -n "$AS" || AS="as --32" + fi + ;; +esac + AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_CXX