[27295] trunk/base

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 27 13:20:41 PDT 2007


Revision: 27295
          http://trac.macosforge.org/projects/macports/changeset/27295
Author:   sfiera at macports.org
Date:     2007-07-27 13:20:41 -0700 (Fri, 27 Jul 2007)

Log Message:
-----------
Breaking out LIBS into separate variables

In this way, we can avoid linking in unnecessary libraries to our shlibs.

Modified Paths:
--------------
    trunk/base/Mk/macports.autoconf.mk.in
    trunk/base/Mk/macports.tea.mk
    trunk/base/configure
    trunk/base/configure.ac
    trunk/base/src/config.h.in
    trunk/base/src/pextlib1.0/Makefile

Modified: trunk/base/Mk/macports.autoconf.mk.in
===================================================================
--- trunk/base/Mk/macports.autoconf.mk.in	2007-07-27 20:19:13 UTC (rev 27294)
+++ trunk/base/Mk/macports.autoconf.mk.in	2007-07-27 20:20:41 UTC (rev 27295)
@@ -6,7 +6,7 @@
 
 CC			= @CC@
 CFLAGS			= @CFLAGS@ $(CFLAGS_QUICHEEATERS) $(CFLAGS_WERROR) $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) $(CPPFLAGS) $(CFLAGS_LIBCURL)
-OBJCFLAGS		= @OBJCFLAGS@ $(CFLAGS_WERROR) ${CFLAGS_DEBUG}  $(CFLAGS_OPTIMIZE) $(CPPFLAGS) $(CFLAGS_LIBCURL)
+OBJCFLAGS		= @OBJCFLAGS@ $(CFLAGS_WERROR) ${CFLAGS_DEBUG} $(CFLAGS_OPTIMIZE) $(CPPFLAGS) $(CFLAGS_LIBCURL)
 CPPFLAGS		= @CPPFLAGS@ @DEFS@ @INCLUDES@ @TCL_INCLUDES@
 TCL_DEFS		= @TCL_DEFS@
 SHLIB_CFLAGS		= @SHLIB_CFLAGS@
@@ -27,15 +27,16 @@
 
 TCL_CC			= @TCL_CC@
 SHLIB_LD		= @SHLIB_LD@
-LDFLAGS_LIBCURL		= @LDFLAGS_LIBCURL@
-LDFLAGS			=  -L/usr/local/lib @LDFLAGS@ $(LDFLAGS_LIBCURL)
+LDFLAGS			= -L/usr/local/lib @LDFLAGS@
 SHLIB_LDFLAGS		= @SHLIB_LDFLAGS@ ${LDFLAGS}
 SHLIB_SUFFIX		= @SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC	= @TCL_STUB_LIB_SPEC@
 
 LIBS			= @LIBS@
+READLINE_LIBS		= @READLINE_LIBS@
 MD5_LIBS		= @MD5_LIBS@
 SQLITE3_LIBS		= @SQLITE3_LIBS@
+CURL_LIBS		= @LDFLAGS_LIBCURL@
 INSTALL			= @INSTALL@
 MTREE			= @MTREE@
 LN_S			= @LN_S@

Modified: trunk/base/Mk/macports.tea.mk
===================================================================
--- trunk/base/Mk/macports.tea.mk	2007-07-27 20:19:13 UTC (rev 27294)
+++ trunk/base/Mk/macports.tea.mk	2007-07-27 20:20:41 UTC (rev 27295)
@@ -7,7 +7,7 @@
 	${CC} -c -DUSE_TCL_STUBS ${CFLAGS} ${TCL_DEFS} ${SHLIB_CFLAGS} $< -o $@
 
 $(SHLIB_NAME):: ${OBJS}
-	${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS} ${MD5_LIBS} ${SQLITE3_LIBS}
+	${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS}
 
 all:: ${SHLIB_NAME}
 

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2007-07-27 20:19:13 UTC (rev 27294)
+++ trunk/base/configure	2007-07-27 20:20:41 UTC (rev 27295)
@@ -729,6 +729,7 @@
 X_PRE_LIBS
 X_LIBS
 X_EXTRA_LIBS
+READLINE_LIBS
 TCL_VERSION
 TCL_BIN_DIR
 TCL_SRC_DIR
@@ -10326,7 +10327,6 @@
 
 
 # Check for readline
-
 { echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
 echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_readline+set}" = set; then
@@ -10389,12 +10389,7 @@
 { echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
 echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
 if test $ac_cv_lib_readline_readline = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBREADLINE 1
-_ACEOF
-
-  LIBS="-lreadline $LIBS"
-
+  READLINE_LIBS=-lreadline
 fi
 
 { echo "$as_me:$LINENO: checking whether rl_username_completion_function is declared" >&5
@@ -10832,6 +10827,7 @@
 
 
 
+
 # Lowest non-system-reserved uid and gid (Apple claims <500)
 
 cat >>confdefs.h <<\_ACEOF
@@ -12474,6 +12470,7 @@
 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
 X_LIBS!$X_LIBS$ac_delim
 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
+READLINE_LIBS!$READLINE_LIBS$ac_delim
 TCL_VERSION!$TCL_VERSION$ac_delim
 TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
 TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
@@ -12510,7 +12507,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 50; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 51; 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	2007-07-27 20:19:13 UTC (rev 27294)
+++ trunk/base/configure.ac	2007-07-27 20:20:41 UTC (rev 27295)
@@ -95,7 +95,7 @@
 MP_CHECK_X11
 
 # Check for readline
-AC_CHECK_LIB([readline], [readline])
+AC_CHECK_LIB([readline], [readline], [READLINE_LIBS=-lreadline])
 AC_CHECK_DECLS([rl_username_completion_function,rl_filename_completion_function,rl_completion_matches,username_completion_function,filename_completion_function,completion_matches], [], [],
 [
 #include <stdio.h>
@@ -103,6 +103,7 @@
 # include <readline/readline.h>
 #endif
 ])
+AC_SUBST(READLINE_LIBS)
 
 # Lowest non-system-reserved uid and gid (Apple claims <500)
 AC_DEFINE([MIN_USABLE_UID], [500], [Lowest non-system-reserved UID.])

Modified: trunk/base/src/config.h.in
===================================================================
--- trunk/base/src/config.h.in	2007-07-27 20:19:13 UTC (rev 27294)
+++ trunk/base/src/config.h.in	2007-07-27 20:20:41 UTC (rev 27295)
@@ -102,9 +102,6 @@
 /* Define if you have the `md' library (-lmd). */
 #undef HAVE_LIBMD
 
-/* Define to 1 if you have the `readline' library (-lreadline). */
-#undef HAVE_LIBREADLINE
-
 /* Define to 1 if you have the <limits.h> header file. */
 #undef HAVE_LIMITS_H
 

Modified: trunk/base/src/pextlib1.0/Makefile
===================================================================
--- trunk/base/src/pextlib1.0/Makefile	2007-07-27 20:19:13 UTC (rev 27294)
+++ trunk/base/src/pextlib1.0/Makefile	2007-07-27 20:20:41 UTC (rev 27295)
@@ -9,6 +9,8 @@
 include ../../Mk/macports.autoconf.mk
 include ../../Mk/macports.tea.mk
 
+LIBS+= ${CURL_LIBS} ${MD5_LIBS}
+
 .PHONY: test
 
 test:: ${SHLIB_NAME}

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


More information about the macports-changes mailing list