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.
diff --git a/configure b/configure
index 8bf1dec..2bb7b49 100755
--- a/configure
+++ b/configure
@@ -863,6 +863,8 @@
--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 @@
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_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 ef88545..00a1f87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@
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 @@
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