From: Warren Young Date: August 31 2005 3:11am Subject: Re: Solaris 8 issues List-Archive: http://lists.mysql.com/plusplus/4856 Message-Id: <43151FDE.7070006@etr-usa.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050209080902030809040107" --------------050209080902030809040107 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Warren Young wrote: > I'll ask, and you can pipe up on the thread as necessary. Jeff, please apply the attached patch. It's based on Russ's answer on that thread. --------------050209080902030809040107 Content-Type: text/plain; name="libnsl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libnsl.patch" Index: configure.in =================================================================== --- configure.in (revision 1079) +++ configure.in (working copy) @@ -70,6 +70,7 @@ # Checks for libraries and local system features AC_CHECK_HEADERS(zlib.h, AC_CHECK_LIB(z, gzread, [], [ AC_MSG_ERROR([zlib is required]) ])) +LIB_SOCKET_NSL MYSQL_API_LOCATION MYSQL_SHUTDOWN_ARG AC_CHECK_LIB(intl, main) Index: config/socket_nsl.m4 =================================================================== --- config/socket_nsl.m4 (revision 0) +++ config/socket_nsl.m4 (revision 0) @@ -0,0 +1,22 @@ +dnl @synopsis LIB_SOCKET_NSL +dnl +dnl This macro figures out what libraries are required on this platform +dnl to link sockets programs. +dnl +dnl The common cases are not to need any extra libraries, or to need +dnl -lsocket and -lnsl. We need to avoid linking with libnsl unless +dnl we need it, though, since on some OSes where it isn't necessary it +dnl will totally break networking. Unisys also includes gethostbyname() +dnl in libsocket but needs libnsl for socket(). +dnl +dnl @version 1.3, 2005/08/30 +dnl @author Russ Allbery and Warren Young + +AC_DEFUN([LIB_SOCKET_NSL], +[ + AC_SEARCH_LIBS([gethostbyname], [nsl]) + AC_SEARCH_LIBS([socket], [socket], , [ + AC_CHECK_LIB([nsl], [socket], LIBS="$LIBS -lsocket -lnsl", , + -lsocket)]) +]) + --------------050209080902030809040107--