Commit 0ffa68f3 authored by Felix Paul Kühne's avatar Felix Paul Kühne

configure.ac: fixed compilation for iOS by making the OS X SDK options optional

Note that by default, we will compile for the HOST OS instead of OS X 10.6, which is the way it should be.
parent 48b1ad81
...@@ -173,29 +173,34 @@ case "${host_os}" in ...@@ -173,29 +173,34 @@ case "${host_os}" in
AC_LIBOBJ([strnlen])],) AC_LIBOBJ([strnlen])],)
dnl dnl
dnl Check for Mac OS X SDK settings dnl Handle Mac OS X SDK flags
dnl dnl
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])])
test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.6.sdk if test "${with_macosx_sdk}" != "" ; then
test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found]) test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
CPP="${CPP} -isysroot ${with_macosx_sdk}"
CC="${CC} -isysroot ${with_macosx_sdk}"
CXX="${CXX} -isysroot ${with_macosx_sdk}"
OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
LD="${LD} -syslibroot ${with_macosx_sdk}"
fi
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 Mac OS X VERSION and above])])
if test "${with_macosx_version_min}" = "" ; then if test "${with_macosx_version_min}" != "" ; then
with_macosx_version_min=10.5 MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
LD="${LD} -mmacosx_version_min=${with_macosx_version_min}"
CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
export MACOSX_DEPLOYMENT_TARGET
fi fi
MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
CPP="${CPP} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
CC="${CC} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
CXX="${CXX} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
OBJC="${OBJC} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
LD="${LD} -syslibroot ${with_macosx_sdk} -mmacosx_version_min=${with_macosx_version_min}"
CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
export MACOSX_DEPLOYMENT_TARGET
;; ;;
*mingw32* | *cygwin* | *wince* | *mingwce*) *mingw32* | *cygwin* | *wince* | *mingwce*)
AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(WINDRES, windres, :)
......
Markdown is supported
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