Commit 72558280 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

OSX: factorize, abort early if SDK not found

parent bf4764ea
...@@ -201,22 +201,13 @@ case "${host_os}" in ...@@ -201,22 +201,13 @@ case "${host_os}" in
AC_ARG_WITH(macosx-sdk, AC_ARG_WITH(macosx-sdk,
[AS_HELP_STRING([--with-macosx-sdk=DIR], [AS_HELP_STRING([--with-macosx-sdk=DIR],
[compile using the SDK in DIR])]) [compile using the SDK in DIR])])
if test "${with_macosx_sdk}" != "" ; then test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.5.sdk
! test -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
CPP="${CPP} -isysroot ${with_macosx_sdk}" CPP="${CPP} -isysroot ${with_macosx_sdk}"
CC="${CC} -isysroot ${with_macosx_sdk}" CC="${CC} -isysroot ${with_macosx_sdk}"
CXX="${CXX} -isysroot ${with_macosx_sdk}" CXX="${CXX} -isysroot ${with_macosx_sdk}"
OBJC="${OBJC} -isysroot ${with_macosx_sdk}" OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
LD="${LD} -syslibroot ${with_macosx_sdk}" LD="${LD} -syslibroot ${with_macosx_sdk}"
echo " No desired SDK version given, falling back to 10.5"
CPP="${CPP} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
CC="${CC} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
CXX="${CXX} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
OBJC="${OBJC} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
LD="${LD} -syslibroot /Developer/SDKs/MacOSX10.5.sdk"
echo " Assuming --with-macosx-version-min=10.5"
AC_ARG_WITH(macosx-version-min, AC_ARG_WITH(macosx-version-min,
[AS_HELP_STRING([--with-macosx-version-min=VERSION], [AS_HELP_STRING([--with-macosx-version-min=VERSION],
[compile for MacOS X VERSION and above])]) [compile for MacOS X VERSION and above])])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment