MacOSX: fix for --with-macosx-sdk
authorDamien Fouilleul <damienf@videolan.org>
Tue, 12 Jun 2007 14:37:15 +0000 (14:37 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Tue, 12 Jun 2007 14:37:15 +0000 (14:37 +0000)
configure.ac

index 5086e77..727b9ed 100644 (file)
@@ -336,12 +336,15 @@ dnl
 AC_ARG_WITH(macosx-sdk,
    [  --with-macosx-sdk       compile with the Mac OS X 10.4u SDK],[], with_macosx_sdk=no)
 if test "${with_macosx_sdk}" != "no" ; then
-    CFLAGS_save="${CFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"; CFLAGS="${CFLAGS_save}"
-    CXXFLAGS_save="${CXXFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"; CXXFLAGS="${CXXFLAGS_save}"
-    OBJCFLAGS_save="${OBJCFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"; OBJCFLAGS="${OBJCFLAGS_save}"
-    LDFLAGS_save="${LDFLAGS_save} -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"; LDFLAGS="${LDFLAGS_save}"
-    export MACOSX_DEPLOYMENT_TARGET=10.4
+    CC="${CC} -isysroot /Developer/SDKs/MacOSX10.4u.sdk" 
+    CXX="${CXX} -isysroot /Developer/SDKs/MacOSX10.4u.sdk" 
+    OBJC="${OBJC} -isysroot /Developer/SDKs/MacOSX10.4u.sdk" 
+    LD="${LD} -syslibroot /Developer/SDKs/MacOSX10.4u.sdk"
+    CFLAGS_save="${CFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.4 -mmacosx-version-min=10.4"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="${CXXFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.4 -mmacosx-version-min=10.4"; CXXFLAGS="${CXXFLAGS_save}"
+    OBJCFLAGS_save="${OBJCFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.4 -mmacosx-version-min=10.4"; OBJCFLAGS="${OBJCFLAGS_save}"
     MACOSX_DEPLOYMENT_TARGET="10.4"
+    export MACOSX_DEPLOYMENT_TARGET
 fi
 
 dnl