* added sanity flags for future darwin releases and potentionally fixed OSX SDK suppo...
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 12 Apr 2007 18:44:47 +0000 (18:44 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 12 Apr 2007 18:44:47 +0000 (18:44 +0000)
configure.ac
extras/contrib/bootstrap

index e034994..08294ed 100644 (file)
@@ -289,12 +289,21 @@ dnl
 AC_ARG_WITH(macosx-sdk,
    [  --with-macosx-sdk       compile for Mac OS X 10.3 SDK],[], with_macosx_sdk=no)
 if test "${with_macosx_sdk}" != "no" ; then
-  CFLAGS_save="${CFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk"; CFLAGS="${CFLAGS_save}"
-  CXXFLAGS_save="${CXXFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk"; CXXFLAGS="${CXXFLAGS_save}"
-  OBJCFLAGS_save="${OBJCFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk"; OBJCFLAGS="${OBJCFLAGS_save}"
-  LDFLAGS_save="${LDFLAGS_save} -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk"; LDFLAGS="${LDFLAGS_save}"
-  export MACOSX_DEPLOYMENT_TARGET=10.3
-  MACOSX_DEPLOYMENT_TARGET="10.3"
+    if test "${SYS}" = "darwin" -a "${host_cpu}" = "i686"; 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
+        MACOSX_DEPLOYMENT_TARGET="10.4"
+    elif test "${host_cpu}" = "powerpc"; then
+        CFLAGS_save="${CFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3"; CFLAGS="${CFLAGS_save}"
+        CXXFLAGS_save="${CXXFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3"; CXXFLAGS="${CXXFLAGS_save}"
+        OBJCFLAGS_save="${OBJCFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3"; OBJCFLAGS="${OBJCFLAGS_save}"
+        LDFLAGS_save="${LDFLAGS_save} -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk"; LDFLAGS="${LDFLAGS_save}"
+        export MACOSX_DEPLOYMENT_TARGET=10.3
+        MACOSX_DEPLOYMENT_TARGET="10.3"
+    fi
 fi
 
 dnl
index 26e9e47..2a8a0c1 100755 (executable)
@@ -80,7 +80,7 @@ case $HOST in
            echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak
            echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.3.9.sdk" >> config.mak
            CFLAGS_TUNING=" -arch ppc -mtune=G4"
-           EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
+           EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
            EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
            echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
         cat src/Distributions/darwin.mak >> distro.mak
@@ -92,7 +92,7 @@ case $HOST in
 #          echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak
 #          echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.3.9.sdk" >> config.mak
            CFLAGS_TUNING=" -arch ppc -mtune=G4"
-#          EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
+#          EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
 #          EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
            echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
         cat src/Distributions/darwin.mak >> distro.mak
@@ -105,7 +105,7 @@ case $HOST in
            echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak
            echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.4u.sdk" >> config.mak
            CFLAGS_TUNING=" -march=pentium-m -mtune=prescott"
-           EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
+           EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
            EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
            echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
         cat src/Distributions/darwin.mak >> distro.mak
@@ -118,7 +118,7 @@ case $HOST in
 #          echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak
 #          echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.4u.sdk" >> config.mak
            CFLAGS_TUNING=" -march=pentium-m -mtune=prescott"
-#          EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
+#          EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
 #          EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
            echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
         cat src/Distributions/darwin.mak >> distro.mak