List:Commits« Previous MessageNext Message »
From:Monty Taylor Date:April 5 2008 10:54am
Subject:bk commit into 5.1 tree (mtaylor:1.2569) BUG#34639
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mtaylor.  When mtaylor does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-04-05 10:53:59+02:00, mtaylor@solace.(none) +4 -0
  BUG#34639 useless linkages
  
  Split Z, CRYPT and NSL libs out from LIBS, as they are only used in one or two 
  places and don't need to be linked by every program.

  client/Makefile.am@stripped, 2008-04-05 10:53:57+02:00, mtaylor@solace.(none) +1 -0
    BUG#34639 useless linkages
    
    Split Z, CRYPT and NSL libs out from LIBS, as they are only used in one or two 
    places and don't need to be linked by every program.

  config/ac-macros/zlib.m4@stripped, 2008-04-05 10:53:57+02:00, mtaylor@solace.(none) +2 -1
    BUG#34639 useless linkages
    
    Split Z, CRYPT and NSL libs out from LIBS, as they are only used in one or two 
    places and don't need to be linked by every program.

  configure.in@stripped, 2008-04-05 10:53:56+02:00, mtaylor@solace.(none) +12 -2
    BUG#34639 useless linkages
    
    Split Z, CRYPT and NSL libs out from LIBS, as they are only used in one or two 
    places and don't need to be linked by every program.

  sql/Makefile.am@stripped, 2008-04-05 10:53:57+02:00, mtaylor@solace.(none) +1 -0
    BUG#34639 useless linkages
    
    Split Z, CRYPT and NSL libs out from LIBS, as they are only used in one or two 
    places and don't need to be linked by every program.

diff -Nrup a/client/Makefile.am b/client/Makefile.am
--- a/client/Makefile.am	2007-11-01 16:49:37 +01:00
+++ b/client/Makefile.am	2008-04-05 10:53:57 +02:00
@@ -54,6 +54,7 @@ bin_PROGRAMS =			mysql \
 mysql_SOURCES =			mysql.cc readline.cc sql_string.cc \
 				completion_hash.cc
 mysql_LDADD =			@readline_link@ @TERMCAP_LIB@ \
+				@ZLIB_LIBS@ \
 				$(LDADD) $(CXXLDFLAGS)
 mysqladmin_SOURCES =		mysqladmin.cc
 
diff -Nrup a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
--- a/config/ac-macros/zlib.m4	2007-08-31 01:18:56 +02:00
+++ b/config/ac-macros/zlib.m4	2008-04-05 10:53:57 +02:00
@@ -19,7 +19,8 @@ AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
 save_CPPFLAGS="$CPPFLAGS"
 save_LIBS="$LIBS"
 CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
-LIBS="$LIBS $ZLIB_LIBS"
+#We don't really need this everywhere. Use ZLIB_LIBS in Makefiles.
+#LIBS="$LIBS $ZLIB_LIBS"
 if test X"$with_server" = Xno
 then
   zlibsym=zlibVersion
diff -Nrup a/configure.in b/configure.in
--- a/configure.in	2008-03-31 19:04:53 +02:00
+++ b/configure.in	2008-04-05 10:53:56 +02:00
@@ -835,18 +835,26 @@ AC_CHECK_HEADERS([xfs/xfs.h])
 
 AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
 
+_libs=${LIBS}
+LIBS=''
 AC_CHECK_LIB(nsl_r, gethostbyname_r, [],
   AC_CHECK_LIB(nsl, gethostbyname_r))
 AC_CHECK_FUNC(gethostbyname_r)
-
-AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
 AC_CHECK_FUNC(yp_get_default_domain, ,
   AC_CHECK_LIB(nsl, yp_get_default_domain))
+NSL_LIBS=${LIBS}
+LIBS=${_libs}
+
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
 AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
 # This may get things to compile even if bind-8 is installed
 AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
 # Check if crypt() exists in libc or libcrypt, sets LIBS if needed
+_libs=${LIBS}
+LIBS=''
 AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
+CRYPT_LIBS=${LIBS}
+LIBS=${_libs}
 # See if we need a library for address lookup.
 AC_SEARCH_LIBS(inet_aton, [socket nsl resolv])
 
@@ -2673,6 +2681,8 @@ sql_client_dirs="$sql_client_dirs client
 
 CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
 
+AC_SUBST(CRYPT_LIBS)
+AC_SUBST(NSL_LIBS)
 AC_SUBST(CLIENT_LIBS)
 AC_SUBST(CLIENT_THREAD_LIBS)
 AC_SUBST(NON_THREADED_LIBS)
diff -Nrup a/sql/Makefile.am b/sql/Makefile.am
--- a/sql/Makefile.am	2008-03-06 16:12:59 +01:00
+++ b/sql/Makefile.am	2008-04-05 10:53:57 +02:00
@@ -43,6 +43,7 @@ mysqld_LDADD =		libndb.la \
 			@MYSQLD_EXTRA_LDFLAGS@ \
 			@pstack_libs@ \
 			@mysql_plugin_libs@ \
+			@CRYPT_LIBS@ \
 			$(LDADD)  $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \
 			$(yassl_libs) $(openssl_libs) @MYSQLD_EXTRA_LIBS@
 
Thread
bk commit into 5.1 tree (mtaylor:1.2569) BUG#34639Monty Taylor5 Apr 2008