From 9ade504d4582b24e266a8f5585e3b1951d8e12b2 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 22 Apr 2011 02:41:24 +0200 Subject: [PATCH] build-sys: Make -isysroot and -mmacosx-version-min configurable --- configure.ac | 16 ++++++++++++---- 1 file 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=], [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=], [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 ;; *) -- 2.7.4