List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:August 31 2005 3:11am
Subject:Re: Solaris 8 issues
View as plain text  
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.

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 <rra@stripped> and Warren Young
<warren@stripped>
+
+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)])
+])
+

Thread
Solaris 8 issuesJeff Schweiger29 Aug
  • Re: Solaris 8 issuesWarren Young29 Aug
    • RE: Solaris 8 issuesJeff Schweiger29 Aug
      • Re: Solaris 8 issuesWarren Young30 Aug
        • RE: Solaris 8 issuesJeff Schweiger30 Aug
          • Re: Solaris 8 issuesWarren Young31 Aug
            • Re: Solaris 8 issuesWarren Young31 Aug
              • RE: Solaris 8 issuesJeff Schweiger31 Aug
                • Re: Solaris 8 issuesWarren Young1 Sep
                  • RE: Solaris 8 issuesJeff Schweiger2 Sep
                    • Re: Solaris 8 issuesWarren Young3 Sep