Add flag to enable specifying an architecture to build on Mac. Also add x86_64 architecture to universal build when buildng wxOSX-Cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
80
configure
vendored
80
configure
vendored
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Id.
|
# From configure.in Id: configure.in 65489 2010-09-09 20:59:10Z VZ .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.2.
|
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.2.
|
||||||
#
|
#
|
||||||
@@ -1705,7 +1705,8 @@ Optional Features:
|
|||||||
--enable-permissive compile code disregarding strict ANSI
|
--enable-permissive compile code disregarding strict ANSI
|
||||||
--enable-no_deps create code without dependency information
|
--enable-no_deps create code without dependency information
|
||||||
--disable-vararg_macros don't use vararg macros, even if they are supported
|
--disable-vararg_macros don't use vararg macros, even if they are supported
|
||||||
--enable-universal_binary create Mac PowerPC and Intel Universal binary
|
--enable-universal_binary create universal binary with Mac PPC and i386 (and x86_64 if using Cocoa) architectures
|
||||||
|
--enable-macosx_arch=ARCH build for just the specified architecture
|
||||||
--enable-compat26 enable wxWidgets 2.6 compatibility
|
--enable-compat26 enable wxWidgets 2.6 compatibility
|
||||||
--disable-compat28 disable wxWidgets 2.8 compatibility
|
--disable-compat28 disable wxWidgets 2.8 compatibility
|
||||||
--disable-rpath disable use of rpath for uninstalled builds
|
--disable-rpath disable use of rpath for uninstalled builds
|
||||||
@@ -2989,6 +2990,7 @@ DEFAULT_wxUSE_COMPILER_TLS=auto
|
|||||||
DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
|
DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
|
||||||
|
|
||||||
DEFAULT_wxUSE_UNIVERSAL_BINARY=no
|
DEFAULT_wxUSE_UNIVERSAL_BINARY=no
|
||||||
|
DEFAULT_wxUSE_MAC_ARCH=no
|
||||||
|
|
||||||
DEFAULT_wxUSE_OFFICIAL_BUILD=no
|
DEFAULT_wxUSE_OFFICIAL_BUILD=no
|
||||||
|
|
||||||
@@ -5410,6 +5412,7 @@ fi
|
|||||||
echo "${ECHO_T}$result" >&6; }
|
echo "${ECHO_T}$result" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
enablestring=
|
||||||
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-universal_binary" >&5
|
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-universal_binary" >&5
|
||||||
echo $ECHO_N "checking for --${enablestring:-enable}-universal_binary... $ECHO_C" >&6; }
|
echo $ECHO_N "checking for --${enablestring:-enable}-universal_binary... $ECHO_C" >&6; }
|
||||||
@@ -5431,6 +5434,27 @@ fi
|
|||||||
echo "${ECHO_T}$wxUSE_UNIVERSAL_BINARY" >&6; }
|
echo "${ECHO_T}$wxUSE_UNIVERSAL_BINARY" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
enablestring=
|
||||||
|
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-macosx_arch" >&5
|
||||||
|
echo $ECHO_N "checking for --${enablestring:-enable}-macosx_arch... $ECHO_C" >&6; }
|
||||||
|
# Check whether --enable-macosx_arch was given.
|
||||||
|
if test "${enable_macosx_arch+set}" = set; then
|
||||||
|
enableval=$enable_macosx_arch;
|
||||||
|
wx_cv_use_macosx_arch="wxUSE_MAC_ARCH='$enableval'"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
wx_cv_use_macosx_arch='wxUSE_MAC_ARCH='$DEFAULT_wxUSE_MAC_ARCH
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
eval "$wx_cv_use_macosx_arch"
|
||||||
|
|
||||||
|
{ echo "$as_me:$LINENO: result: $wxUSE_MAC_ARCH" >&5
|
||||||
|
echo "${ECHO_T}$wxUSE_MAC_ARCH" >&6; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
enablestring=
|
||||||
defaultval=
|
defaultval=
|
||||||
@@ -16934,7 +16958,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|||||||
else
|
else
|
||||||
ac_cv_prog_gcc_traditional=no
|
ac_cv_prog_gcc_traditional=no
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f -r conftest*
|
||||||
|
|
||||||
|
|
||||||
if test $ac_cv_prog_gcc_traditional = no; then
|
if test $ac_cv_prog_gcc_traditional = no; then
|
||||||
@@ -16951,7 +16975,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|||||||
$EGREP "$ac_pattern" >/dev/null 2>&1; then
|
$EGREP "$ac_pattern" >/dev/null 2>&1; then
|
||||||
ac_cv_prog_gcc_traditional=yes
|
ac_cv_prog_gcc_traditional=yes
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f -r conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -18548,6 +18572,11 @@ if test "$wxUSE_MAC" = 1; then
|
|||||||
|
|
||||||
retest_macosx_linking=no
|
retest_macosx_linking=no
|
||||||
|
|
||||||
|
OSX_ARCH_OPTS=""
|
||||||
|
if test "x$wxUSE_MAC_ARCH" != xno; then
|
||||||
|
OSX_ARCH_OPTS="-arch $wxUSE_MAC_ARCH"
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
|
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
|
||||||
if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
|
if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
|
||||||
# Implicitly turn on the new --with-macosx-sdk using the default
|
# Implicitly turn on the new --with-macosx-sdk using the default
|
||||||
@@ -18579,12 +18608,15 @@ See \`config.log' for more details." >&2;}
|
|||||||
echo "$as_me: WARNING: Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument" >&2;}
|
echo "$as_me: WARNING: Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument" >&2;}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
OSX_UNIV_OPTS="-arch ppc -arch i386"
|
OSX_ARCH_OPTS="-arch ppc -arch i386"
|
||||||
CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
|
if test "$wxUSE_OSX_COCOA" = 1; then
|
||||||
CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
|
OSX_ARCH_OPTS="$OSX_ARCH_OPTS -arch x86_64"
|
||||||
OBJCXXFLAGS="$OSX_UNIV_OPTS $OBJCXXFLAGS"
|
fi
|
||||||
OBJCFLAGS="$OSX_UNIV_OPTS $OBJCFLAGS"
|
{ echo "$as_me:$LINENO: checking for universal binary architectures" >&5
|
||||||
LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
|
echo $ECHO_N "checking for universal binary architectures... $ECHO_C" >&6; }
|
||||||
|
{ echo "$as_me:$LINENO: result: $OSX_ARCH_OPTS" >&5
|
||||||
|
echo "${ECHO_T}$OSX_ARCH_OPTS" >&6; }
|
||||||
|
|
||||||
retest_macosx_linking=yes
|
retest_macosx_linking=yes
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: WARNING: Disabling precompiled headers due to universal binary build." >&5
|
{ echo "$as_me:$LINENO: WARNING: Disabling precompiled headers due to universal binary build." >&5
|
||||||
@@ -18592,6 +18624,12 @@ echo "$as_me: WARNING: Disabling precompiled headers due to universal binary bui
|
|||||||
bk_use_pch=no
|
bk_use_pch=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CXXFLAGS="$OSX_ARCH_OPTS $CXXFLAGS"
|
||||||
|
CFLAGS="$OSX_ARCH_OPTS $CFLAGS"
|
||||||
|
OBJCXXFLAGS="$OSX_ARCH_OPTS $OBJCXXFLAGS"
|
||||||
|
OBJCFLAGS="$OSX_ARCH_OPTS $OBJCFLAGS"
|
||||||
|
LDFLAGS="$OSX_ARCH_OPTS $LDFLAGS"
|
||||||
|
|
||||||
if test "x$wxUSE_MACOSX_SDK" = "xno"; then
|
if test "x$wxUSE_MACOSX_SDK" = "xno"; then
|
||||||
wxUSE_MACOSX_SDK=
|
wxUSE_MACOSX_SDK=
|
||||||
elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
|
elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
|
||||||
@@ -19560,7 +19598,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|||||||
else
|
else
|
||||||
ac_cv_header_stdc=no
|
ac_cv_header_stdc=no
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f -r conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -19581,7 +19619,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|||||||
else
|
else
|
||||||
ac_cv_header_stdc=no
|
ac_cv_header_stdc=no
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f -r conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -24382,13 +24420,11 @@ _ACEOF
|
|||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <sys/types.h> /* for off_t */
|
#include <stdio.h>
|
||||||
#include <stdio.h>
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
int (*fp) (FILE *, off_t, int) = fseeko;
|
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
|
||||||
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -24428,13 +24464,11 @@ cat confdefs.h >>conftest.$ac_ext
|
|||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#define _LARGEFILE_SOURCE 1
|
#define _LARGEFILE_SOURCE 1
|
||||||
#include <sys/types.h> /* for off_t */
|
#include <stdio.h>
|
||||||
#include <stdio.h>
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
int (*fp) (FILE *, off_t, int) = fseeko;
|
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
|
||||||
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -24481,7 +24515,7 @@ cat >>confdefs.h <<_ACEOF
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
rm -f conftest*
|
rm -f -r conftest*
|
||||||
|
|
||||||
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
|
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
|
||||||
# in glibc 2.1.3, but that breaks too many other things.
|
# in glibc 2.1.3, but that breaks too many other things.
|
||||||
@@ -31191,7 +31225,7 @@ _ACEOF
|
|||||||
eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
|
eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
|
||||||
done
|
done
|
||||||
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
||||||
for ac_extension in a so sl; do
|
for ac_extension in a so sl dylib la dll; do
|
||||||
if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
|
if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
|
||||||
test -f "$ac_im_libdir/libX11.$ac_extension"; then
|
test -f "$ac_im_libdir/libX11.$ac_extension"; then
|
||||||
ac_im_usrlibdir=$ac_im_libdir; break
|
ac_im_usrlibdir=$ac_im_libdir; break
|
||||||
@@ -31344,7 +31378,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
|
|||||||
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
|
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
|
||||||
do
|
do
|
||||||
# Don't even attempt the hair of trying to link an X program!
|
# Don't even attempt the hair of trying to link an X program!
|
||||||
for ac_extension in a so sl; do
|
for ac_extension in a so sl dylib la dll; do
|
||||||
if test -r "$ac_dir/libX11.$ac_extension"; then
|
if test -r "$ac_dir/libX11.$ac_extension"; then
|
||||||
ac_x_libraries=$ac_dir
|
ac_x_libraries=$ac_dir
|
||||||
break 2
|
break 2
|
||||||
|
29
configure.in
29
configure.in
@@ -398,6 +398,7 @@ DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
|
|||||||
|
|
||||||
dnl Mac/Cocoa users need to enable building universal binaries explicitly
|
dnl Mac/Cocoa users need to enable building universal binaries explicitly
|
||||||
DEFAULT_wxUSE_UNIVERSAL_BINARY=no
|
DEFAULT_wxUSE_UNIVERSAL_BINARY=no
|
||||||
|
DEFAULT_wxUSE_MAC_ARCH=no
|
||||||
|
|
||||||
DEFAULT_wxUSE_OFFICIAL_BUILD=no
|
DEFAULT_wxUSE_OFFICIAL_BUILD=no
|
||||||
|
|
||||||
@@ -717,7 +718,9 @@ WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++
|
|||||||
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
|
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
|
||||||
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
|
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
|
||||||
WX_ARG_DISABLE(vararg_macros,[ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS)
|
WX_ARG_DISABLE(vararg_macros,[ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS)
|
||||||
WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary create Mac PowerPC and Intel Universal binary]], wxUSE_UNIVERSAL_BINARY)
|
|
||||||
|
WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary create universal binary with Mac PPC and i386 (and x86_64 if using Cocoa) architectures ]], wxUSE_UNIVERSAL_BINARY)
|
||||||
|
WX_ARG_ENABLE_PARAM(macosx_arch, [[ --enable-macosx_arch=ARCH build for just the specified architecture]], wxUSE_MAC_ARCH)
|
||||||
|
|
||||||
WX_ARG_ENABLE(compat26, [ --enable-compat26 enable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6)
|
WX_ARG_ENABLE(compat26, [ --enable-compat26 enable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6)
|
||||||
WX_ARG_DISABLE(compat28, [ --disable-compat28 disable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8)
|
WX_ARG_DISABLE(compat28, [ --disable-compat28 disable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8)
|
||||||
@@ -1116,6 +1119,11 @@ if test "$wxUSE_MAC" = 1; then
|
|||||||
|
|
||||||
retest_macosx_linking=no
|
retest_macosx_linking=no
|
||||||
|
|
||||||
|
OSX_ARCH_OPTS=""
|
||||||
|
if test "x$wxUSE_MAC_ARCH" != xno; then
|
||||||
|
OSX_ARCH_OPTS="-arch $wxUSE_MAC_ARCH"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Support the old --enable-universal_binary in case anyone was using it.
|
dnl Support the old --enable-universal_binary in case anyone was using it.
|
||||||
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
|
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
|
||||||
dnl --enable-universal_binary uses a default SDK (currently 10.4u)
|
dnl --enable-universal_binary uses a default SDK (currently 10.4u)
|
||||||
@@ -1145,12 +1153,13 @@ dnl Support the old --enable-universal_binary in case anyone was using it.
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
dnl FIXME: I think it would be better to put this into CC, CXX, and LD rather than the flags.
|
dnl FIXME: I think it would be better to put this into CC, CXX, and LD rather than the flags.
|
||||||
OSX_UNIV_OPTS="-arch ppc -arch i386"
|
OSX_ARCH_OPTS="-arch ppc -arch i386"
|
||||||
CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
|
if test "$wxUSE_OSX_COCOA" = 1; then
|
||||||
CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
|
OSX_ARCH_OPTS="$OSX_ARCH_OPTS -arch x86_64"
|
||||||
OBJCXXFLAGS="$OSX_UNIV_OPTS $OBJCXXFLAGS"
|
fi
|
||||||
OBJCFLAGS="$OSX_UNIV_OPTS $OBJCFLAGS"
|
AC_MSG_CHECKING([for universal binary architectures])
|
||||||
LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
|
AC_MSG_RESULT([$OSX_ARCH_OPTS])
|
||||||
|
|
||||||
dnl NOTE: Only the compiler driver needs arch flags. The link editor
|
dnl NOTE: Only the compiler driver needs arch flags. The link editor
|
||||||
dnl is incapable of using them but the compiler driver (which we use
|
dnl is incapable of using them but the compiler driver (which we use
|
||||||
dnl as LD when building dynamic libraries) uses them to invoke the
|
dnl as LD when building dynamic libraries) uses them to invoke the
|
||||||
@@ -1174,6 +1183,12 @@ dnl Support the old --enable-universal_binary in case anyone was using it.
|
|||||||
bk_use_pch=no
|
bk_use_pch=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CXXFLAGS="$OSX_ARCH_OPTS $CXXFLAGS"
|
||||||
|
CFLAGS="$OSX_ARCH_OPTS $CFLAGS"
|
||||||
|
OBJCXXFLAGS="$OSX_ARCH_OPTS $OBJCXXFLAGS"
|
||||||
|
OBJCFLAGS="$OSX_ARCH_OPTS $OBJCFLAGS"
|
||||||
|
LDFLAGS="$OSX_ARCH_OPTS $LDFLAGS"
|
||||||
|
|
||||||
dnl Set up the Mac OS X SDK. We do this early so configure tests will occur
|
dnl Set up the Mac OS X SDK. We do this early so configure tests will occur
|
||||||
dnl with the SDK in place.
|
dnl with the SDK in place.
|
||||||
dnl NOTE: We clobber wxUSE_MACOSX_SDK with the SDK path
|
dnl NOTE: We clobber wxUSE_MACOSX_SDK with the SDK path
|
||||||
|
Reference in New Issue
Block a user