--------------070909080401000701050501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
sean finney wrote:
> hey,
>
> On Mon, May 23, 2005 at 09:16:00AM +0200, Andreas Ericsson wrote:
>
>>>i believe there's an autoconf macro that can determine whether or not
>>>the libraries are necessary.
>>
>>Nah. autoconf only determines if libraries are necessary for certain
>>functions. For nagios, -lnsl isn't required on Linux. To the best of my
>
>
> right. so check if they're necessary for a couple functions that
> typically need it
>
Yes, but checking if it's needed for functions that aren't used won't
yield useful results.
>
>>knowledge it isn't required on *BSD either, but I'm not certain. What I
>>was curious about was on which platforms it is actually required, or if
>>it could be dropped entirely (as I believe).
>
>
> i assumed it would be necessary for solaris, but i just fired off
> a build that ran successfully without it, so maybe it can just be
> removed. i guess the worst case scenario is that it gets taken out
> and someone send a mail to nagios-devel saying that we need it
> after all...
>
Sun/Solaris being the main culprit of unnecessary linkings to libnsl, I
think it's safe to remove it. The attached patch can be used for that.
Apply with -p1.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Lead Developer
--------------070909080401000701050501
Content-Type: text/plain;
name="nagios-no-libnsl.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nagios-no-libnsl.diff"
diff -urN ../nagios.orig/base/Makefile.in ./base/Makefile.in
--- ../nagios.orig/base/Makefile.in 2004-12-10 15:38:08.000000000 +0100
+++ ./base/Makefile.in 2005-05-23 15:12:40.000000000 +0200
@@ -42,7 +42,6 @@
MATHLIBS=-lm
PERLLIBS=@PERLLIBS@
PERLXSI_O=@PERLXSI_O@
-SOCKETLIBS=@SOCKETLIBS@
THREADLIBS=@THREADLIBS@
BROKERLIBS=@BROKERLIBS@
@@ -163,7 +162,7 @@
########## CGIS ##########
nagios: nagios.c $(OBJS) $(OBJDEPS) $(SRC_INCLUDE)/nagios.h $(SRC_INCLUDE)/locations.h
- $(CC) $(CFLAGS) -o $@ nagios.c $(OBJS) $(BROKER_LDFLAGS) $(LDFLAGS) $(PERLLIBS) $(MATHLIBS) $(SOCKETLIBS) $(THREADLIBS) $(BROKERLIBS) $(LIBS)
+ $(CC) $(CFLAGS) -o $@ nagios.c $(OBJS) $(BROKER_LDFLAGS) $(LDFLAGS) $(PERLLIBS) $(MATHLIBS) $(THREADLIBS) $(BROKERLIBS) $(LIBS)
nagiostats: nagiostats.c $(SRC_INCLUDE)/locations.h
$(CC) $(CFLAGS) -o $@ nagiostats.c $(LDFLAGS) $(MATHLIBS) $(LIBS)
diff -urN ../nagios.orig/configure.in ./configure.in
--- ../nagios.orig/configure.in 2005-04-04 20:23:25.000000000 +0200
+++ ./configure.in 2005-05-23 15:12:20.000000000 +0200
@@ -42,9 +42,6 @@
AC_TYPE_GETGROUPS
dnl Checks for library functions.
-AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
-AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
-AC_SUBST(SOCKETLIBS)
AC_CHECK_FUNCS(initgroups setenv strdup strstr strtoul unsetenv)
AC_MSG_CHECKING(for type of socket size)
--------------070909080401000701050501--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]