[26709] trunk/base

source_changes at macosforge.org source_changes at macosforge.org
Wed Jul 4 13:37:53 PDT 2007


Revision: 26709
          http://trac.macosforge.org/projects/macports/changeset/26709
Author:   landonf at macports.org
Date:     2007-07-04 13:37:52 -0700 (Wed, 04 Jul 2007)

Log Message:
-----------
Avoid modifying CPPFLAGS/LDFLAGS directly when checking for Foundation.
Submitted by: afb at macports.org

Modified Paths:
--------------
    trunk/base/Mk/macports.autoconf.mk.in
    trunk/base/configure
    trunk/base/foundation.m4
    trunk/base/src/tclobjc1.0/Makefile.in

Modified: trunk/base/Mk/macports.autoconf.mk.in
===================================================================
--- trunk/base/Mk/macports.autoconf.mk.in	2007-07-04 20:14:36 UTC (rev 26708)
+++ trunk/base/Mk/macports.autoconf.mk.in	2007-07-04 20:37:52 UTC (rev 26709)
@@ -20,6 +20,11 @@
 OBJC_RUNTIME_FLAGS	= @OBJC_RUNTIME_FLAGS@
 OBJC_LIBS		= @OBJC_LIBS@
 
+OBJC_FOUNDATION		= @OBJC_FOUNDATION@
+OBJC_FOUNDATION_CPPFLAGS	= @OBJC_FOUNDATION_CPPFLAGS@
+OBJC_FOUNDATION_LDFLAGS	= @OBJC_FOUNDATION_LDFLAGS@
+OBJC_FOUNDATION_LIBS		= @OBJC_FOUNDATION_LIBS@
+
 TCL_CC			= @TCL_CC@
 SHLIB_LD		= @SHLIB_LD@
 LDFLAGS_LIBCURL		= @LDFLAGS_LIBCURL@

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2007-07-04 20:14:36 UTC (rev 26708)
+++ trunk/base/configure	2007-07-04 20:37:52 UTC (rev 26709)
@@ -703,6 +703,10 @@
 OBJC_LIBS
 OBJC_PTHREAD_LIBS
 OBJC_PTHREAD_CFLAGS
+OBJC_FOUNDATION
+OBJC_FOUNDATION_LDFLAGS
+OBJC_FOUNDATION_CPPFLAGS
+OBJC_FOUNDATION_LIBS
 HAVE_FRAMEWORK_COREFOUNDATION
 HAVE_FRAMEWORK_SYSTEMCONFIGURATION
 HAVE_FRAMEWORK_IOKIT
@@ -5386,8 +5390,9 @@
 	# NeXT Foundation is prefered
 	if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
 		OBJC_FOUNDATION="Apple"
-		CPPFLAGS="${APPLE_FOUNDATION_CPPFLAGS} ${CPPFLAGS}"
-		LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
+		OBJC_FOUNDATION_CPPFLAGS="${APPLE_FOUNDATION_CFLAGS}"
+		OBJC_FOUNDATION_LIBS="${APPLE_FOUNDATION_LIBS}"
+		OBJC_FOUNDATION_LDFLAGS=""
 
 cat >>confdefs.h <<\_ACEOF
 #define APPLE_FOUNDATION 1
@@ -5397,9 +5402,9 @@
 echo "$as_me: Using Apple Foundation library" >&6;}
 	elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
 		OBJC_FOUNDATION="GNUstep"
-		CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
-		LIBS="${GNUSTEP_LIBS} ${LIBS}"
-		LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
+		OBJC_FOUNDATION_CPPFLAGS="${GNUSTEP_CPPFLAGS}"
+		OBJC_FOUNDATION_LIBS="${GNUSTEP_LIBS}"
+		OBJC_FOUNDATION_LDFLAGS="${GNUSTEP_LDFLAGS}"
 
 cat >>confdefs.h <<\_ACEOF
 #define GNUSTEP_FOUNDATION 1
@@ -5413,6 +5418,11 @@
    { (exit 1); exit 1; }; }
 	fi
 
+
+
+
+
+
 	ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -11967,16 +11977,16 @@
 OBJC_LIBS!$OBJC_LIBS$ac_delim
 OBJC_PTHREAD_LIBS!$OBJC_PTHREAD_LIBS$ac_delim
 OBJC_PTHREAD_CFLAGS!$OBJC_PTHREAD_CFLAGS$ac_delim
+OBJC_FOUNDATION!$OBJC_FOUNDATION$ac_delim
+OBJC_FOUNDATION_LDFLAGS!$OBJC_FOUNDATION_LDFLAGS$ac_delim
+OBJC_FOUNDATION_CPPFLAGS!$OBJC_FOUNDATION_CPPFLAGS$ac_delim
+OBJC_FOUNDATION_LIBS!$OBJC_FOUNDATION_LIBS$ac_delim
 HAVE_FRAMEWORK_COREFOUNDATION!$HAVE_FRAMEWORK_COREFOUNDATION$ac_delim
 HAVE_FRAMEWORK_SYSTEMCONFIGURATION!$HAVE_FRAMEWORK_SYSTEMCONFIGURATION$ac_delim
 HAVE_FRAMEWORK_IOKIT!$HAVE_FRAMEWORK_IOKIT$ac_delim
 HAVE_FUNCTION_CFNOTIFICATIONCENTERGETDARWINNOTIFYCENTER!$HAVE_FUNCTION_CFNOTIFICATIONCENTERGETDARWINNOTIFYCENTER$ac_delim
 REPLACEMENT_PROGS!$REPLACEMENT_PROGS$ac_delim
 EXTRA_PROGS!$EXTRA_PROGS$ac_delim
