From: Wouter Wijngaards Date: Wed, 5 Jul 2006 09:45:12 +0000 (+0000) Subject: Fixup the link test, it uses -lldns instead of the lib...a on the commandline. X-Git-Tag: release-1.1.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddcfe29aae5f3a118b6b53bd4e04fbd6bbb6bf53;p=thirdparty%2Fldns.git Fixup the link test, it uses -lldns instead of the lib...a on the commandline. 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... --- diff --git a/Makefile.in b/Makefile.in index e0b4b4f7..de8e7c3e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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: diff --git a/configure.ac b/configure.ac index 32b772d9..ae275d7e 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/pcat/config.h.in b/pcat/config.h.in index 0680c3f7..93feeb17 100644 --- a/pcat/config.h.in +++ b/pcat/config.h.in @@ -6,6 +6,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H +/* Define to 1 if you have the 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 header file. */ #undef HAVE_NETINET_IN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_HCTYPE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_SYSTM_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_H @@ -42,6 +45,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_UDP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + /* Define to 1 if you have the header file. */ #undef HAVE_PCAP_H @@ -149,12 +155,18 @@ #include #endif -#include +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif #ifdef HAVE_NETINET_IP_H #include #endif +#ifdef HAVE_NET_IF_H +#include +#endif + #ifdef HAVE_NETINET_IF_ETHER_H #include #endif