From: Jelte Jansen Date: Tue, 27 Sep 2005 09:23:01 +0000 (+0000) Subject: include and make tweaks X-Git-Tag: release-1.0.0~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=600f4feac1cead9e27ac9fb432d8288cfec31764;p=thirdparty%2Fldns.git include and make tweaks --- diff --git a/Makefile.in b/Makefile.in index fe62f24e..cc6ff896 100644 --- a/Makefile.in +++ b/Makefile.in @@ -88,6 +88,14 @@ tools: $(PROG_TARGETS) drill drill: ./drill/config.log ( cd drill ; $(MAKE) -f Makefile all) +./examples/config.log: + ( mkdir examples ; cd examples ; ../$(srcdir)/examples/configure LDFLAGS="-L../.libs" CPPFLAGS="-I.. -I../..") + +examples: ./examples/config.log + ( cd examples ; $(MAKE) -f Makefile all) + + + lib: $(LIBDNS_OBJECTS) b64_pton$U.o b64_ntop$U.o $(LINK_LIB) -o libldns.la $(LIBDNS_LOBJECTS) b64_pton$U.lo b64_ntop$U.lo \ -rpath $(prefix)/lib @@ -202,7 +210,7 @@ clean: distclean: clean docclean libclean rm -f ltmain.sh - (cd drill ; $(MAKE) -f Makefile clean) + (cd drill ; $(MAKE) -f Makefile distclean) realclean: clean docclean libclean rm -f config.status diff --git a/configure.ac b/configure.ac index e0c748f4..d2526065 100644 --- a/configure.ac +++ b/configure.ac @@ -117,7 +117,7 @@ AC_HEADER_STDC #AC_HEADER_SYS_WAIT #AC_CHECK_HEADERS([getopt.h fcntl.h stdlib.h string.h strings.h unistd.h]) # do the very minimum - we can always extend this -AC_CHECK_HEADERS([getopt.h stdbool.h openssl/ssl.h netinet/in.h]) +AC_CHECK_HEADERS([getopt.h stdbool.h openssl/ssl.h netinet/in.h time.h]) AC_CHECK_HEADERS(sys/param.h sys/mount.h,,, [ [ diff --git a/drill/Makefile.in b/drill/Makefile.in index 8137707e..822376f8 100644 --- a/drill/Makefile.in +++ b/drill/Makefile.in @@ -62,9 +62,15 @@ clean: docclean: rm -rf doxydoc +distclean: clean docclean + rm -f config.h + rm -f drill.h + realclean: clean docclean rm -f tags rm -f config.log + rm -f config.sub + rm -f ltmain.sh rm -f config.status rm -rf autom4te.cache rm -f config.h diff --git a/drill/configure.ac b/drill/configure.ac index f2d9d285..6aa4c0e1 100644 --- a/drill/configure.ac +++ b/drill/configure.ac @@ -15,7 +15,7 @@ AC_PROG_MAKE_SET #AC_HEADER_STDC #AC_HEADER_SYS_WAIT # do the very minimum - we can always extend this -AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h]) +AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h time.h]) AC_CHECK_HEADERS(sys/param.h sys/mount.h,,, [ [ @@ -43,6 +43,27 @@ AC_CHECK_HEADER(ldns/dns.h,, [ #AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir") +AH_BOTTOM([ + +#include +#include +#include +#include + +#if STDC_HEADERS +#include +#include +#endif + +#ifdef HAVE_STDINT_H +#include +#endif + +#ifdef HAVE_TIME_H +#include +#endif +]) + AC_CONFIG_FILES([Makefile drill.h ]) diff --git a/drill/drill.h.in b/drill/drill.h.in index a1898352..d25fca00 100644 --- a/drill/drill.h.in +++ b/drill/drill.h.in @@ -10,16 +10,6 @@ #define _DRILL_H_ #include "config.h" -#include -#include -#include -#include -#include - -#ifdef HAVE_STDINT_H -#include -#endif /* HAVE_STDINT_H */ - #include "drill_util.h" #define DRILL_VERSION "@PACKAGE_VERSION@" diff --git a/examples/configure.ac b/examples/configure.ac index 955acc8b..03bcaf95 100644 --- a/examples/configure.ac +++ b/examples/configure.ac @@ -39,6 +39,36 @@ AC_CHECK_HEADER(ldns/dns.h,, [ ] ) +AH_BOTTOM([ + +#include +#include +#include +#include + +#if STDC_HEADERS +#include +#include +#endif + +#ifdef HAVE_STDINT_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif +]) + + #AC_CHECK_FUNCS([mkdir rmdir strchr strrchr strstr]) #AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir") diff --git a/examples/ldns-mx.c b/examples/ldns-mx.c index 82c90cca..e74b7be0 100644 --- a/examples/ldns-mx.c +++ b/examples/ldns-mx.c @@ -5,13 +5,7 @@ * Licensed under the GPL version 2 */ -#include -#include -#include -#include -#include - -#include +#include "config.h" #include