Alexandre Julliard : configure: Add a --with-wine64 option to build a 32-bit Wow64 tree.

Alexandre Julliard julliard at winehq.org
Fri Aug 14 08:59:11 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Aug 13 19:45:31 2009 +0200

configure: Add a --with-wine64 option to build a 32-bit Wow64 tree.

---

 configure    |   46 +++++++++++++++++++++++++++++++++++++---------
 configure.ac |   40 +++++++++++++++++++++++++++++++---------
 2 files changed, 68 insertions(+), 18 deletions(-)

diff --git a/configure b/configure
index 3c3ddf2..8d9f023 100755
--- a/configure
+++ b/configure
@@ -805,6 +805,7 @@ with_xshm
 with_xslt
 with_xxf86vm
 with_wine_tools
+with_wine64
 with_x
 '
       ac_precious_vars='build_alias
@@ -1485,6 +1486,7 @@ Optional Packages:
   --without-xslt          do not use XSLT
   --without-xxf86vm       do not use XFree video mode extension
   --with-wine-tools=DIR   use Wine tools from directory DIR
+  --with-wine64=DIR       use the 64-bit Wine in DIR for a Wow64 build
   --with-x                use the X Window System
 
 Some influential environment variables:
@@ -2710,6 +2712,12 @@ if test "${with_wine_tools+set}" = set; then :
 fi
 
 
+# Check whether --with-wine64 was given.
+if test "${with_wine64+set}" = set; then :
+  withval=$with_wine64;
+fi
+
+
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@@ -3941,7 +3949,7 @@ fi
 
 case $host in
   *-darwin*)
-    if test "x$enable_win64" == "xyes"
+    if test "x$enable_win64" = "xyes"
     then
       CC="$CC -m64"
       CXX="$CXX -m64"
@@ -4052,24 +4060,44 @@ then
     enable_winevdm=${enable_winevdm:-no}
 fi
 
+if test -n "$with_wine64"
+then
+    if test "x$enable_win64" = "xyes"
+    then
+        as_fn_error "--enable-win64 and --with-wine64 are mutually exclusive.
+--enable-win64 should be used in the 64-bit build tree, --with-wine64 in the 32-bit Wow64 build tree." "$LINENO" 5
+    fi
+    enable_fonts=${enable_fonts:-no}
+    enable_include=${enable_include:-no}
+    enable_server=${enable_server:-no}
+    enable_tools=${enable_tools:-no}
+    enable_wineboot=${enable_wineboot:-no}
+    enable_winedbg=${enable_winedbg:-no}
+    test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib32"
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the directory containing the Wine tools" >&5
 $as_echo_n "checking for the directory containing the Wine tools... " >&6; }
 if test "${wine_cv_toolsdir+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$with_wine_tools"; then
+  wine_cv_toolsdir="$with_wine_tools"
+   if test -z "$with_wine_tools"; then
      if test "$cross_compiling" = "yes"; then
        as_fn_error "you must use the --with-wine-tools option when cross-compiling." "$LINENO" 5
-     else
-       wine_cv_toolsdir="\$(TOPOBJDIR)"
+     elif test -n "$with_wine64"; then
+       wine_cv_toolsdir="$with_wine64"
      fi
-   elif test -d "$with_wine_tools/tools/winebuild"; then
-     case $with_wine_tools in
-       /*) wine_cv_toolsdir="$with_wine_tools" ;;
-       *)  wine_cv_toolsdir="\$(TOPOBJDIR)/$with_wine_tools" ;;
+   fi
+   if test -z "$wine_cv_toolsdir"; then
+     wine_cv_toolsdir="\$(TOPOBJDIR)"
+   elif test -d "$wine_cv_toolsdir/tools/winebuild"; then
+     case "$wine_cv_toolsdir" in
+       /*) ;;
+       *)  wine_cv_toolsdir="\$(TOPOBJDIR)/$wine_cv_toolsdir" ;;
      esac
    else
-     as_fn_error "could not find Wine tools in $with_wine_tools." "$LINENO" 5
+     as_fn_error "could not find Wine tools in $wine_cv_toolsdir" "$LINENO" 5
    fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_toolsdir" >&5
diff --git a/configure.ac b/configure.ac
index ef808d8..fb83660 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,7 @@ AC_ARG_WITH(xxf86vm,   AS_HELP_STRING([--without-xxf86vm],[do not use XFree vide
             [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; fi])
 
 AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR]))
+AC_ARG_WITH(wine64,    AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build]))
 
 AC_CANONICAL_HOST
 
@@ -105,7 +106,7 @@ AC_CHECK_TOOL(CPPBIN,cpp,cpp)
 
 case $host in
   *-darwin*)
-    if test "x$enable_win64" == "xyes"
+    if test "x$enable_win64" = "xyes"
     then
       CC="$CC -m64"
       CXX="$CXX -m64"
@@ -174,20 +175,41 @@ then
     enable_winevdm=${enable_winevdm:-no}
 fi
 
+dnl Some special cases for the wow64 build
+if test -n "$with_wine64"
+then
+    if test "x$enable_win64" = "xyes"
+    then
+        AC_MSG_ERROR([--enable-win64 and --with-wine64 are mutually exclusive.
+--enable-win64 should be used in the 64-bit build tree, --with-wine64 in the 32-bit Wow64 build tree.])
+    fi
+    enable_fonts=${enable_fonts:-no}
+    enable_include=${enable_include:-no}
+    enable_server=${enable_server:-no}
+    enable_tools=${enable_tools:-no}
+    enable_wineboot=${enable_wineboot:-no}
+    enable_winedbg=${enable_winedbg:-no}
+    test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib32"
+fi
+
 AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
-  [if test -z "$with_wine_tools"; then
+  [wine_cv_toolsdir="$with_wine_tools"
+   if test -z "$with_wine_tools"; then
      if test "$cross_compiling" = "yes"; then
        AC_MSG_ERROR([you must use the --with-wine-tools option when cross-compiling.])
-     else
-       wine_cv_toolsdir="\$(TOPOBJDIR)"
+     elif test -n "$with_wine64"; then
+       wine_cv_toolsdir="$with_wine64"
      fi
-   elif test -d "$with_wine_tools/tools/winebuild"; then
-     case $with_wine_tools in
-       /*) wine_cv_toolsdir="$with_wine_tools" ;;
-       *)  wine_cv_toolsdir="\$(TOPOBJDIR)/$with_wine_tools" ;;
+   fi
+   if test -z "$wine_cv_toolsdir"; then
+     wine_cv_toolsdir="\$(TOPOBJDIR)"
+   elif test -d "$wine_cv_toolsdir/tools/winebuild"; then
+     case "$wine_cv_toolsdir" in
+       /*) ;;
+       *)  wine_cv_toolsdir="\$(TOPOBJDIR)/$wine_cv_toolsdir" ;;
      esac
    else
-     AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
+     AC_MSG_ERROR([could not find Wine tools in $wine_cv_toolsdir])
    fi])
 AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
 if test -n "$host_alias" -a "$host_alias" != "$build_alias"




More information about the wine-cvs mailing list