]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fixup the link test, it uses -lldns instead of the lib...a on the commandline.
authorWouter Wijngaards <wouter@NLnetLabs.nl>
Wed, 5 Jul 2006 09:45:12 +0000 (09:45 +0000)
committerWouter Wijngaards <wouter@NLnetLabs.nl>
Wed, 5 Jul 2006 09:45:12 +0000 (09:45 +0000)
Also set the -R search path so that crypto lib is found in dynamic linking.
pcat config.h.in is in svn? Well, here is a newer one...

Makefile.in
configure.ac
pcat/config.h.in

index e0b4b4f79a5074f610e57ffa6c987c68edd9e46a..de8e7c3eee486ec9ecf62a15d8d64adb6474fa29 100644 (file)
@@ -23,7 +23,7 @@ CFLAGS                = @CFLAGS@  -I. -I$(srcdir)
 LDFLAGS                = @LDFLAGS@
 LIBS           = @LIBS@
 LIBOBJS                = @LIBOBJS@
-PROG_LIBS      = @PROG_LIBS@
+RUNTIME_PATH   = @RUNTIME_PATH@
 DATE           = $(shell date +%Y%m%d)
 LIBTOOL                = $(libtool) --tag=CC
 
@@ -78,11 +78,11 @@ LINK_LIB    = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -release $(VERSION)
 all:           copy-headers lib linktest
 
 linktest:
-               gcc $(srcdir)/linktest.c $(CPPFLAGS) $(CFLAGS) .libs/libldns.a $(LDFLAGS) $(PROG_LIBS) -o linktest
+               gcc $(srcdir)/linktest.c $(CPPFLAGS) $(CFLAGS) -L.libs -lldns -o linktest
                rm linktest
 
 lib:           $(LIBDNS_OBJECTS)
-               $(LINK_LIB) -o libldns.la $(LIBDNS_LOBJECTS) -rpath $(libdir)/lib
+               $(LINK_LIB) -o libldns.la $(LIBDNS_LOBJECTS) -rpath $(libdir) $(RUNTIME_PATH)
                if [ ! -d lib ] ; then ln -s .libs lib ; fi ;           
 
 copy-headers:
index 32b772d9fbfdf268d0520d0a9afae3f3cf49aeb4..ae275d7ed9d4d5008428a059ae9f80dcb0ae8fbe 100644 (file)
@@ -78,10 +78,6 @@ fi
 AC_CHECK_PROG(doxygen, doxygen, doxygen)
 
 # Checks for libraries.
-AC_CHECK_LIB(socket, socket, [PROG_LIBS="-lsocket $PROG_LIBS"], [])
-AC_CHECK_LIB(nsl, inet_pton, [PROG_LIBS="-lnsl $PROG_LIBS"], [])
-AC_SUBST(PROG_LIBS)
-
 # Check for SSL, original taken from
 # http://www.gnu.org/software/ac-archive/htmldoc/check_ssl.html and
 # modified for NSD and 
@@ -112,11 +108,13 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
             AC_MSG_RESULT(found in $ssldir)
             HAVE_SSL=yes
             LDFLAGS="$LDFLAGS -L$ssldir/lib -lcrypto";
+           RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
             AC_CHECK_LIB(crypto, HMAC_CTX_init,, [
                     AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required])
                 ])
         fi
         AC_SUBST(HAVE_SSL)
+       AC_SUBST(RUNTIME_PATH)
     fi
 
 # Use libtool 
index 0680c3f72797f04f56de30082db1c3d225504185..93feeb17b558a5cb26c78e13a960d79720dc48d6 100644 (file)
@@ -6,6 +6,9 @@
 /* Define to 1 if you have the <assert.h> header file. */
 #undef HAVE_ASSERT_H
 
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
 /* Define to 1 if you have the `getdelim' function. */
 #undef HAVE_GETDELIM
 
@@ -33,8 +36,8 @@
 /* Define to 1 if you have the <netinet/in.h> header file. */
 #undef HAVE_NETINET_IN_H
 
-/* Define to 1 if you have the <netinet/in.hctype.h> header file. */
-#undef HAVE_NETINET_IN_HCTYPE_H
+/* Define to 1 if you have the <netinet/in_systm.h> header file. */
+#undef HAVE_NETINET_IN_SYSTM_H
 
 /* Define to 1 if you have the <netinet/ip.h> header file. */
 #undef HAVE_NETINET_IP_H
@@ -42,6 +45,9 @@
 /* Define to 1 if you have the <netinet/udp.h> header file. */
 #undef HAVE_NETINET_UDP_H
 
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
 /* Define to 1 if you have the <pcap.h> header file. */
 #undef HAVE_PCAP_H
 
 #include <pcap.h>
 #endif
 
-#include <netinet/in_systm.h>  
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
 
 #ifdef HAVE_NETINET_IP_H
 #include <netinet/ip.h>
 #endif
 
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+
 #ifdef HAVE_NETINET_IF_ETHER_H
 #include <netinet/if_ether.h>
 #endif