* Checks that the SDK specified with --enable-universalsk=VALUE exists.

* Fall back to the default system SDK when specifying --enable-universalsk
  without a value and the 10.4u SDK is not avaiable.

Port of fix for issue 4834 from the trunk.
This commit is contained in:
Ronald Oussoren 2010-02-07 12:03:42 +00:00
parent 9812a6cf24
commit 8af24c111b
2 changed files with 38 additions and 1 deletions

23
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.in Revision: 77862 . # From configure.in Revision: 78066 .
# 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 python 3.2. # Generated by GNU Autoconf 2.61 for python 3.2.
# #
@ -1886,12 +1886,18 @@ define_xopen_source=yes
CONFIG_ARGS="$ac_configure_args" CONFIG_ARGS="$ac_configure_args"
{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
# Check whether --enable-universalsdk was given. # Check whether --enable-universalsdk was given.
if test "${enable_universalsdk+set}" = set; then if test "${enable_universalsdk+set}" = set; then
enableval=$enable_universalsdk; enableval=$enable_universalsdk;
case $enableval in case $enableval in
yes) yes)
enableval=/Developer/SDKs/MacOSX10.4u.sdk enableval=/Developer/SDKs/MacOSX10.4u.sdk
if test ! -d "${enableval}"
then
enableval=/
fi
;; ;;
esac esac
case $enableval in case $enableval in
@ -1901,9 +1907,16 @@ if test "${enable_universalsdk+set}" = set; then
;; ;;
*) *)
UNIVERSALSDK=$enableval UNIVERSALSDK=$enableval
if test ! -d "${UNIVERSALSDK}"
then
{ { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
{ (exit 1); exit 1; }; }
fi
;; ;;
esac esac
else else
UNIVERSALSDK= UNIVERSALSDK=
@ -1911,6 +1924,14 @@ else
fi fi
if test -n "${UNIVERSALSDK}"
then
{ echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi

View File

@ -86,12 +86,17 @@ define_xopen_source=yes
AC_SUBST(CONFIG_ARGS) AC_SUBST(CONFIG_ARGS)
CONFIG_ARGS="$ac_configure_args" CONFIG_ARGS="$ac_configure_args"
AC_MSG_CHECKING([for --enable-universalsdk])
AC_ARG_ENABLE(universalsdk, AC_ARG_ENABLE(universalsdk,
AC_HELP_STRING(--enable-universalsdk@<:@=SDKDIR@:>@, Build against Mac OS X 10.4u SDK (ppc/i386)), AC_HELP_STRING(--enable-universalsdk@<:@=SDKDIR@:>@, Build against Mac OS X 10.4u SDK (ppc/i386)),
[ [
case $enableval in case $enableval in
yes) yes)
enableval=/Developer/SDKs/MacOSX10.4u.sdk enableval=/Developer/SDKs/MacOSX10.4u.sdk
if test ! -d "${enableval}"
then
enableval=/
fi
;; ;;
esac esac
case $enableval in case $enableval in
@ -101,12 +106,23 @@ AC_ARG_ENABLE(universalsdk,
;; ;;
*) *)
UNIVERSALSDK=$enableval UNIVERSALSDK=$enableval
if test ! -d "${UNIVERSALSDK}"
then
AC_MSG_ERROR([--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}])
fi
;; ;;
esac esac
],[ ],[
UNIVERSALSDK= UNIVERSALSDK=
enable_universalsdk= enable_universalsdk=
]) ])
if test -n "${UNIVERSALSDK}"
then
AC_MSG_RESULT(${UNIVERSALSDK})
else
AC_MSG_RESULT(no)
fi
AC_SUBST(UNIVERSALSDK) AC_SUBST(UNIVERSALSDK)
AC_SUBST(ARCH_RUN_32BIT) AC_SUBST(ARCH_RUN_32BIT)