[vlc-commits] configure.ac: fixed compilation for iOS by making the OS X SDK options optional

Felix Paul Kühne git at videolan.org
Sat Jul 14 17:17:01 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jul 13 16:32:46 2012 +0200| [0ffa68f3176bfe6cf4fb301a0233612fcb5c784b] | committer: 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ffa68f3176bfe6cf4fb301a0233612fcb5c784b
---

 configure.ac |   37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1861e90..a10659c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,29 +173,34 @@ case "${host_os}" in
             AC_LIBOBJ([strnlen])],)
 
     dnl
-    dnl  Check for Mac OS X SDK settings
+    dnl  Handle Mac OS X SDK flags
     dnl
     AC_ARG_WITH(macosx-sdk,
       [AS_HELP_STRING([--with-macosx-sdk=DIR],
         [compile using the SDK in DIR])])
-    test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.6.sdk
-    test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
+    if test "${with_macosx_sdk}" != "" ; then
+        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,
       [AS_HELP_STRING([--with-macosx-version-min=VERSION],
-        [compile for MacOS X VERSION and above])])
-    if test "${with_macosx_version_min}" = "" ; then
-       with_macosx_version_min=10.5
+        [compile for Mac OS X VERSION and above])])
+    if test "${with_macosx_version_min}" != "" ; then
+        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
-    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*)
     AC_CHECK_TOOL(WINDRES, windres, :)



More information about the vlc-commits mailing list