[ircd-ratbox] [PATCH] ratbox-services: Autoconf checks for socket/nls OS libs

Ralf S. Engelschall rse at engelschall.com
Sun May 8 15:52:22 UTC 2005


Similar to IRCd-Ratbox, Ratbox-Services is a network daemon using
socket(2) and gethostbyname(2). Unfortunately, not all Unix flavors have
those in libc. Hence, for portability reasons, it has to check for those
two functions to be available from the usual libsocket and libnls libs.
This is similar to what is done in the Autoconf scripts of thousand
other packages. And it especially allows Ratbox-Services to build under
Sun Solaris.

Index: autoconf/configure.in
===================================================================
RCS file: /cvsroot/rserv/autoconf/configure.in,v
retrieving revision 1.25
diff -u -d -u -d -r1.25 configure.in
--- autoconf/configure.in       29 Apr 2005 02:38:18 -0000      1.25
+++ autoconf/configure.in       8 May 2005 15:47:05 -0000
@@ -26,6 +26,8 @@

 AC_TYPE_SIGNAL
 AC_FUNC_STRFTIME
+AC_CHECK_LIB(socket, socket)
+AC_CHECK_LIB(nsl, gethostbyname)
 AC_CHECK_FUNCS(select strlcpy strlcat gethostbyname mmap getaddrinfo)

 AC_MSG_CHECKING(Compile with warning flags)

                                       Ralf S. Engelschall
                                       rse at engelschall.com
                                       www.engelschall.com



More information about the ircd-ratbox mailing list