[pulseaudio-discuss] [PATCH 8/8] OSX, configure.ac: Make -isysroot and -mmacosx-version-min configurable

Daniel Mack zonque at gmail.com
Fri Apr 22 05:27:44 PDT 2011


---
 configure.ac |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6f262fb..980d148 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,6 +172,13 @@ AC_ARG_ENABLE(mac-universal,
     AS_HELP_STRING([--enable-mac-universal], [Build Mac universal binaries]),
 		enable_mac_universal=$enableval, enable_mac_universal="no")
 
+AC_ARG_WITH(mac-version-min,
+    AS_HELP_STRING([--with-mac-version-min=<version>], [Defines the earliest version of MacOS X that the executables will run on.]),
+		mac_version_min=$withval, mac_version_min="10.5")
+
+AC_ARG_WITH(mac-sysroot,
+    AS_HELP_STRING([--with-mac-sysroot=<path>], [SDK basedir to use as the logical root directory for headers and libraries.]),
+		mac_sysroot=$withval, mac_sysroot="/Developer/SDKs/MacOSX10.5.sdk")
 
 AC_MSG_CHECKING([target operating system])
 case $host in
@@ -183,12 +190,13 @@ case $host in
             AC_MSG_RESULT([darwin])
             pulse_target_os=darwin
 
+            LDFLAGS="$LDFLAGS -isysroot $mac_sysroot -mmacosx-version-min=$mac_version_min"
+            CFLAGS="$CFLAGS -isysroot $mac_sysroot -mmacosx-version-min=$mac_version_min"
+
             if test "x$enable_mac_universal" = "xyes" ; then
-	        mac_version_min="-mmacosx-version-min=10.5"
                 mac_arches="-arch i386 -arch x86_64"
-                mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
-                LDFLAGS="$LDFLAGS $mac_arches $mac_sysroot $mac_version_min"
-                CFLAGS="$CFLAGS $CFLAGS $mac_arches $mac_sysroot $mac_version_min"
+                LDFLAGS="$LDFLAGS $mac_arches"
+                CFLAGS="$CFLAGS $mac_arches"
             fi
         ;;
         *)
-- 
1.7.1




More information about the pulseaudio-discuss mailing list