From: Charles Davis Subject: [PATCH] configure: Support 64-bit compilation on Mac OS. Message-Id: <1430371017-79272-1-git-send-email-cdavis5x@gmail.com> Date: Wed, 29 Apr 2015 23:16:57 -0600 --- configure.ac | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 688ab26..4209e90 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,11 @@ case $host in then CC="$CC -m64" CXX="$CXX -m64" + AC_MSG_CHECKING([whether $CC supports __builtin_ms_va_list]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[void func(__builtin_ms_va_list *args);]])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([You need gcc >= 4.4 or clang >= 3.7 to build Wine as 64-bit.])]) host_cpu="x86_64" notice_platform="64-bit " AC_SUBST(TARGETFLAGS,"-m64") @@ -163,7 +168,7 @@ case $host in AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[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.])]) + AC_MSG_ERROR([You need gcc >= 4.4 or clang >= 3.7 to build Wine as 64-bit.])]) fi host_cpu="x86_64" AC_SUBST(TARGETFLAGS,"-m64") @@ -206,7 +211,14 @@ then enable_server=${enable_server:-no} elif test "x$enable_win64" = "xyes" then - test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64" + case $host_os in + darwin*|macosx*) + dnl No separate lib32/lib64 directories on Darwin. + ;; + *) + test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64" + ;; + esac fi AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir, @@ -761,7 +773,7 @@ uninstall:: AC_SUBST(APPLICATIONSERVICES_LIBS,"-framework ApplicationServices") AC_SUBST(CORESERVICES_LIBS,"-framework CoreServices") AC_SUBST(APPKIT_LIBS,"-framework AppKit") - LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist" + LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-pagezero_size,0x1000,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist" WINE_TRY_CFLAGS([-Wl,-no_pie], [LDEXECFLAGS="-Wl,-no_pie $LDEXECFLAGS"]) if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes" -- 2.3.7