[41015] trunk/base

afb at macports.org afb at macports.org
Mon Oct 20 15:56:28 PDT 2008


Revision: 41015
          http://trac.macports.org/changeset/41015
Author:   afb at macports.org
Date:     2008-10-20 15:56:28 -0700 (Mon, 20 Oct 2008)
Log Message:
-----------
make tclobjc package conditional

Modified Paths:
--------------
    trunk/base/configure.ac
    trunk/base/m4/foundation.m4
    trunk/base/src/Makefile.in

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2008-10-20 22:49:23 UTC (rev 41014)
+++ trunk/base/configure.ac	2008-10-20 22:56:28 UTC (rev 41015)
@@ -115,11 +115,19 @@
 MP_COMPILER_ATTRIBUTE_UNUSED
 MP_COMPILER_ATTRIBUTE_LF_PRIVATE
 
+# Determine if we want to install conditional packages
+CONDITIONAL_PACKAGES=
+
 # Foundation checks
 ACX_PTHREAD
 MP_OBJC_RUNTIME
 MP_OBJC_FOUNDATION
 
+# tclobjc requires objc (runtime and foundation) support
+if test x$OBJC_RUNTIME != xnone -a x$OBJC_FOUNDATION != xnone; then
+	CONDITIONAL_PACKAGES="tclobjc1.0 $CONDITIONAL_PACKAGES"
+fi
+
 MP_PROG_DAEMONDO
 #MP_PROG_XAR
 
@@ -368,6 +376,7 @@
 AC_SUBST(TCL_DEFS)
 AC_SUBST(TCL_STUB_LIB_SPEC)
 AC_SUBST(TCL_CC)
+AC_SUBST(CONDITIONAL_PACKAGES)
 AC_SUBST(OUR_INCLUDED_PACKAGES)
 
 # misc variables that need to be expanded for substitution into tcl

Modified: trunk/base/m4/foundation.m4
===================================================================
--- trunk/base/m4/foundation.m4	2008-10-20 22:49:23 UTC (rev 41014)
+++ trunk/base/m4/foundation.m4	2008-10-20 22:56:28 UTC (rev 41015)
@@ -87,6 +87,8 @@
 				;;
 			apple)
 				;;
+			no)
+				;;
 			*)
 				AC_MSG_ERROR([${with_objc_runtime} is not a valid argument to --with-objc-runtime. Please specify either "GNU" or "apple"])
 				;;
@@ -95,6 +97,8 @@
 
 	AC_LANG_PUSH([Objective C])
 
+	if test x"${with_objc_runtime}" != x"no"; then
+	
 	# Check for common header, objc/objc.h
 	AC_CHECK_HEADERS([objc/objc.h], ,[AC_MSG_ERROR([Can't locate Objective C runtime headers])])
 
@@ -222,6 +226,8 @@
 		mp_cv_objc_runtime_gnu="no"
 	fi
 
+	fi
+
 	# Apple runtime is prefered
 	if test x"${mp_cv_objc_runtime_apple}" = x"yes"; then
 			OBJC_RUNTIME="APPLE_RUNTIME"
@@ -233,6 +239,9 @@
 			OBJC_RUNTIME_FLAGS="-fgnu-runtime"
 			AC_MSG_NOTICE([Using GNU Objective-C runtime])
 			AC_DEFINE([GNU_RUNTIME], 1, [Define if using the GNU Objective-C runtime and compiler.]) 
+	elif test x"${with_objc_runtime}" = x"no"; then
+			OBJC_RUNTIME="none"
+			AC_MSG_NOTICE([Not using Objective-C runtime])
 	else
 			AC_MSG_FAILURE([Could not locate a working Objective-C runtime.])
 	fi
@@ -293,6 +302,8 @@
 				;;
 			apple)
 				;;
+			no)
+				;;
 			*)
 				AC_MSG_ERROR([${with_objc_foundation} is not a valid argument to --with-objc-foundation. Please specify either "GNU" or "apple"])
 				;;
@@ -301,6 +312,8 @@
 
 	AC_LANG_PUSH([Objective C])
 
+	if test x"${with_objc_foundation}" != x"no"; then
+	
 	if test x"${with_objc_foundation}" == x || test x"${with_objc_foundation}" == x"apple"; then
 		# '@<:@' = '['
 		# '@:>@' = ']'
@@ -397,6 +410,8 @@
 		ac_cv_objc_foundation_gnustep="no"
 	fi
 
+	fi
+	
 	# NeXT Foundation is prefered
 	if test x"${ac_cv_objc_foundation_apple}" == x"yes"; then
 		OBJC_FOUNDATION="Apple"
@@ -412,6 +427,9 @@
 		OBJC_FOUNDATION_LDFLAGS="${GNUSTEP_LDFLAGS}"
 		AC_DEFINE([GNUSTEP_FOUNDATION], 1, [Define if using the GNUstep Foundation library]) 
 		AC_MSG_NOTICE([Using GNUstep Foundation library])
+	elif test x"${with_objc_foundation}" = x"no"; then
+		OBJC_FOUNDATION="none"
+		AC_MSG_NOTICE([Not using Foundation implementation])
 	else
 		AC_MSG_ERROR([Could not find a working Foundation implementation])
 	fi

Modified: trunk/base/src/Makefile.in
===================================================================
--- trunk/base/src/Makefile.in	2008-10-20 22:49:23 UTC (rev 41014)
+++ trunk/base/src/Makefile.in	2008-10-20 22:56:28 UTC (rev 41015)
@@ -7,7 +7,7 @@
 			registry1.0 \
 			registry2.0 \
 			darwintracelib1.0 \
-			tclobjc1.0
+			@CONDITIONAL_PACKAGES@
 SUBDIR=		${TCLPKG} @PATHCONF@ port programs
 
 all::
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081020/ab5e6ed0/attachment-0001.html 


More information about the macports-changes mailing list