[34314] trunk/base

afb at macports.org afb at macports.org
Thu Feb 21 04:24:41 PST 2008


Revision: 34314
          http://trac.macosforge.org/projects/macports/changeset/34314
Author:   afb at macports.org
Date:     2008-02-21 04:24:40 -0800 (Thu, 21 Feb 2008)

Log Message:
-----------
autoconf all universal options

Modified Paths:
--------------
    trunk/base/aclocal.m4
    trunk/base/configure
    trunk/base/configure.ac
    trunk/base/doc/macports.conf.in

Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4	2008-02-21 12:22:53 UTC (rev 34313)
+++ trunk/base/aclocal.m4	2008-02-21 12:24:40 UTC (rev 34314)
@@ -399,6 +399,47 @@
     AC_SUBST(MPFRAMEWORKSDIR)
 ])
 
+
+# MP_UNIVERSAL_OPTIONS
+#---------------------------------------
+AC_DEFUN([MP_UNIVERSAL_OPTIONS],[
+
+    AC_ARG_WITH(universal-target,[AC_HELP_STRING([--with-universal-target=MDT], [Universal MACOSX_DEPLOYMENT_TARGET version])], UNIVERSAL_TARGET=${withval})
+    AC_ARG_WITH(universal-sysroot,[AC_HELP_STRING([--with-universal-sysroot=SDK], [Universal SDK sysroot (with complete path)])], UNIVERSAL_SYSROOT=${withval})
+    AC_ARG_WITH(universal-archs,[AC_HELP_STRING([--with-universal-archs="CPU"], [Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
+
+	if test "x$UNIVERSAL_TARGET" = "x"; then
+	    if [test -d /Developer/SDKs/MacOSX10.5.sdk]; then
+		UNIVERSAL_TARGET=10.5
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
+	    else
+		UNIVERSAL_TARGET=10.4
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk
+	    fi
+	else
+	    if test "x$UNIVERSAL_SYSROOT" = "x"; then
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${UNIVERSAL_TARGET}.sdk
+	    fi
+	fi
+
+	if test "x$UNIVERSAL_ARCHS" = "x"; then
+		#UNIVERSAL_ARCHS="ppc ppc64 i386 x86_64"
+		UNIVERSAL_ARCHS="ppc i386"
+	fi
+    
+    AC_MSG_CHECKING([for Universal MDT version])
+    AC_MSG_RESULT([$UNIVERSAL_TARGET])
+    AC_SUBST(UNIVERSAL_TARGET)
+
+    AC_MSG_CHECKING([for Universal SDK sysroot])
+    AC_MSG_RESULT([$UNIVERSAL_SYSROOT])
+    AC_SUBST(UNIVERSAL_SYSROOT)
+
+    AC_MSG_CHECKING([for Universal CPU architectures])
+    AC_MSG_RESULT([$UNIVERSAL_ARCHS])
+    AC_SUBST(UNIVERSAL_ARCHS)
+])
+
 # MP_LIB_MD5
 #---------------------------------------
 # Check for an md5 implementation

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2008-02-21 12:22:53 UTC (rev 34313)
+++ trunk/base/configure	2008-02-21 12:24:40 UTC (rev 34314)
@@ -730,6 +730,9 @@
 DSTMODE
 MPAPPLICATIONSDIR
 MPFRAMEWORKSDIR
+UNIVERSAL_TARGET
+UNIVERSAL_SYSROOT
+UNIVERSAL_ARCHS
 CPP
 READLINK_IS_NOT_P1003_1A
 MD5_LIBS
@@ -1400,6 +1403,12 @@
                           Specify directory mode of installed directories
   --with-applications-dir Applications installation directory.
   --with-frameworks-dir   Frameworks installation directory.
+  --with-universal-target=MDT
+                          Universal MACOSX_DEPLOYMENT_TARGET version
+  --with-universal-sysroot=SDK
+                          Universal SDK sysroot (with complete path)
+  --with-universal-archs="CPU"
+                          Universal CPU architectures (space separated)
   --with-x11-prefix=PREFIX
                           use PREFIX as the X11 base dir (default autodetect)
   --with-x                use the X Window System
@@ -6812,6 +6821,66 @@
 
 
 
+# Check for universal options
+
+
+
+# Check whether --with-universal-target was given.
+if test "${with_universal_target+set}" = set; then
+  withval=$with_universal_target; UNIVERSAL_TARGET=${withval}
+fi
+
+
+# Check whether --with-universal-sysroot was given.
+if test "${with_universal_sysroot+set}" = set; then
+  withval=$with_universal_sysroot; UNIVERSAL_SYSROOT=${withval}
+fi
+
+
+# Check whether --with-universal-archs was given.
+if test "${with_universal_archs+set}" = set; then
+  withval=$with_universal_archs; UNIVERSAL_ARCHS=${withval}
+fi
+
+
+	if test "x$UNIVERSAL_TARGET" = "x"; then
+	    if test -d /Developer/SDKs/MacOSX10.5.sdk; then
+		UNIVERSAL_TARGET=10.5
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
+	    else
+		UNIVERSAL_TARGET=10.4
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk
+	    fi
+	else
+	    if test "x$UNIVERSAL_SYSROOT" = "x"; then
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${UNIVERSAL_TARGET}.sdk
+	    fi
+	fi
+
+	if test "x$UNIVERSAL_ARCHS" = "x"; then
+		#UNIVERSAL_ARCHS="ppc ppc64 i386 x86_64"
+		UNIVERSAL_ARCHS="ppc i386"
+	fi
+
+    { echo "$as_me:$LINENO: checking for Universal MDT version" >&5
+echo $ECHO_N "checking for Universal MDT version... $ECHO_C" >&6; }
+    { echo "$as_me:$LINENO: result: $UNIVERSAL_TARGET" >&5
+echo "${ECHO_T}$UNIVERSAL_TARGET" >&6; }
+
+
+    { echo "$as_me:$LINENO: checking for Universal SDK sysroot" >&5
+echo $ECHO_N "checking for Universal SDK sysroot... $ECHO_C" >&6; }
+    { echo "$as_me:$LINENO: result: $UNIVERSAL_SYSROOT" >&5
+echo "${ECHO_T}$UNIVERSAL_SYSROOT" >&6; }
+
+
+    { echo "$as_me:$LINENO: checking for Universal CPU architectures" >&5
+echo $ECHO_N "checking for Universal CPU architectures... $ECHO_C" >&6; }
+    { echo "$as_me:$LINENO: result: $UNIVERSAL_ARCHS" >&5
+echo "${ECHO_T}$UNIVERSAL_ARCHS" >&6; }
+
+
+
 # Check for standard header files.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -13061,6 +13130,9 @@
 DSTMODE!$DSTMODE$ac_delim
 MPAPPLICATIONSDIR!$MPAPPLICATIONSDIR$ac_delim
 MPFRAMEWORKSDIR!$MPFRAMEWORKSDIR$ac_delim
+UNIVERSAL_TARGET!$UNIVERSAL_TARGET$ac_delim
+UNIVERSAL_SYSROOT!$UNIVERSAL_SYSROOT$ac_delim
+UNIVERSAL_ARCHS!$UNIVERSAL_ARCHS$ac_delim
 CPP!$CPP$ac_delim
 READLINK_IS_NOT_P1003_1A!$READLINK_IS_NOT_P1003_1A$ac_delim
 MD5_LIBS!$MD5_LIBS$ac_delim
@@ -13108,7 +13180,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2008-02-21 12:22:53 UTC (rev 34313)
+++ trunk/base/configure.ac	2008-02-21 12:24:40 UTC (rev 34314)
@@ -142,6 +142,9 @@
 MP_PATH_APPLICATIONS
 MP_PATH_FRAMEWORKS
 
+# Check for universal options
+MP_UNIVERSAL_OPTIONS
+
 # Check for standard header files.
 AC_HEADER_STDC
 AC_HEADER_DIRENT

Modified: trunk/base/doc/macports.conf.in
===================================================================
--- trunk/base/doc/macports.conf.in	2008-02-21 12:22:53 UTC (rev 34313)
+++ trunk/base/doc/macports.conf.in	2008-02-21 12:24:40 UTC (rev 34314)
@@ -78,13 +78,13 @@
 # Options for Universal Binaries (+universal variant)
 
 # MACOSX_DEPLOYMENT_TARGET
-universal_target	10.4
+universal_target	@UNIVERSAL_TARGET@
 
 # the SDK "sysroot" to use 
-universal_sysroot	/Developer/SDKs/MacOSX10.4u.sdk
+universal_sysroot	@UNIVERSAL_SYSROOT@
 
 # machine architectures
-universal_archs		ppc i386
+universal_archs		@UNIVERSAL_ARCHS@
 
 # Options for generated startup items
 # startupitem_type may be "default", "systemstarter", "launchd", or "none";

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080221/daa395b5/attachment.html 


More information about the macports-changes mailing list