119 lines
3.2 KiB
Diff
119 lines
3.2 KiB
Diff
diff -urN a/configure.ac b/configure.ac
|
|
--- a/configure.ac 2013-12-26 18:46:51.191780100 +0000
|
|
+++ b/configure.ac 2013-12-26 18:46:56.035057100 +0000
|
|
@@ -365,6 +365,7 @@
|
|
then
|
|
# avoid using uname for cross builds
|
|
if test "$cross_compiling" = yes; then
|
|
+ ac_sys_release=
|
|
# ac_sys_system and ac_sys_release are used for setting
|
|
# a lot of different things including 'define_xopen_source'
|
|
# in the case statement below.
|
|
@@ -375,12 +376,32 @@
|
|
*-*-cygwin*)
|
|
ac_sys_system=Cygwin
|
|
;;
|
|
+ *-*-darwin*)
|
|
+ ac_sys_system=Darwin
|
|
+ ac_sys_release=$(echo $host | sed -n 's/.*-[^0-9]\+\([0-9]\+\)/\1/p')
|
|
+ if test -z "$ac_sys_release"; then
|
|
+ # A reasonable default.
|
|
+ ac_sys_release=11
|
|
+ fi
|
|
+ # Use the last released version number for old versions.
|
|
+ if test "$ac_sys_release" = "9" ; then
|
|
+ ac_sys_release=9.8
|
|
+ elif test "$ac_sys_release" = "10" ; then
|
|
+ ac_sys_release=10.8
|
|
+ elif test "$ac_sys_release" = "11" ; then
|
|
+ ac_sys_release=11.4.0
|
|
+ elif test "$ac_sys_release" = "12" ; then
|
|
+ ac_sys_release=12.0.0
|
|
+ else
|
|
+ # ..and .0.0 for unknown versions.
|
|
+ ac_sys_release=${ac_sys_release}.0.0
|
|
+ fi
|
|
+ ;;
|
|
*)
|
|
# for now, limit cross builds to known configurations
|
|
MACHDEP="unknown"
|
|
AC_MSG_ERROR([cross build not supported for $host])
|
|
esac
|
|
- ac_sys_release=
|
|
else
|
|
ac_sys_system=`uname -s`
|
|
if test "$ac_sys_system" = "AIX" \
|
|
@@ -423,6 +444,9 @@
|
|
*-*-mingw*)
|
|
_host_cpu=
|
|
;;
|
|
+ *-*-darwin*)
|
|
+ _host_cpu=
|
|
+ ;;
|
|
*)
|
|
# for now, limit cross builds to known configurations
|
|
MACHDEP="unknown"
|
|
@@ -1185,6 +1209,26 @@
|
|
|
|
AC_SUBST(BASECFLAGS)
|
|
|
|
+if test "x$cross_compiling" = xyes; then
|
|
+ function cross_arch
|
|
+ {
|
|
+ case $host in
|
|
+ x86_64*darwin*)
|
|
+ echo i386
|
|
+ ;;
|
|
+ x86_64*)
|
|
+ echo x86_64
|
|
+ ;;
|
|
+ *)
|
|
+ echo i386
|
|
+ ;;
|
|
+ esac
|
|
+ }
|
|
+ ARCH_PROG=cross_arch
|
|
+else
|
|
+ ARCH_PROG=/usr/bin/arch
|
|
+fi
|
|
+
|
|
# The -arch flags for universal builds on OSX
|
|
UNIVERSAL_ARCH_FLAGS=
|
|
AC_SUBST(UNIVERSAL_ARCH_FLAGS)
|
|
@@ -1348,7 +1392,7 @@
|
|
cur_target='10.5'
|
|
fi
|
|
else
|
|
- if test `/usr/bin/arch` = "i386"; then
|
|
+ if test "$($ARCH_PROG)" = "i386"; then
|
|
# On Intel macs default to a deployment
|
|
# target of 10.4, that's the first OSX
|
|
# release with Intel support.
|
|
@@ -1931,7 +1975,7 @@
|
|
if test "${enable_universalsdk}"; then
|
|
:
|
|
else
|
|
- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
|
|
+ LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only $($ARCH_PROG)"
|
|
fi
|
|
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
|
|
LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
|
|
@@ -1956,7 +2000,7 @@
|
|
]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
|
|
|
|
if test "${ac_osx_32bit}" = "yes"; then
|
|
- case `/usr/bin/arch` in
|
|
+ case $($ARCH_PROG) in
|
|
i386)
|
|
MACOSX_DEFAULT_ARCH="i386"
|
|
;;
|
|
@@ -1968,7 +2012,7 @@
|
|
;;
|
|
esac
|
|
else
|
|
- case `/usr/bin/arch` in
|
|
+ case $($ARCH_PROG) in
|
|
i386)
|
|
MACOSX_DEFAULT_ARCH="x86_64"
|
|
;;
|