-PORTSDIR!$PORTSDIR$ac_delim
-MPCONFIGDIR!$MPCONFIGDIR$ac_delim
-DSTUSR!$DSTUSR$ac_delim
-DSTGRP!$DSTGRP$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -12018,6 +12028,10 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PORTSDIR!$PORTSDIR$ac_delim
+MPCONFIGDIR!$MPCONFIGDIR$ac_delim
+DSTUSR!$DSTUSR$ac_delim
+DSTGRP!$DSTGRP$ac_delim
 DSTMODE!$DSTMODE$ac_delim
 CPP!$CPP$ac_delim
 READLINK_IS_NOT_P1003_1A!$READLINK_IS_NOT_P1003_1A$ac_delim
@@ -12063,7 +12077,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 43; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 47; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: trunk/base/foundation.m4
===================================================================
--- trunk/base/foundation.m4	2007-07-04 20:14:36 UTC (rev 26708)
+++ trunk/base/foundation.m4	2007-07-04 20:37:52 UTC (rev 26709)
@@ -275,6 +275,10 @@
 #
 #	Defines one of the following preprocessor macros:
 #		APPLE_FOUNDATION GNUSTEP_FOUNDATION
+#
+#	Substitutes the following variables:
+#		OBJC_FOUNDATION OBJC_FOUNDATION_LDFLAGS
+#		OBJC_FOUNDATION_CPPFLAGS OBJC_FOUNDATION_LIBS
 #------------------------------------------------------------------------
 AC_DEFUN([MP_OBJC_FOUNDATION],[
 	AC_REQUIRE([AC_PROG_OBJC])
@@ -389,20 +393,26 @@
 	# NeXT Foundation is prefered
 	if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
 		OBJC_FOUNDATION="Apple"
-		CPPFLAGS="${APPLE_FOUNDATION_CPPFLAGS} ${CPPFLAGS}"
-		LIBS="${APPLE_FOUNDATION_LIBS} ${LIBS}"
+		OBJC_FOUNDATION_CPPFLAGS="${APPLE_FOUNDATION_CFLAGS}"
+		OBJC_FOUNDATION_LIBS="${APPLE_FOUNDATION_LIBS}"
+		OBJC_FOUNDATION_LDFLAGS=""
 		AC_DEFINE([APPLE_FOUNDATION], 1, [Define if using the Apple Foundation framework]) 
 		AC_MSG_NOTICE([Using Apple Foundation library])
 	elif test x"${ac_cv_objc_foundation_gnustep}" == x"yes"; then
 		OBJC_FOUNDATION="GNUstep"
-		CPPFLAGS="${GNUSTEP_CPPFLAGS} ${CPPFLAGS}"
-		LIBS="${GNUSTEP_LIBS} ${LIBS}"
-		LDFLAGS="${GNUSTEP_LDFLAGS} ${LDFLAGS}"
+		OBJC_FOUNDATION_CPPFLAGS="${GNUSTEP_CPPFLAGS}"
+		OBJC_FOUNDATION_LIBS="${GNUSTEP_LIBS}"
+		OBJC_FOUNDATION_LDFLAGS="${GNUSTEP_LDFLAGS}"
 		AC_DEFINE([GNUSTEP_FOUNDATION], 1, [Define if using the GNUstep Foundation library]) 
 		AC_MSG_NOTICE([Using GNUstep Foundation library])
 	else
 		AC_MSG_ERROR([Could not find a working Foundation implementation])
 	fi
 
+	AC_SUBST([OBJC_FOUNDATION])
+	AC_SUBST([OBJC_FOUNDATION_LDFLAGS])
+	AC_SUBST([OBJC_FOUNDATION_CPPFLAGS])
+	AC_SUBST([OBJC_FOUNDATION_LIBS])
+
 	AC_LANG_POP([Objective C])
 ])

Modified: trunk/base/src/tclobjc1.0/Makefile.in
===================================================================
--- trunk/base/src/tclobjc1.0/Makefile.in	2007-07-04 20:14:36 UTC (rev 26708)
+++ trunk/base/src/tclobjc1.0/Makefile.in	2007-07-04 20:37:52 UTC (rev 26709)
@@ -6,5 +6,9 @@
 include ../../Mk/macports.autoconf.mk
 include ../../Mk/macports.tea.mk
 
+LDFLAGS+=	${OBJC_FOUNDATION_LDFLAGS}
+CPPFLAGS+=	${OBJC_FOUNDATION_CPPFLAGS}
+LIBS+=	${OBJC_FOUNDATION_LIBS}
+
 distclean::
-	rm -f Makefile
\ No newline at end of file
+	rm -f Makefile

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


More information about the macports-changes mailing list