libreplace: fix standalone build - add necessary libs.
authorMichael Adam <obnox@samba.org>
Wed, 27 Feb 2008 00:41:30 +0000 (01:41 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 27 Feb 2008 10:06:54 +0000 (11:06 +0100)
The libs needed for getifaddrs replacements have to be added
to LIBS and used for the testsuite target.

Michael

source/lib/replace/Makefile.in
source/lib/replace/getifaddrs.m4

index 30f39ac6cb4b92c75a9e0b3ff0da402b147c5f8f..af9522f3a6bce57ccc383c071b2238e46b504028 100644 (file)
@@ -10,6 +10,7 @@ VPATH = @libreplacedir@
 srcdir = @srcdir@
 builddir = @builddir@
 INSTALL = @INSTALL@
+LIBS = @LIBS@
 
 .PHONY: test all showflags install installcheck clean distclean realdistclean
 
@@ -25,6 +26,7 @@ showflags:
        @echo '  CC     = $(CC)'
        @echo '  CFLAGS = $(CFLAGS)'
        @echo '  LDFLAGS= $(LDFLAGS)'
+       @echo '  LIBS   = $(LIBS)'
 
 install: all
        mkdir -p $(libdir)
@@ -41,7 +43,7 @@ installcheck: install test
 TEST_OBJS = test/testsuite.o test/os2_delete.o test/strptime.o
 
 testsuite: libreplace.a $(TEST_OBJS)
-       $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS)
+       $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS)
 
 .c.o:
        @echo Compiling $*.c
index dd2a95cb815b1ba13006c9df8659d00644566603..767797e8d2a37b809509d6cd785b9cb3492958e0 100644 (file)
@@ -71,6 +71,7 @@ AC_TRY_RUN([
            libreplace_cv_HAVE_IFACE_AIX=yes,libreplace_cv_HAVE_IFACE_AIX=no,libreplace_cv_HAVE_IFACE_AIX=cross)])
 if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
     iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
+       old_LIBS="$old_LIBS $LIBS"
 fi
 fi
 
@@ -87,6 +88,7 @@ AC_TRY_RUN([
            libreplace_cv_HAVE_IFACE_IFCONF=yes,libreplace_cv_HAVE_IFACE_IFCONF=no,libreplace_cv_HAVE_IFACE_IFCONF=cross)])
 if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
     iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
+       old_LIBS="$old_LIBS $LIBS"
 fi
 fi
 
@@ -102,6 +104,7 @@ AC_TRY_RUN([
            libreplace_cv_HAVE_IFACE_IFREQ=yes,libreplace_cv_HAVE_IFACE_IFREQ=no,libreplace_cv_HAVE_IFACE_IFREQ=cross)])
 if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
     iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available])
+       old_LIBS="$old_LIBS $LIBS"
 fi
 fi