diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 0532bd08..00000000 --- a/Makefile.in +++ /dev/null @@ -1,328 +0,0 @@ -# -# @configure_input@ -# -# -# Copyright (c) 2013, Verisign, Inc., NLnet Labs -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the names of the copyright holders nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package = @PACKAGE_NAME@ -version = @PACKAGE_VERSION@@RELEASE_CANDIDATE@ -tarname = @PACKAGE_TARNAME@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -distdir = $(tarname)-$(version) -bintar = $(distdir)-bin.tar.gz - -prefix = @prefix@ -datarootdir=@datarootdir@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -docdir = @docdir@ -libdir = @libdir@ - -srcdir = @srcdir@ -INSTALL = @INSTALL@ - -all : default @GETDNS_QUERY@ @GETDNS_SERVER_MON@ - -everything: default - cd src/test && $(MAKE) - -default: - cd src && $(MAKE) $@ - -install-lib: - cd src && $(MAKE) install - -install: getdns.pc getdns_ext_event.pc install-lib @INSTALL_GETDNS_QUERY@ @INSTALL_GETDNS_SERVER_MON@ - $(INSTALL) -m 755 -d $(DESTDIR)$(docdir) - $(INSTALL) -m 644 $(srcdir)/AUTHORS $(DESTDIR)$(docdir) - $(INSTALL) -m 644 $(srcdir)/ChangeLog $(DESTDIR)$(docdir) - $(INSTALL) -m 644 $(srcdir)/COPYING $(DESTDIR)$(docdir) - $(INSTALL) -m 644 $(srcdir)/INSTALL $(DESTDIR)$(docdir) - $(INSTALL) -m 644 $(srcdir)/LICENSE $(DESTDIR)$(docdir) - $(INSTALL) -m 644 $(srcdir)/NEWS $(DESTDIR)$(docdir) - $(INSTALL) -m 644 $(srcdir)/README.md $(DESTDIR)$(docdir) - $(INSTALL) -m 755 -d $(DESTDIR)$(libdir)/pkgconfig - $(INSTALL) -m 644 getdns.pc $(DESTDIR)$(libdir)/pkgconfig - $(INSTALL) -m 644 getdns_ext_event.pc $(DESTDIR)$(libdir)/pkgconfig - $(INSTALL) -m 755 -d $(DESTDIR)$(docdir)/spec - $(INSTALL) -m 644 $(srcdir)/spec/index.html $(DESTDIR)$(docdir)/spec - cd doc && $(MAKE) install - @echo "***" - @echo "*** !!! IMPORTANT !!!!" - @echo "***" - @echo "*** From release 1.2.0, getdns comes with built-in DNSSEC" - @echo "*** trust anchor management. External trust anchor management," - @echo "*** for example with unbound-anchor, is no longer necessary" - @echo "*** and no longer recommended." - @echo "***" - @echo "*** Previously installed trust anchors, in the default location -" - @echo "***" - @echo "*** @TRUST_ANCHOR_FILE@" - @echo "***" - @echo "*** - will be preferred and used for DNSSEC validation, however" - @echo "*** getdns will fallback to trust-anchors obtained via built-in" - @echo "*** trust anchor management when the anchors from the default" - @echo "*** location fail to validate the root DNSKEY rrset." - @echo "***" - @echo "*** To prevent expired DNSSEC trust anchors to be used for" - @echo "*** validation, we strongly recommend removing the trust anchors" - @echo "*** on the default location when there is no active external" - @echo "*** trust anchor management keeping it up-to-date." - @echo "***" - -uninstall: @UNINSTALL_GETDNS_QUERY@ @UNINSTALL_GETDNS_SERVER_MON@ - rm -rf $(DESTDIR)$(docdir) - cd doc && $(MAKE) $@ - cd src && $(MAKE) $@ - -doc: FORCE - cd doc && $(MAKE) $@ - -example: - cd spec/example && $(MAKE) $@ - -test: default - cd src/test && $(MAKE) $@ - -getdns_query: default - cd src/tools && $(MAKE) $@ - -getdns_server_mon: default - cd src/tools && $(MAKE) $@ - -stubby: - cd src && $(MAKE) $@ - -scratchpad: default - cd src/test && $(MAKE) $@ - -pad: scratchpad - src/test/scratchpad || ./libtool exec gdb src/test/scratchpad - -install-getdns_query: install-lib - cd src/tools && $(MAKE) $@ - -uninstall-getdns_query: - cd src/tools && $(MAKE) $@ - -install-getdns_server_mon: install-lib @INSTALL_GETDNS_QUERY@ - cd src/tools && $(MAKE) $@ - -uninstall-getdns_server_mon: - cd src/tools && $(MAKE) $@ - -install-stubby: - cd src && $(MAKE) $@ - -uninstall-stubby: - cd src && $(MAKE) $@ - -clean: - cd src && $(MAKE) $@ - cd doc && $(MAKE) $@ - cd spec/example && $(MAKE) $@ - rm -f *.o *.pc - -depend: - cd src && $(MAKE) $@ - cd spec/example && $(MAKE) $@ - -distclean: - cd src && $(MAKE) $@ - rmdir src 2>/dev/null || true - cd doc && $(MAKE) $@ - rmdir doc 2>/dev/null || true - cd spec/example && $(MAKE) $@ - rmdir spec/example 2>/dev/null || true - rmdir spec 2>/dev/null || true - rm -f config.log config.status Makefile libtool getdns.pc getdns_ext_event.pc - rm -fR autom4te.cache - rm -f m4/libtool.m4 - rm -f m4/lt~obsolete.m4 - rm -f m4/ltoptions.m4 - rm -f m4/ltsugar.m4 - rm -f m4/ltversion.m4 - rm -f $(distdir).tar.gz $(distdir).tar.gz.sha256 $(distdir).tar.gz.sha1 - rm -f $(distdir).tar.gz.md5 $(distdir).tar.gz.asc - -megaclean: - cd $(srcdir) && rm -fr * .dir-locals.el .gitignore .indent.pro .travis.yml && git reset --hard && git submodule update --init - -autoclean: megaclean - libtoolize -ci - autoreconf -fi - -dist: $(distdir).tar.gz - -pub: $(distdir).tar.gz.sha256 $(distdir).tar.gz.md5 $(distdir).tar.gz.asc $(distdir).tar.gz.sha1 - -$(distdir).tar.gz.sha256: $(distdir).tar.gz - openssl sha256 $(distdir).tar.gz >$@ - -$(distdir).tar.gz.sha1: $(distdir).tar.gz - openssl sha1 $(distdir).tar.gz >$@ - -$(distdir).tar.gz.md5: $(distdir).tar.gz - openssl md5 $(distdir).tar.gz >$@ - -$(distdir).tar.gz.asc: $(distdir).tar.gz - gpg --armor --detach-sig $(distdir).tar.gz - -bindist: $(bintar) - -$(bintar): $(distdir) - chown -R 0:0 $(distdir) 2>/dev/null || true - cd $(distdir); ./configure; make - tar chof - $(distdir) | gzip -9 -c > $@ - rm -rf $(distdir) - -$(distdir).tar.gz: $(distdir) - chown -R 0:0 $(distdir) 2>/dev/null || true - tar chof - $(distdir) | gzip -9 -c > $@ - rm -rf $(distdir) - -$(distdir): - mkdir -p $(distdir)/m4 - mkdir -p $(distdir)/src - mkdir -p $(distdir)/src/getdns - mkdir -p $(distdir)/src/test - mkdir -p $(distdir)/src/extension - mkdir -p $(distdir)/src/compat - mkdir -p $(distdir)/src/util - mkdir -p $(distdir)/src/gldns - mkdir -p $(distdir)/src/tls/validator - mkdir -p $(distdir)/src/gnutls - mkdir -p $(distdir)/src/openssl - mkdir -p $(distdir)/src/tools - mkdir -p $(distdir)/src/jsmn - mkdir -p $(distdir)/src/yxml - mkdir -p $(distdir)/src/ssl_dane - mkdir -p $(distdir)/doc - mkdir -p $(distdir)/spec - mkdir -p $(distdir)/spec/example - mkdir -p $(distdir)/stubby - mkdir -p $(distdir)/stubby/src - mkdir -p $(distdir)/stubby/src/yaml - mkdir -p $(distdir)/stubby/doc - mkdir -p $(distdir)/stubby/systemd - mkdir -p $(distdir)/stubby/contrib/upstart - cp $(srcdir)/configure.ac $(distdir) - cp $(srcdir)/configure $(distdir) - cp $(srcdir)/AUTHORS $(distdir) - cp $(srcdir)/ChangeLog $(distdir) - cp $(srcdir)/COPYING $(distdir) - cp $(srcdir)/INSTALL $(distdir) - cp $(srcdir)/LICENSE $(distdir) - cp $(srcdir)/NEWS $(distdir) - cp $(srcdir)/README.md $(distdir) - cp $(srcdir)/Makefile.in $(distdir) - cp $(srcdir)/install-sh $(distdir) - cp $(srcdir)/config.sub $(distdir) - cp $(srcdir)/config.guess $(distdir) - cp $(srcdir)/getdns.pc.in $(distdir) - cp $(srcdir)/getdns_ext_event.pc.in $(distdir) - cp libtool $(distdir) - cp $(srcdir)/ltmain.sh $(distdir) - cp $(srcdir)/m4/*.m4 $(distdir)/m4 - cp $(srcdir)/src/*.in $(distdir)/src - cp $(srcdir)/src/*.[ch] $(distdir)/src - cp $(srcdir)/src/*.symbols $(distdir)/src - cp $(srcdir)/src/extension/*.[ch] $(distdir)/src/extension - cp $(srcdir)/src/extension/*.symbols $(distdir)/src/extension - cp $(srcdir)/src/getdns/*.in $(distdir)/src/getdns - cp $(srcdir)/src/getdns/getdns_*.h $(distdir)/src/getdns - cp $(srcdir)/src/test/Makefile.in $(distdir)/src/test - cp $(srcdir)/src/test/*.[ch] $(distdir)/src/test - cp $(srcdir)/src/test/*.sh $(distdir)/src/test - cp $(srcdir)/src/test/*.good $(distdir)/src/test - cp $(srcdir)/src/compat/*.[ch] $(distdir)/src/compat - cp $(srcdir)/src/util/*.[ch] $(distdir)/src/util - cp -r $(srcdir)/src/util/orig-headers $(distdir)/src/util - cp -r $(srcdir)/src/util/auxiliary $(distdir)/src/util - cp $(srcdir)/src/gldns/*.[ch] $(distdir)/src/gldns - cp $(srcdir)/src/tls/*.[ch] $(distdir)/src/tls - cp $(srcdir)/src/tls/validator/*.[ch] $(distdir)/src/tls/validator - cp $(srcdir)/src/gnutls/*.[ch] $(distdir)/src/gnutls - cp $(srcdir)/src/openssl/*.[ch] $(distdir)/src/openssl - cp $(srcdir)/doc/Makefile.in $(distdir)/doc - cp $(srcdir)/doc/*.in $(distdir)/doc - cp $(srcdir)/doc/manpgaltnames $(distdir)/doc - cp $(srcdir)/spec/*.html $(distdir)/spec - cp $(srcdir)/spec/example/Makefile.in $(distdir)/spec/example - cp $(srcdir)/spec/example/*.[ch] $(distdir)/spec/example - cp $(srcdir)/src/tools/Makefile.in $(distdir)/src/tools - cp $(srcdir)/src/tools/*.[ch] $(distdir)/src/tools - cp $(srcdir)/stubby/stubby.yml.example $(distdir)/stubby - cp $(srcdir)/stubby/macos/stubby-setdns-macos.sh $(distdir)/stubby - cp $(srcdir)/stubby/src/*.[ch] $(distdir)/stubby/src - cp $(srcdir)/stubby/src/yaml/*.[ch] $(distdir)/stubby/src/yaml - cp $(srcdir)/stubby/COPYING $(distdir)/stubby - cp $(srcdir)/stubby/README.md $(distdir)/stubby - cp $(srcdir)/stubby/doc/stubby.1.in $(distdir)/stubby/doc - cp $(srcdir)/stubby/systemd/README.md $(distdir)/stubby/systemd - cp $(srcdir)/stubby/systemd/stubby.conf $(distdir)/stubby/systemd - cp $(srcdir)/stubby/systemd/stubby.service $(distdir)/stubby/systemd - cp $(srcdir)/stubby/contrib/upstart/stubby.conf $(distdir)/stubby/contrib/upstart - cp $(srcdir)/src/jsmn/*.[ch] $(distdir)/src/jsmn - cp $(srcdir)/src/jsmn/LICENSE $(distdir)/src/jsmn - cp $(srcdir)/src/jsmn/README.md $(distdir)/src/jsmn - cp $(srcdir)/src/yxml/*.[ch] $(distdir)/src/yxml - cp $(srcdir)/src/yxml/COPYING $(distdir)/src/yxml - cp $(srcdir)/src/yxml/yxml.pod $(distdir)/src/yxml - cp $(srcdir)/src/ssl_dane/danessl.[ch] $(distdir)/src/ssl_dane - cp $(srcdir)/src/ssl_dane/README.md $(distdir)/src/ssl_dane - rm -f $(distdir)/Makefile $(distdir)/src/Makefile $(distdir)/src/getdns/getdns.h $(distdir)/spec/example/Makefile $(distdir)/src/test/Makefile $(distdir)/doc/Makefile $(distdir)/src/config.h - -distcheck: $(distdir).tar.gz - gzip -cd $(distdir).tar.gz | tar xvf - - cd $(distdir) && ./configure - cd $(distdir) && $(MAKE) all - cd $(distdir) && $(MAKE) check - cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install - cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall - @remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \ - if test "$${remaining}" -ne 0; then - echo "@@@ $${remaining} file(s) remaining in stage directory!"; \ - exit 1; \ - fi - cd $(distdir) && $(MAKE) clean - rm -rf $(distdir) - @echo "*** Package $(distdir).tar.gz is ready for distribution" - -getdns.pc: $(srcdir)/getdns.pc.in - ./config.status $@ - -getdns_ext_event.pc: $(srcdir)/getdns_ext_event.pc.in - ./config.status $@ - -Makefile: $(srcdir)/Makefile.in config.status - ./config.status $@ - -configure.status: configure - ./config.status --recheck - -.PHONY: all distclean clean default doc test -FORCE: diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 3832d3d8..00000000 --- a/configure.ac +++ /dev/null @@ -1,1875 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. -# known to work with autconf version: autoconf (GNU Autoconf) 2.69 -# -# @configure_input@ -# -# Copyright (c) 2013, Verisign, Inc., NLnet Labs -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the names of the copyright holders nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -AC_PREREQ([2.68]) -AC_CONFIG_MACRO_DIRS([m4]) -sinclude(./m4/acx_openssl.m4) -sinclude(./m4/acx_getaddrinfo.m4) -sinclude(./m4/ac_lib_nettle.m4) -sinclude(./m4/ax_check_compile_flag.m4) -sinclude(./m4/pkg.m4) - -AC_INIT([getdns], [1.5.2], [team@getdnsapi.net], [getdns], [https://getdnsapi.net]) - -# Autoconf 2.70 will have set up runstatedir. 2.69 is frequently (Debian) -# patched to do the same, but frequently (MacOS) not. So add a with option -# for pid file location, and default it to runstatedir if present. -default_piddir=${runstatedir:-"${localstatedir}/run"} -AC_ARG_WITH([piddir], - [AS_HELP_STRING([--with-piddir=DIR], - [directory for pid files @<:@default=RUNSTATEDIR or LOCALSTATEDIR/run@:>@])], - [], - [with_piddir=${default_piddir}]) -AC_SUBST([runstatedir], [$with_piddir]) - -# Don't forget to put a dash in front of the release candidate!!! -# That is how it is done with semantic versioning! -# -AC_SUBST(RELEASE_CANDIDATE, []) -AC_SUBST(STUBBY_RELEASE_CANDIDATE, []) - -# Set current date from system if not set -AC_ARG_WITH([current-date], - [AS_HELP_STRING([--with-current-date] - [current date of the compilation, set to fixed date for reproducible builds @<:@default=system@:>@])], - [CURRENT_DATE="$with_current_date"], - [CURRENT_DATE="`date -u +%Y-%m-%dT%H:%M:%SZ`"]) - -AC_SUBST(GETDNS_VERSION, ["AC_PACKAGE_VERSION$RELEASE_CANDIDATE"]) -AC_SUBST(GETDNS_NUMERIC_VERSION, [0x01050200]) -AC_SUBST(API_VERSION, ["December 2015"]) -AC_SUBST(API_NUMERIC_VERSION, [0x07df0c00]) -GETDNS_COMPILATION_COMMENT="AC_PACKAGE_NAME $GETDNS_VERSION configured on $CURRENT_DATE for the $API_VERSION version of the API" - -AC_DEFINE_UNQUOTED([STUBBY_PACKAGE], ["stubby"], [Stubby package]) -AC_DEFINE_UNQUOTED([STUBBY_PACKAGE_STRING], ["0.2.6$STUBBY_RELEASE_CANDIDATE"], [Stubby package string]) - -# Library version -# --------------- -# current:revision:age -# (binary-api-number):(which-binary-api-version):(how-many-nrs-backwardscompat) -# if source code changes increment revision -# if any interfaces have been added/removed/changed since last update then -# increment current and set revision to 0 -# if any interfaces have been added since the last public release then increment age -# if any interfaces have been removed or changed since the last public release then -# set age to 0 -# -# getdns-0.1.4 had libversion 0:0:0 -# getdns-0.1.5 had libversion 1:0:0 -# getdns-0.1.6 had libversion 1:1:0 -# getdns-0.1.7 had libversion 1:2:1 (but should have had 2:0:1) -# getdns-0.1.8 had libversion 1:3:0 (but should have had 2:1:1) -# getdns-0.2.0 had libversion 2:2:1 -# getdns-0.3.0 had libversion 3:3:2 -# getdns-0.3.1 had libversion 3:4:2 -# getdns-0.3.2 had libversion 3:5:2 -# getdns-0.3.3 had libversion 3:6:2 -# getdns-0.5.0 had libversion 4:0:3 -# getdns-0.5.1 had libversion 4:1:3 (but should have been getdns-0.6.0) -# getdns-0.9.0 had libversion 5:0:4 -# getdns-1.0.0 had libversion 5:1:4 -# getdns-1.1.0 had libversion 6:0:0 -# getdns-1.1.1 had libversion 6:1:0 -# getdns-1.1.2 had libversion 7:0:1 -# getdns-1.1.3 had libversion 7:1:1 -# getdns-1.2.0 had libversion 8:0:2 -# getdns-1.2.1 had libversion 8:1:2 -# getdns-1.3.0 had libversion 9:0:3 -# getdns-1.4.0 had libversion 10:0:0 -# getdns-1.4.1 had libversion 10:1:0 -# getdns-1.4.2 had libversion 10:2:0 -# getdns-1.5.0 had libversion 11:0:1 -# getdns-1.5.1 had libversion 11:1:1 -# getdns-1.5.2 has libversion 11:2:1 -GETDNS_LIBVERSION=11:2:1 - -AC_SUBST(GETDNS_COMPILATION_COMMENT) -AC_SUBST(GETDNS_LIBVERSION) -AC_CONFIG_SRCDIR([src/getdns/getdns.h.in]) -# AM_INIT_AUTOMAKE -# LT_INIT -AC_CONFIG_MACRO_DIR([m4]) - -AC_PROG_CC -AC_PROG_CPP - -# Checks for programs. -HOSTOS="unix" -AC_CANONICAL_HOST -case "${host_os}" in -cygwin*|mingw*) - HOSTOS=windows - ;; -darwin*) - HOSTOS=macos - ;; -esac -AC_SUBST(HOSTOS) - - -CFLAGS="$CFLAGS" -WPEDANTICFLAG="" -WNOERRORFLAG="" -AC_PROG_CC_C99 -AX_CHECK_COMPILE_FLAG([-xc99],[CFLAGS="$CFLAGS -xc99"],[],[]) -AX_CHECK_COMPILE_FLAG([-Wall],[CFLAGS="$CFLAGS -Wall"],[],[]) -AX_CHECK_COMPILE_FLAG([-Wextra],[CFLAGS="$CFLAGS -Wextra"],[],[]) -AX_CHECK_COMPILE_FLAG([-Wpedantic],[WPEDANTICFLAG="-Wpedantic"],[],[]) -AX_CHECK_COMPILE_FLAG([-Wno-error=unused-parameter],[WNOERRORFLAG="-Wno-error=unused-parameter"],[],[]) -AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter],[WNOERRORFLAG="$WNOERRORFLAG -Wno-unused-parameter"],[],[]) -AC_SUBST(WPEDANTICFLAG) -AC_SUBST(WNOERRORFLAG) - -case "$host_os" in - linux* ) CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE" - ;; - solaris* ) CFLAGS="$CFLAGS -D__EXTENSIONS__" # for strdup() from - ;; - darwin* ) CFLAGS="$CFLAGS -D_DARWIN_C_SOURCE" # for strlcpy() from - ;; -esac - -# always use ./libtool unless override from commandline (libtool=mylibtool) -if test -z "$libtool"; then - libtool="`pwd`/libtool" -fi -AC_SUBST(libtool) -AC_PROG_LIBTOOL -AC_PROG_INSTALL - - -initial_LIBS="$LIBS" -initial_LDFLAGS="$LDFLAGS" - -dnl Add option to disable the evil rpath. Check whether to use rpath or not. -dnl Adds the --disable-rpath option. Uses trick to edit the ./libtool. -AC_DEFUN([ACX_ARG_RPATH], -[ -AC_ARG_ENABLE(rpath, - [ --disable-rpath disable hardcoded rpath (default=enabled)], - enable_rpath="$enableval", enable_rpath=yes) -if test "x$enable_rpath" = xno; then - dnl AC_MSG_RESULT([Fixing libtool for -rpath problems.]) - AC_CONFIG_COMMANDS([disable-rpath], [ - sed < libtool > libtool-2 \ - 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/' - mv libtool-2 libtool - chmod 755 libtool - libtool="./libtool" - ]) -fi -]) -ACX_ARG_RPATH - -AC_ARG_ENABLE(debug-req, AC_HELP_STRING([--enable-debug-req], [Enable request debugging])) -AC_ARG_ENABLE(debug-sched, AC_HELP_STRING([--enable-debug-sched], [Enable scheduling debugging messages])) -AC_ARG_ENABLE(debug-stub, AC_HELP_STRING([--enable-debug-stub], [Enable stub debugging messages])) -AC_ARG_ENABLE(debug-daemon, AC_HELP_STRING([--enable-debug-daemon], [Enable daemon debugging messages])) -AC_ARG_ENABLE(debug-sec, AC_HELP_STRING([--enable-debug-sec], [Enable dnssec debugging messages])) -AC_ARG_ENABLE(debug-server, AC_HELP_STRING([--enable-debug-server], [Enable server debugging messages])) -AC_ARG_ENABLE(debug-anchor, AC_HELP_STRING([--enable-debug-anchor], [Enable anchor debugging messages])) -AC_ARG_ENABLE(all-debugging, AC_HELP_STRING([--enable-all-debugging], [Enable scheduling, stub and dnssec debugging])) -case "$enable_all_debugging" in - yes) - enable_debug_req=yes - enable_debug_sched=yes - enable_debug_stub=yes - enable_debug_daemon=yes - enable_debug_sec=yes - enable_debug_server=yes - enable_debug_anchor=yes - ;; - no|*) - ;; -esac -case "$enable_debug_req" in - yes) - AC_DEFINE_UNQUOTED([REQ_DEBUG], [1], [Define this to enable printing of request debugging messages.]) - ;; - no|*) - ;; -esac -case "$enable_debug_sched" in - yes) - AC_DEFINE_UNQUOTED([SCHED_DEBUG], [1], [Define this to enable printing of scheduling debugging messages.]) - ;; - no|*) - ;; -esac -case "$enable_debug_stub" in - yes) - AC_DEFINE_UNQUOTED([STUB_DEBUG], [1], [Define this to enable printing of stub debugging messages.]) - ;; - no|*) - ;; -esac -case "$enable_debug_daemon" in - yes) - AC_DEFINE_UNQUOTED([DAEMON_DEBUG], [1], [Define this to enable printing of daemon debugging messages.]) - ;; - no|*) - ;; -esac -case "$enable_debug_sec" in - yes) - AC_DEFINE_UNQUOTED([SEC_DEBUG], [1], [Define this to enable printing of dnssec debugging messages.]) - ;; - no|*) - ;; -esac -case "$enable_debug_server" in - yes) - AC_DEFINE_UNQUOTED([SERVER_DEBUG], [1], [Define this enable printing of server debugging messages.]) - ;; - no|*) - ;; -esac -case "$enable_debug_anchor" in - yes) - AC_DEFINE_UNQUOTED([ANCHOR_DEBUG], [1], [Define this enable printing of anchor debugging messages.]) - ;; - no|*) - ;; -esac - - -dnl Hidden debugging options -dnl -AC_ARG_ENABLE(debug-keep-connections-open,[]) -case "$enable_debug_keep_connections_open" in - yes) - AC_DEFINE_UNQUOTED([KEEP_CONNECTIONS_OPEN_DEBUG], [1], [Do not set this]) - ;; - no) - ;; -esac - - -DEFAULT_EVENTLOOP=select_eventloop -AC_CHECK_HEADERS([signal.h sys/poll.h poll.h sys/resource.h sys/types.h sys/stat.h],,, [AC_INCLUDES_DEFAULT]) -AC_ARG_ENABLE(poll-eventloop, AC_HELP_STRING([--disable-poll-eventloop], [Disable default eventloop based on poll (default=enabled if available)])) -case "$enable_poll_eventloop" in - no) - ;; - yes|*) -AC_MSG_CHECKING(for poll) -AC_LINK_IFELSE([AC_LANG_PROGRAM([ -#ifdef HAVE_SYS_POLL_H -#include -#else -#include -#endif -], [int rc; rc = poll((struct pollfd *)(0), 0, 0);])], [ -AC_MSG_RESULT(yes) -AC_DEFINE_UNQUOTED([USE_POLL_DEFAULT_EVENTLOOP], [1], [Define this to enable a default eventloop based on poll().]) -DEFAULT_EVENTLOOP=poll_eventloop -],[AC_MSG_RESULT(no)]) - ;; -esac -AC_SUBST(DEFAULT_EVENTLOOP) - -AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--disable-tcp-fastopen], Disable TCP Fast Open (default=enabled if available)), - enable_tcp_fastopen="$enableval", enable_tcp_fastopen=yes) -if test "x$enable_tcp_fastopen" = xno; then - AC_MSG_WARN([TCP Fast Open is disabled]) -else - case `uname` in - Darwin) AC_CHECK_DECL([CONNECT_RESUME_ON_READ_WRITE], [AC_DEFINE_UNQUOTED([USE_OSX_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.])], - [AC_MSG_WARN([TCP Fast Open is not available, continuing without])], [#include ]) - ;; - *) - AC_CHECK_HEADERS([sys/socket.h netinet/tcp.h],,, [AC_INCLUDES_DEFAULT]) - AC_CHECK_DECL([TCP_FASTOPEN], [ - AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.]) - AC_CHECK_DECLS([TCP_FASTOPEN,MSG_FASTOPEN,TCP_FASTOPEN_CONNECT], [], [], [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_NETINET_TCP_H -# include -#endif -]) - ], [ - AC_MSG_WARN([TCP Fast Open is not available, continuing without]) - ], [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_NETINET_TCP_H -# include -#endif -]) - ;; - esac -fi - -AC_ARG_ENABLE(native-stub-dnssec, AC_HELP_STRING([--disable-native-stub-dnssec], [Disable native stub DNSSEC support])) -case "$enable_native_stub_dnssec" in - no) - ;; - yes|*) - AC_DEFINE_UNQUOTED([STUB_NATIVE_DNSSEC], [1], [Define this to enable native stub DNSSEC support.]) - ;; -esac - -# check wether strptime also works -AC_DEFUN([AC_CHECK_STRPTIME_WORKS], -[AC_REQUIRE([AC_PROG_CC]) -AC_MSG_CHECKING(whether strptime works) -if test c${cross_compiling} = cno; then -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#define _XOPEN_SOURCE 600 -#include -int main(void) { struct tm tm; char *res; -res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm); -if (!res) return 2; -res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm); -if (!res) return 1; return 0; } -]])] , [eval "ac_cv_c_strptime_works=yes"], [eval "ac_cv_c_strptime_works=no"]) -else -eval "ac_cv_c_strptime_works=maybe" -fi -AC_MSG_RESULT($ac_cv_c_strptime_works) -if test $ac_cv_c_strptime_works = no; then -AC_LIBOBJ(strptime) -else -AC_DEFINE_UNQUOTED([STRPTIME_WORKS], 1, [use default strptime.]) -fi -])dnl - -AC_CHECK_FUNCS([strptime],[AC_CHECK_STRPTIME_WORKS],[AC_LIBOBJ([strptime])]) - -# search to set include and library paths right -# find libidn (no libidn on windows though) -AC_CHECK_HEADERS([windows.h winsock.h stdio.h winsock2.h ws2tcpip.h],,, [AC_INCLUDES_DEFAULT]) -ACX_CHECK_GETADDRINFO_WITH_INCLUDES - -AC_ARG_WITH(resolvconf, AS_HELP_STRING([--with-resolvconf=PATH], - [Set the resolver configuration file path. Defaults to /etc/resolv.conf or values retrieved via GetNetworkParams() on Windows]), - [], [withval="/etc/resolv.conf"]) -AC_DEFINE_UNQUOTED([GETDNS_FN_RESOLVCONF], ["$withval"], [Path to resolver configuration file]) - -AC_ARG_WITH(hosts, AS_HELP_STRING([--with-hosts=PATH], - [Set the static table lookup for hostnames path. Defaults to /etc/hosts or C:\Windows\System32\Drivers\etc\hosts on Windows]), - [], [ -if test "$USE_WINSOCK" = 1; then - withval="C:\\\\Windows\\\\System32\\\\Drivers\\\\etc\\\\hosts" -else - withval="/etc/hosts" -fi -]) -AC_DEFINE_UNQUOTED([GETDNS_FN_HOSTS], ["$withval"], [Path to static table lookup for hostnames]) - -AC_ARG_WITH(fd-setsize, AS_HELP_STRING([--with-fd-setsize=size], - [Set maximum file descriptor number that can be used by select]), - [], [withval="no"]) -case "$withval" in -no) - ;; -*) - AC_DEFINE_UNQUOTED([FD_SETSIZE], [$withval], [Alternate value for the FD_SETSIZE]) - my_enable_unbound_event_api=1 - ;; -esac - -AC_ARG_WITH(max-udp-backoff, AS_HELP_STRING([--with-max-udp-backoff=], - [Set the maximum number of messages that can be sent to other upstreams before the upstream which has previously timed out will be tried again. (defaults to 1000)]),, [withval="1000"]) -AC_DEFINE_UNQUOTED([UDP_MAX_BACKOFF], [$withval], [Maximum number of queries an failed UDP upstream passes before it will retry]) - -#---- check for pthreads library -AC_ARG_WITH(libpthread, AS_HELP_STRING([--without-libpthread], - [Disable libpthread (default is autodetect)]), - [], [withval="yes"]) - -case "$withval" in -yes) - AC_SEARCH_LIBS([pthread_mutex_init],[pthread], [ - AC_DEFINE([HAVE_PTHREAD], [1], [Have pthreads library]) - LIBS="-lpthread $LIBS" - ], [AC_MSG_WARN([pthreads not available])]) - ;; -*) - ;; -esac - -USE_NSS="no" -dnl AC_ARG_WITH([nss], AC_HELP_STRING([--with-nss=path], -dnl [use libnss instead of openssl, installed at path.]), -dnl [ -dnl USE_NSS="yes" -dnl AC_DEFINE(HAVE_NSS, 1, [Use libnss for crypto]) -dnl if test "$withval" != "" -a "$withval" != "yes"; then -dnl CPPFLAGS="$CPPFLAGS -I$withval/include/nss3" -dnl LDFLAGS="$LDFLAGS -L$withval/lib" -dnl ACX_RUNTIME_PATH_ADD([$withval/lib]) -dnl CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS" -dnl else -dnl CPPFLAGS="$CPPFLAGS -I/usr/include/nss3" -dnl CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS" -dnl fi -dnl LIBS="$LIBS -lnss3 -lnspr4" -dnl SSLLIB="" -dnl ] -dnl ) - -# libnettle -USE_NETTLE="no" -dnl AC_ARG_WITH([nettle], AC_HELP_STRING([--with-nettle=path], -dnl [use libnettle as crypto library, installed at path.]), -dnl [ -dnl USE_NETTLE="yes" -dnl AC_DEFINE(HAVE_NETTLE, 1, [Use libnettle for crypto]) -dnl AC_CHECK_HEADERS([nettle/dsa-compat.h],,, [AC_INCLUDES_DEFAULT]) -dnl if test "$withval" != "" -a "$withval" != "yes"; then -dnl CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" -dnl LDFLAGS="$LDFLAGS -L$withval/lib" -dnl ACX_RUNTIME_PATH_ADD([$withval/lib]) -dnl else -dnl CPPFLAGS="$CPPFLAGS -I/usr/include/nettle" -dnl fi -dnl LIBS="$LIBS -lhogweed -lnettle -lgmp" -dnl SSLLIB="" -dnl ] -dnl ) - -# Which TLS and crypto libs to use. -AC_ARG_WITH([gnutls], - [AS_HELP_STRING([--with-gnutls], - [use GnuTLS instead of OpenSSL])], - [ - PKG_CHECK_MODULES([libgnutls], [gnutls >= 3.5.0]) - PKG_CHECK_MODULES([libgnutlsdane], [gnutls-dane >= 3.5.0]) - LIBS="$libgnutls_LIBS $libgnutlsdane_LIBS $LIBS" - CFLAGS="$libgnutls_CFLAGS $libgnutlsdane_CFLAGS $CFLAGS" - AC_SUBST([TLSDIR], 'gnutls') - AC_DEFINE([USE_GNUTLS], [1], [Use the GnuTLS library]) - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - - AX_LIB_NETTLE(yes) - USE_NETTLE="yes" - AC_DEFINE(HAVE_NETTLE, 1, [Use libnettle for crypto]) - AC_CHECK_HEADERS([nettle/dsa-compat.h],,, [AC_INCLUDES_DEFAULT]) - fi - # Zero configuration DNSSEC we still need libcrypto - AC_CHECK_HEADERS([openssl/x509.h],,, [AC_INCLUDES_DEFAULT]) - AC_CHECK_LIB([crypto], [X509_STORE_new], [ - AC_DEFINE_UNQUOTED([HAVE_LIBCRYPTO], [2], [Define to 1 if you have the `crypto' library (-lcrypto).]) dnl - LIBS="-lcrypto $LIBS" - ], [ - AC_MSG_ERROR([libcrypto still needed for Zero configuration DNSSEC]) - ]) - ], - [ - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - ACX_WITH_SSL - fi - ACX_LIB_SSL - AC_SUBST([TLSDIR], 'openssl') - - # Verify OpenSSL is at least version 1.0.2. - # We also check it's not LibreSSL, but that's a little later, not here. - AC_CHECK_FUNCS([X509_check_host SSL_dane_enable]) - if test "x$ac_cv_func_X509_check_host" != xyes; then - AC_MSG_ERROR([getdns requires OpenSSL version 1.0.2 or later]) - fi - - AC_MSG_CHECKING([whether we need to compile/link DANE support]) - DANESSL_XTRA_OBJS="" - if test "x$ac_cv_func_SSL_dane_enable" = xyes; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - AC_DEFINE([USE_DANESSL], [1], [Define this to use DANE functions from the ssl_dane/danessl library.]) - DANESSL_XTRA_OBJS="danessl.lo" - fi - AC_SUBST(DANESSL_XTRA_OBJS) - ]) - - -# openssl -if test $USE_NSS = "no" -a $USE_NETTLE = "no" ; then -AC_MSG_CHECKING([for LibreSSL]) -if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then - AC_MSG_RESULT([yes]) - AC_MSG_ERROR([getdns does not support LibreSSL]) -else - AC_MSG_RESULT([no]) -fi -AC_CHECK_HEADERS([openssl/conf.h openssl/ssl.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS([openssl/bn.h openssl/rsa.h openssl/dsa.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_FUNCS([OPENSSL_config EVP_md5 EVP_sha1 EVP_sha224 EVP_sha256 EVP_sha384 EVP_sha512 FIPS_mode ENGINE_load_cryptodev EVP_PKEY_keygen ECDSA_SIG_get0 EVP_MD_CTX_new EVP_PKEY_base_id HMAC_CTX_new HMAC_CTX_free TLS_client_method DSA_SIG_set0 EVP_dss1 EVP_DigestVerify OpenSSL_version_num OpenSSL_version SSL_CTX_dane_enable SSL_dane_enable SSL_dane_tlsa_add X509_check_host X509_get_notAfter X509_get0_notAfter SSL_CTX_set_ciphersuites SSL_set_ciphersuites OPENSSL_init_crypto DSA_set0_pqg DSA_set0_key RSA_set0_key]) -AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto,SSL_CTX_set1_curves_list,SSL_set1_curves_list,SSL_set_min_proto_version,SSL_get_min_proto_version], [], [], []) -fi - -AC_ARG_ENABLE(sha1, AC_HELP_STRING([--disable-sha1], [Disable SHA1 RRSIG support, does not disable nsec3 support])) - case "$enable_sha1" in - no) - ;; - yes|*) - AC_DEFINE([USE_SHA1], [1], [Define this to enable SHA1 support.]) - ;; -esac - -AC_ARG_ENABLE(sha2, AC_HELP_STRING([--disable-sha2], [Disable SHA256 and SHA512 RRSIG support])) -case "$enable_sha2" in - no) - ;; - yes|*) - AC_DEFINE([USE_SHA2], [1], [Define this to enable SHA256 and SHA512 support.]) - ;; -esac - -# check wether gost also works -AC_DEFUN([AC_CHECK_GOST_WORKS], -[AC_REQUIRE([AC_PROG_CC]) -AC_MSG_CHECKING([if GOST works]) -if test c${cross_compiling} = cno; then -BAKCFLAGS="$CFLAGS" -if test -n "$ssldir"; then - CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib" -fi -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include -#include -#include -/* routine to load gost (from gldns) */ -int load_gost_id(void) -{ - static int gost_id = 0; - const EVP_PKEY_ASN1_METHOD* meth; - ENGINE* e; - - if(gost_id) return gost_id; - - /* see if configuration loaded gost implementation from other engine*/ - meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1); - if(meth) { - EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth); - return gost_id; - } - - /* see if engine can be loaded already */ - e = ENGINE_by_id("gost"); - if(!e) { - /* load it ourself, in case statically linked */ - ENGINE_load_builtin_engines(); - ENGINE_load_dynamic(); - e = ENGINE_by_id("gost"); - } - if(!e) { - /* no gost engine in openssl */ - return 0; - } - if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { - ENGINE_finish(e); - ENGINE_free(e); - return 0; - } - - meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1); - if(!meth) { - /* algo not found */ - ENGINE_finish(e); - ENGINE_free(e); - return 0; - } - EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth); - return gost_id; -} -int main(void) { - EVP_MD_CTX* ctx; - const EVP_MD* md; - unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */ - const char* str = "Hello world"; - const unsigned char check[] = { - 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 , - 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 , - 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d , - 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d - }; - OPENSSL_config(NULL); - (void)load_gost_id(); - md = EVP_get_digestbyname("md_gost94"); - if(!md) return 1; - memset(digest, 0, sizeof(digest)); - ctx = EVP_MD_CTX_create(); - if(!ctx) return 2; - if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3; - if(!EVP_DigestUpdate(ctx, str, 10)) return 4; - if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5; - /* uncomment to see the hash calculated. - {int i; - for(i=0; i<32; i++) - printf(" %2.2x", (int)digest[i]); - printf("\n");} - */ - if(memcmp(digest, check, sizeof(check)) != 0) - return 6; - return 0; -} -]])] , [eval "ac_cv_c_gost_works=yes"], [eval "ac_cv_c_gost_works=no"]) -CFLAGS="$BAKCFLAGS" -else -eval "ac_cv_c_gost_works=maybe" -fi -AC_MSG_RESULT($ac_cv_c_gost_works) -])dnl - -AC_ARG_ENABLE(gost, AC_HELP_STRING([--disable-gost], [Disable GOST support])) -use_gost="no" -if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then -case "$enable_gost" in - no) - ;; - *) - AC_CHECK_FUNC(EVP_PKEY_set_type_str, [:],[AC_MSG_ERROR([OpenSSL 1.0.0 is needed for GOST support])]) - AC_CHECK_FUNC(EC_KEY_new, [], [AC_MSG_ERROR([OpenSSL does not support ECC, needed for GOST support])]) - AC_CHECK_GOST_WORKS - if test "$ac_cv_c_gost_works" != no; then - use_gost="yes" - AC_DEFINE([USE_GOST], [1], [Define this to enable GOST support.]) - fi - ;; -esac -fi dnl !USE_NSS && !USE_NETTLE - -AC_ARG_ENABLE(ecdsa, AC_HELP_STRING([--disable-ecdsa], [Disable ECDSA support])) -use_ecdsa="no" -case "$enable_ecdsa" in - no) - ;; - *) - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - AC_CHECK_FUNC(ECDSA_sign, [], [AC_MSG_ERROR([OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa])]) - AC_CHECK_FUNC(SHA384_Init, [], [AC_MSG_ERROR([OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa])]) - AC_CHECK_DECLS([NID_X9_62_prime256v1, NID_secp384r1], [], [AC_MSG_ERROR([OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa])], [AC_INCLUDES_DEFAULT -#include - ]) - # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency) - AC_MSG_CHECKING([if openssl supports SHA2 and ECDSA with EVP]) - if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then - if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then - AC_MSG_RESULT([no]) - AC_DEFINE_UNQUOTED([USE_ECDSA_EVP_WORKAROUND], [1], [Define this to enable an EVP workaround for older openssl]) - else - AC_MSG_RESULT([yes]) - fi - else - # not OpenSSL, thus likely LibreSSL, which supports it - AC_MSG_RESULT([yes]) - fi - fi - # we now know we have ECDSA and the required curves. - AC_DEFINE_UNQUOTED([USE_ECDSA], [1], [Define this to enable ECDSA support.]) - use_ecdsa="yes" - ;; -esac - -AC_ARG_ENABLE(dsa, AC_HELP_STRING([--disable-dsa], [Disable DSA support])) -case "$enable_dsa" in - no) - ;; - *) dnl default - # detect if DSA is supported, and turn it off if not. - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - AC_CHECK_FUNC(DSA_SIG_new, [ - AC_CHECK_TYPE(DSA_SIG*, [ - AC_DEFINE_UNQUOTED([USE_DSA], [1], [Define this to enable DSA support.]) - ], [if test "x$enable_dsa" = "xyes"; then AC_MSG_ERROR([OpenSSL does not support DSA and you used --enable-dsa.]) - fi ], [ -AC_INCLUDES_DEFAULT -#ifdef HAVE_OPENSSL_ENGINE_H -# include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif -]) - ], [if test "x$enable_dsa" = "xyes"; then AC_MSG_ERROR([OpenSSL does not support DSA and you used --enable-dsa.]) - fi ]) - else - AC_DEFINE_UNQUOTED([USE_DSA], [1], [Define this to enable DSA support.]) - fi - ;; -esac - -AC_ARG_ENABLE(ed25519, AC_HELP_STRING([--disable-ed25519], [Disable ED25519 support])) -use_ed25519="no" -case "$enable_ed25519" in - no) - ;; - *) - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - AC_CHECK_DECLS([NID_ED25519], [ - use_ed25519="yes" - ], [ if test "x$enable_ed25519" = "xyes"; then AC_MSG_ERROR([OpenSSL does not support ED25519 and you used --enable-ed25519.]) - fi ], [AC_INCLUDES_DEFAULT -#include - ]) - fi - if test $USE_NETTLE = "yes"; then - AC_CHECK_HEADERS([nettle/eddsa.h], use_ed25519="yes",, [AC_INCLUDES_DEFAULT]) - fi - if test $use_ed25519 = "yes"; then - AC_DEFINE_UNQUOTED([USE_ED25519], [1], [Define this to enable ED25519 support.]) - fi - ;; -esac - -AC_ARG_ENABLE(ed448, AC_HELP_STRING([--disable-ed448], [Disable ED448 support])) -use_ed448="no" -case "$enable_ed448" in - no) - ;; - *) - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - AC_CHECK_DECLS([NID_ED448], [ - use_ed448="yes" - ], [ if test "x$enable_ed448" = "xyes"; then AC_MSG_ERROR([OpenSSL does not support ED448 and you used --enable-ed448.]) - fi ], [AC_INCLUDES_DEFAULT -#include - ]) - fi - if test $use_ed448 = "yes"; then - AC_DEFINE_UNQUOTED([USE_ED448], [1], [Define this to enable ED448 support.]) - fi - ;; -esac - -AC_ARG_ENABLE(all-drafts, AC_HELP_STRING([--enable-all-drafts], [Enables the draft mdns client support])) -case "$enable_all_drafts" in - yes) - AC_DEFINE_UNQUOTED([HAVE_MDNS_SUPPORT], [1], [Define this to enable the draft mdns client support.]) - ;; - no|*) - ;; -esac -AC_ARG_ENABLE(dnssec-roadblock-avoidance, AC_HELP_STRING([--disable-dnssec-roadblock-avoidance], [Disable dnssec roadblock avoidance])) -case "$enable_dnssec_roadblock_avoidance" in - no) - ;; - yes|*) - AC_DEFINE_UNQUOTED([DNSSEC_ROADBLOCK_AVOIDANCE], [1], [Define this to enable the experimental dnssec roadblock avoidance.]) - ;; -esac - -AC_ARG_ENABLE(edns-cookies, AC_HELP_STRING([--disable-edns-cookies], [Disable edns cookies])) -case "$enable_edns_cookies" in - no) - ;; - yes|*) - if test "x_$HAVE_SSL" != "x_yes" -a $USE_NETTLE = "no"; then - AC_MSG_ERROR([edns cookies needs crypto library which is not available, please rerun with --disable-edns-cookies]) - fi - AC_DEFINE_UNQUOTED([EDNS_COOKIES], [1], [Define this to enable the experimental edns cookies.]) - ;; -esac -AC_DEFINE_UNQUOTED([EDNS_COOKIE_OPCODE], [10], [The edns cookie option code.]) -AC_DEFINE_UNQUOTED([EDNS_COOKIE_ROLLOVER_TIME], [(24 * 60 * 60)], [How often the edns client cookie is refreshed.]) - -AC_DEFINE_UNQUOTED([MAXIMUM_UPSTREAM_OPTION_SPACE], [3000], [limit for dynamically-generated DNS options]) -AC_DEFINE_UNQUOTED([EDNS_PADDING_OPCODE], [12], [The edns padding option code.]) - -AC_ARG_ENABLE(draft-mdns-support, AC_HELP_STRING([--enable-draft-mdns-support], [Enable draft mdns client support])) -case "$enable_draft_mdns_support" in - yes) - AC_DEFINE_UNQUOTED([HAVE_MDNS_SUPPORT], [1], [Define this to enable the draft mdns client support.]) - ;; - no|*) - ;; -esac - -my_with_libunbound=1 -AC_ARG_ENABLE(stub-only, AC_HELP_STRING([--enable-stub-only], [Restricts resolution modes to STUB (which will be the default mode). Removes the libunbound dependency.])) -case "$enable_stub_only" in - yes) - my_with_libunbound=0 - ;; - no|*) - ;; -esac - -my_with_yaml=0 -AC_ARG_ENABLE(yaml-config,) -case "$enable_yaml_config" in - yes) - AC_DEFINE_UNQUOTED([USE_YAML_CONFIG], [1], [Define this to enable YAML config support.]) - AC_DEFINE_UNQUOTED([HAVE_GETDNS_YAML2DICT], [1], [Define this to enable getdns_yaml2dict function.]) - - GETDNS_XTRA_OBJS="convert_yaml_to_json.lo" - my_with_yaml=1 - ;; - no|*) - GETDNS_XTRA_OBJS="" - ;; -esac -AC_SUBST(GETDNS_XTRA_OBJS) - -if test "$USE_WINSOCK" = 1; then - AC_MSG_NOTICE([ Building on Windows ... YES! ]) - AC_DEFINE_UNQUOTED([GETDNS_ON_WINDOWS], [1], [Define this to enable Windows build.]) - AC_DEFINE_UNQUOTED([STUB_NATIVE_DNSSEC], [1]) - LIBS="$LIBS -lgdi32 -liphlpapi" -fi - -dnl sigset_t or _sigset_t? MinGW is latter by default. -AC_CHECK_TYPES([sigset_t], - [], - [AC_CHECK_TYPES([_sigset_t], - [], - [AC_MSG_ERROR([Can't find type `sigset_t' or type `_sigset_t'])], - [AC_INCLUDES_DEFAULT -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - ]) - ], - [AC_INCLUDES_DEFAULT -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -]) -AC_CHECK_FUNCS(sigemptyset sigfillset sigaddset) - -my_with_libidn=1 -AC_ARG_WITH(libidn, AS_HELP_STRING([--with-libidn=pathname], - [path to libidn (default: search /usr/local ..)]), - [], [withval="yes"]) -if test x_$withval = x_yes; then - for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do - if test -f "$dir/include/idna.h"; then - CFLAGS="$CFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - AC_MSG_NOTICE([Found libidn in $dir]) - break - fi - if test -f "$dir/include/idn/idna.h"; then - CFLAGS="$CFLAGS -I$dir/include/idn" - LDFLAGS="$LDFLAGS -L$dir/lib" - AC_MSG_NOTICE([Found libidn in $dir]) - break - fi - done - if test -f "/usr/include/idn/idna.h"; then - CFLAGS="$CFLAGS -I/usr/include/idn" - #LDFLAGS="$LDFLAGS -L/usr/lib" - AC_MSG_NOTICE([Found libidn in /usr]) - fi -else - if test x_$withval != x_no; then - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - else - my_with_libidn=0 - fi -fi - -my_with_libidn2=1 -AC_ARG_WITH(libidn2, AS_HELP_STRING([--with-libidn2=pathname], - [path to libidn2 (default: search /usr/local ..)]), - [], [withval="yes"]) -if test x_$withval = x_yes; then - for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do - if test -f "$dir/include/idn2.h"; then - CFLAGS="$CFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - AC_MSG_NOTICE([Found libidn2 in $dir]) - break - fi - if test -f "$dir/include/idn2/idn2.h"; then - CFLAGS="$CFLAGS -I$dir/include/idn2" - LDFLAGS="$LDFLAGS -L$dir/lib" - AC_MSG_NOTICE([Found libidn2 in $dir]) - break - fi - done - if test -f "/usr/include/idn2/idn2.h"; then - CFLAGS="$CFLAGS -I/usr/include/idn2" - #LDFLAGS="$LDFLAGS -L/usr/lib" - AC_MSG_NOTICE([Found libidn2 in /usr]) - fi -else - if test x_$withval != x_no; then - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - else - my_with_libidn2=0 - fi -fi - -if test $my_with_libunbound = 1 -then - # find libunbound - AC_ARG_WITH(libunbound, AS_HELP_STRING([--with-libunbound=pathname], - [path to libunbound (default: search /usr/local ..)]), - [], [withval="yes"]) - if test x_$withval = x_yes; then - for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do - if test -f "$dir/include/unbound.h"; then - CFLAGS="$CFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - AC_MSG_NOTICE([Found libunbound in $dir]) - break - fi - done - else - if test x_$withval != x_no; then - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - else - AC_DEFINE_UNQUOTED([DISABLE_RESOLUTION_RECURSING], [1], [Define this to disable recursing resolution type.]) - my_with_libunbound=0 - fi - fi -fi - -# Checks for libraries. -found_all_libs=1 -MISSING_DEPS="" -MISSING_SEP="" - -working_libidn2=0 -if test $my_with_libidn2 = 1 -then - AC_MSG_NOTICE([Checking for dependency libidn2]) - AC_CHECK_LIB([idn2], [idn2_to_unicode_8z8z], [ - working_libidn2=1 - LIBS="-lidn2 $LIBS" - AC_DEFINE_UNQUOTED([HAVE_LIBIDN2], [1], [Define to 1 if you have the `idn2' library (-lidn).]) dnl ` - ], [ - MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2 (version 2.0.0 or higher)" - MISSING_SEP=", " - ]) -fi -if test $working_libidn2 = 0 -then - if test $my_with_libidn = 1 - then - AC_MSG_NOTICE([Checking for dependency libidn]) - AC_CHECK_LIB([idn], [idna_to_ascii_8z], [], [ - MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn" - MISSING_SEP=", " - found_all_libs=0 - ]) - else - if test $my_with_libidn2 = 1 - then - found_all_libs=0 - fi - fi -fi - -AC_ARG_ENABLE(unbound-event-api, AC_HELP_STRING([--disable-unbound-event-api], [Disable usage of libunbounds event API])) -case "$enable_unbound_event_api" in - no) - my_enable_unbound_event_api=0 - ;; - yes|*) - my_enable_unbound_event_api=1 - ;; -esac - - -if test $my_with_libunbound = 1 -then - AC_CHECK_HEADERS([unbound-event.h],,, [AC_INCLUDES_DEFAULT]) - AC_MSG_NOTICE([Checking for dependency libunbound]) - AC_CHECK_LIB([unbound], [ub_fd], [ - AC_DEFINE_UNQUOTED([HAVE_LIBUNBOUND], [1], [Define to 1 if you have the `unbound' library (-lunbound).]) dnl ` - LIBS="-lunbound $LIBS" - - if test $my_enable_unbound_event_api = 1 - then - AC_CHECK_FUNC([ub_ctx_create_ub_event], [ - AC_DEFINE_UNQUOTED([HAVE_UNBOUND_EVENT_API], [1], [Define this when libunbound is compiled with the --enable-event-api option.]) - ]) - fi - AC_CHECK_FUNCS([ub_ctx_set_stub]) - ], [ - MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libunbound" - MISSING_SEP=", " - found_all_libs=0 - ]) -fi - -AC_PATH_PROG([DOXYGEN], [doxygen]) -if test -z "$DOXYGEN"; - then AC_MSG_WARN([doxygen not found, continuing without]) -fi - -# Checks for header files. -AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h],,, [AC_INCLUDES_DEFAULT]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_SIZE_T -AC_TYPE_UINT16_T -AC_TYPE_UINT32_T -AC_TYPE_UINT64_T -AC_TYPE_UINT8_T -AC_CHECK_TYPES([u_char]) - -AC_CHECK_FUNCS([fcntl]) -# check ioctlsocket -AC_MSG_CHECKING(for ioctlsocket) -AC_LINK_IFELSE([AC_LANG_PROGRAM([ -#ifdef HAVE_WINSOCK2_H -#include -#endif -], [ - (void)ioctlsocket(0, 0, NULL); -])], [ -AC_MSG_RESULT(yes) -AC_DEFINE(HAVE_IOCTLSOCKET, 1, [if the function 'ioctlsocket' is available]) -],[AC_MSG_RESULT(no)]) - - -# Check for libraries for other things than libgetdns after this point, -# so the getdns libraries can be reset with: -# -# LIBS="$getdns_LIBS" -# LDFLAGS="$getdns_LDFLAGS" -# -# afterwards. -getdns_LIBS="$LIBS" -getdns_LDFLAGS="$LDFLAGS" -getdns_CFLAGS="$CFLAGS" - -#-------------------- libraries needed for libcheck -LIBS="$initial_LIBS" - -CHECK_GETDNS="" -CHECK_LIBS="" -CHECK_CFLAGS="" - -PKG_CHECK_MODULES([CHECK],[check >= 0.9.6],[CHECK_GETDNS="check_getdns"],[ -AC_SEARCH_LIBS([floor], [m]) -AC_SEARCH_LIBS([timer_create], [rt]) -AC_SEARCH_LIBS([pthread_create], [pthread]) -AC_SEARCH_LIBS([srunner_create],[check check_pic],[ -CHECK_GETDNS="check_getdns" -CHECK_LIBS="$LIBS"],[ -AC_SUBST(NOLIBCHECK, [nolibcheck]) -AC_MSG_WARN([libcheck not found or usable; unit tests will not be compiled and run])])]) - -LIBS="$getdns_LIBS" - -AC_SUBST([CHECK_GETDNS]) -AC_SUBST([CHECK_LIBS]) -AC_SUBST([CHECK_CFLAGS]) -# end libraries needed for libcheck - -#-------------------- libevent extension -AC_ARG_WITH([libevent], - [AS_HELP_STRING([--with-libevent], [path to libevent (default: search /usr/local ..)])], - [with_libevent=search], - [withval=no]) - -# libevent 1.x requires a u_char typedef which is not always available -# on some systems so our check is a little complicated -# we further need to ensure that this is included in the getdns headers -# that get installed later so some users may not be building in an -# environment that has the generated config.h SO we need to generate -# this one extra header in that case - -have_libevent=0 -EXTENSION_LIBEVENT_EXT_LIBS="" -EXTENSION_LIBEVENT_LIB="" -EXTENSION_LIBEVENT_LDFLAGS="" -CHECK_EVENT_PROG="" -AS_IF([test x_$withval = x_no], - [], - [AS_IF([test x_$withval = x_yes], - [AC_SEARCH_LIBS([event_loop], - [event_core event], - [AC_CHECK_FUNCS([event_base_new event_base_free])] - [AC_CHECK_HEADERS([event2/event.h], - [have_libevent=1] - [AS_IF([test "x_$ac_cv_search_event_loop" = "x_none required"],[],[EXTENSION_LIBEVENT_EXT_LIBS="$ac_cv_search_event_loop"])], - [AC_CHECK_HEADERS([event.h], - [have_libevent=1] - [AS_IF([test "x_$ac_cv_search_event_loop" = "x_none required"],[],[EXTENSION_LIBEVENT_EXT_LIBS="$ac_cv_search_event_loop"])], - [AC_MSG_ERROR([event2/event.h and event.h missing, try without libevent])] - [have_libevent=0], - [AC_INCLUDES_DEFAULT] - [#ifndef HAVE_U_CHAR - typedef unsigned char u_char; - #endif])], - [AC_INCLUDES_DEFAULT])], - [AC_MSG_ERROR([libevent missing, try without libevent])] - )], - [have_libevent=1] - [AC_MSG_NOTICE([assuming libevent in $withval])] - [CFLAGS="$CFLAGS -I$withval/include"] - [EXTENSION_LIBEVENT_LDFLAGS="-L$withval/lib"] - [EXTENSION_LIBEVENT_EXT_LIBS="-levent"])] - ) - -AS_IF([test x_$have_libevent = x_1], - [EXTENSION_LIBEVENT_LIB="libgetdns_ext_event.la"] - [CHECK_EVENT_PROG=check_getdns_event] -# libunbound version 1.4.22 and older, not linked against libevent, on FreeBSD, -# ============================================================================= -# cannot be linked against a program that also links libevent, because of -# symbol clash. Libunbound has a libevent clone (called mini_event) build when -# not linked against libevent that uses the same symbols as libevent. - -# First detect if the libevent symbols are visible when linking with libunbound - [LIBS="$getdns_LIBS"] - [LDFLAGS="$getdns_LDFLAGS"] - [AC_MSG_CHECKING([if event_get_version symbol is leaking from libunbound])] - [AC_LANG_PUSH(C)] - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[const char *event_get_version(void);]], - [[const char *v = event_get_version();]]) - ],[[AC_MSG_RESULT([yes])] - [AC_MSG_CHECKING([if libunbound is linked against libevent])] - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[const char *event_get_version(void);]], - [[const char *v = event_get_version();] - [return v@<:@0@:>@ == 'm' && v@<:@1@:>@ == 'i' && - v@<:@2@:>@ == 'n' && v@<:@3@:>@ == 'i' ? 1 : 0;]]) - ],[[AC_MSG_RESULT([yes])] - ],[[AC_MSG_RESULT([no])] - [AC_MSG_FAILURE([ -*** -*** On this system, when using libevent, libunbound must -*** also have been compiled with libevent. Please recompile -*** libunbound with libevent, or configure --without-libevent. -***])] - ] - ) - ],[[AC_MSG_RESULT([no])] - ] - ) - [AC_LANG_POP(C)]) - -AC_SUBST(have_libevent) -AC_SUBST(EXTENSION_LIBEVENT_LIB) -AC_SUBST(EXTENSION_LIBEVENT_EXT_LIBS) -AC_SUBST(EXTENSION_LIBEVENT_LDFLAGS) -AS_IF([test "x$have_libcheck" = x1], [AC_SUBST(CHECK_EVENT_PROG)]) - -LIBS="$getdns_LIBS" -LDFLAGS="$getdns_LDFLAGS" -# end libevent extension - -#-------------------- libuv extension -# if user says nothing about libuv, or specifies --with-libuv=no or --without-libuv -# then we do not want libuv extensions built -# if user specifies --with-libuv then search for it -# if user specifies --with-libuv=/path then check the lib at that path -AC_ARG_WITH([libuv], - [AS_HELP_STRING([--with-libuv], [path to libuv (default: search /usr/local ..)])], - [with_libuv=search], - [withval=no]) - -have_libuv=0 -EXTENSION_LIBUV_EXT_LIBS="" -EXTENSION_LIBUV_LIB="" -EXTENSION_LIBUV_LDFLAGS="" -CHECK_UV_PROG="" -AS_IF([test x_$withval = x_no], - [], - [AS_IF([test x_$withval = x_yes], - [AC_SEARCH_LIBS([uv_run], - [uv], - [AC_CHECK_HEADERS([uv.h], - [have_libuv=1] - [EXTENSION_LIBUV_EXT_LIBS="$ac_cv_search_uv_run"], - [AC_MSG_ERROR([uv.h missing, try without libuv])] - [have_libuv=0], - [AC_INCLUDES_DEFAULT])], - [AC_MSG_ERROR([libuv missing, try without libuv])] - )], - [have_libuv=1] - [AC_MSG_NOTICE([assuming libuv in $withval])] - [CFLAGS="$CFLAGS -I$withval/include"] - [EXTENSION_LIBUV_LDFLAGS="-L$withval/lib"] - [EXTENSION_LIBUV_EXT_LIBS="-luv"])] - ) - -AS_IF([test x_$have_libuv = x_1], - [EXTENSION_LIBUV_LIB="libgetdns_ext_uv.la"] - [CHECK_UV_PROG=check_getdns_uv] - [AC_MSG_CHECKING([for new signature of uv_timer_cb]) - AC_LANG_PUSH(C) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ] - [void test_cb(uv_timer_t *handle);]], - [[uv_timer_cb cb = test_cb;] - [(*cb)(0);]]) - ],[AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_NEW_UV_TIMER_CB, [1], [Does libuv have the new uv_time_cb signature]) - ],[AC_MSG_RESULT([no]) - ]) - AC_LANG_POP(C)] -) - -AC_SUBST(have_libuv) -AC_SUBST(EXTENSION_LIBUV_LIB) -AC_SUBST(EXTENSION_LIBUV_EXT_LIBS) -AC_SUBST(EXTENSION_LIBUV_LDFLAGS) -AS_IF([test "x$have_libcheck" = x1], [AC_SUBST(CHECK_UV_PROG)]) - -LIBS="$getdns_LIBS" -LDFLAGS="$getdns_LDFLAGS" -# end libuv extension - -#-------------------- libev extension -AC_ARG_WITH([libev], - [AS_HELP_STRING([--with-libev], [path to libev (default: search /usr/local ..)])], - [with_libev=search], - [withval=no]) - -have_libev=0 -EXTENSION_LIBEV_EXT_LIBS="" -EXTENSION_LIBEV_LIB="" -EXTENSION_LIBEV_LDFLAGS="" -CHECK_EV_PROG="" -AS_IF([test x_$withval = x_no], - [], - [AS_IF([test x_$withval = x_yes], - [AC_SEARCH_LIBS([ev_run], - [ev], - [AC_CHECK_HEADERS([ev.h], - [have_libev=1] - [EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"], - [AC_CHECK_HEADERS([libev/ev.h], - [have_libev=1] - [EXTENSION_LIBEV_EXT_LIBS="$ac_cv_search_ev_run"], - [AC_MSG_ERROR([ev.h missing, try without libev])] - [have_libev=0], - [AC_INCLUDES_DEFAULT]) - ], - [AC_INCLUDES_DEFAULT]) - ], - [AC_MSG_ERROR([libev missing, try without libev])] - )], - [have_libev=1] - [AC_MSG_NOTICE([assuming libev in $withval])] - [CFLAGS="$CFLAGS -I$withval/include"] - [EXTENSION_LIBEV_LDFLAGS="-L$withval/lib"] - [EXTENSION_LIBEV_EXT_LIBS="-lev"])] - ) - -AS_IF([test x_$have_libev = x_1], - [EXTENSION_LIBEV_LIB="libgetdns_ext_ev.la"] - [CHECK_EV_PROG=check_getdns_ev]) - -AC_SUBST(have_libev) -AC_SUBST(EXTENSION_LIBEV_LIB) -AC_SUBST(EXTENSION_LIBEV_EXT_LIBS) -AC_SUBST(EXTENSION_LIBEV_LDFLAGS) -AS_IF([test "x$have_libcheck" = x1], [AC_SUBST(CHECK_EV_PROG)]) - -LIBS="$getdns_LIBS" -LDFLAGS="$getdns_LDFLAGS" -# end libev extension - -# --with-trust-anchor= -AC_DEFINE([SYSCONFDIR], [sysconfdir], [System configuration dir]) -AC_ARG_WITH(trust-anchor, AS_HELP_STRING([--with-trust-anchor=KEYFILE], [Default location of the trust anchor file. [default=SYSCONFDIR/unbound/getdns-root.key]]), [ - TRUST_ANCHOR_FILE="$withval" -],[ - if test "x$TRUST_ANCHOR_FILE" = "x"; then - if test "x$sysconfdir" = 'x${prefix}/etc' ; then - if test "x$prefix" = 'xNONE' ; then - TRUST_ANCHOR_FILE="/etc/unbound/getdns-root.key" - else - TRUST_ANCHOR_FILE="${prefix}/etc/unbound/getdns-root.key" - fi - else - TRUST_ANCHOR_FILE="${sysconfdir}/unbound/getdns-root.key" - fi - fi -]) -AC_DEFINE_UNQUOTED([TRUST_ANCHOR_FILE], ["$TRUST_ANCHOR_FILE"], [Default trust anchor file]) -AC_SUBST(TRUST_ANCHOR_FILE) -AC_MSG_NOTICE([Default trust anchor: $TRUST_ANCHOR_FILE]) - -AC_ARG_WITH(getdns_query, AS_HELP_STRING([--without-getdns_query], - [Do not compile and install the getdns_query tool]), - [], [withval="yes"]) -if test x_$withval = x_no; then - GETDNS_QUERY="" - INSTALL_GETDNS_QUERY="" - UNINSTALL_GETDNS_QUERY="" -else - GETDNS_QUERY="getdns_query" - INSTALL_GETDNS_QUERY="install-getdns_query" - UNINSTALL_GETDNS_QUERY="uninstall-getdns_query" -fi -AC_SUBST(GETDNS_QUERY) -AC_SUBST(INSTALL_GETDNS_QUERY) -AC_SUBST(UNINSTALL_GETDNS_QUERY) - -AC_ARG_WITH(getdns_server_mon, AS_HELP_STRING([--without-getdns_server_mon], - [Do not compile and install the getdns_server_mon tool]), - [], [withval="yes"]) -if test x_$withval = x_no; then - GETDNS_SERVER_MON="" - INSTALL_GETDNS_SERVER_MON="" - UNINSTALL_GETDNS_SERVER_MON="" -else - GETDNS_SERVER_MON="getdns_server_mon" - INSTALL_GETDNS_SERVER_MON="install-getdns_server_mon" - UNINSTALL_GETDNS_SERVER_MON="uninstall-getdns_server_mon" -fi -AC_SUBST(GETDNS_SERVER_MON) -AC_SUBST(INSTALL_GETDNS_SERVER_MON) -AC_SUBST(UNINSTALL_GETDNS_SERVER_MON) - -stubby_with_yaml=0 -AC_ARG_WITH(stubby, AS_HELP_STRING([--with-stubby], - [Compile and install stubby, the (stub) resolver daemon]), - [], [withval="no"]) -if test x_$withval = x_yes; then - STUBBY="stubby" - INSTALL_STUBBY="install-stubby" - UNINSTALL_STUBBY="uninstall-stubby" - if test $my_with_yaml = 0 - then - STUBBY_XTRA_OBJS="convert_yaml_to_json.lo gbuffer.lo" - stubby_with_yaml=1 - my_with_yaml=1 - fi -else - STUBBY="" - INSTALL_STUBBY="" - UNINSTALL_STUBBY="" - STUBBY_XTRA_OBJS="" -fi -AC_SUBST(STUBBY) -AC_SUBST(INSTALL_STUBBY) -AC_SUBST(UNINSTALL_STUBBY) -AC_SUBST(STUBBY_XTRA_OBJS) - -STUBBY_LIBS="" -STUBBY_LDFLAGS="" - -if test $my_with_yaml = 1 -then - if test $stubby_with_yaml = 1 - then - getdns_LIBS="$LIBS" - getdns_LDFLAGS="$LDFLAGS" - LIBS="$initial_LIBS" - LDFLAGS="$initial_LDFLAGS" - fi - AC_ARG_WITH(libyaml, AS_HELP_STRING([--with-libyaml=pathname], - [path to libyaml (default: search /usr/local ..)]), - [], [withval="yes"]) - if test x_$withval = x_yes; then - for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do - if test -f "$dir/include/yaml.h"; then - CFLAGS="$CFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - AC_MSG_NOTICE([Found libyaml in $dir]) - break - fi - done - else - if test x_$withval != x_no; then - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - else - if test $stubby_with_yaml = 1 - then - AC_MSG_ERROR([libyaml required for building Stubby]) - fi - my_with_yaml=0 - fi - fi - if test $my_with_yaml = 1 - then - AC_MSG_NOTICE([Checking for dependency libyaml]) - AC_CHECK_LIB([yaml], [yaml_parser_parse], [], [ - MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libyaml" - MISSING_SEP=", " - found_all_libs=0 - ]) - fi - if test $stubby_with_yaml = 1 - then - STUBBY_LDFLAGS="$LDFLAGS" - STUBBY_LIBS="$LIBS" - LIBS="$getdns_LIBS" - LDFLAGS="$getdns_LDFLAGS" - fi -fi -AC_SUBST(STUBBY_LDFLAGS) -AC_SUBST(STUBBY_LIBS) - -if test $found_all_libs = 0 -then - AC_MSG_ERROR([Missing dependencies: $MISSING_DEPS]) -fi - -AC_CONFIG_FILES([Makefile src/Makefile src/version.c src/getdns/getdns.h src/getdns/getdns_extra.h spec/example/Makefile src/test/Makefile src/tools/Makefile doc/Makefile getdns.pc getdns_ext_event.pc]) -if [ test -n "$DOXYGEN" ] - then AC_CONFIG_FILES([src/Doxyfile]) -fi - -AC_MSG_CHECKING([whether the C compiler (${CC-cc}) supports the __func__ variable]) -AC_LANG_PUSH(C) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[char*s=__func__;]],[[]])], - [AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE___FUNC__, [1], [Whether the C compiler support the __func__ variable])], - [AC_MSG_RESULT([no])]) -AC_LANG_POP(C) - -dnl ----- -dnl ----- Start of "Things needed for gldns" section -dnl ----- -dnl --------------------------------------------------------------------------- - -AC_CHECK_HEADERS([stdarg.h stdint.h netinet/in.h arpa/inet.h netdb.h sys/socket.h time.h sys/time.h sys/select.h endian.h limits.h sys/limits.h],,, [AC_INCLUDES_DEFAULT]) - -AC_REPLACE_FUNCS(gettimeofday) - -dnl Check the printf-format attribute (if any) -dnl result in HAVE_ATTR_FORMAT. -dnl -AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "format" attribute) -AC_CACHE_VAL(ac_cv_c_format_attribute, -[ac_cv_c_format_attribute=no -AC_TRY_COMPILE( -[#include -void f (char *format, ...) __attribute__ ((format (printf, 1, 2))); -void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2))); -], [ - f ("%s", "str"); -], -[ac_cv_c_format_attribute="yes"], -[ac_cv_c_format_attribute="no"]) -]) -AC_MSG_RESULT($ac_cv_c_format_attribute) -if test $ac_cv_c_format_attribute = yes; then - AC_DEFINE(HAVE_ATTR_FORMAT, 1, [Whether the C compiler accepts the "format" attribute]) -fi - -AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "unused" attribute) -AC_CACHE_VAL(ac_cv_c_unused_attribute, -[ac_cv_c_unused_attribute=no -AC_TRY_COMPILE( -[#include -void f (char *u __attribute__((unused))); -], [ - f ("x"); -], -[ac_cv_c_unused_attribute="yes"], -[ac_cv_c_unused_attribute="no"]) -]) -AC_MSG_RESULT($ac_cv_c_unused_attribute) -if test $ac_cv_c_unused_attribute = yes; then - AC_DEFINE(HAVE_ATTR_UNUSED, 1, [Whether the C compiler accepts the "unused" attribute]) -fi -# Check for libbsd, so that the next function checks pick it as their -# system implementation. -PKG_CHECK_MODULES([LIBBSD],[libbsd-overlay],[ -LIBS="$LIBS $LIBBSD_LIBS" -STUBBY_LIBS="$STUBBY_LIBS $LIBBSD_LIBS" -CFLAGS="$CFLAGS $LIBBSD_CFLAGS" -],[ -AC_MSG_WARN([libbsd not found or usable; using embedded code instead]) -]) -AC_CHECK_DECLS([inet_pton,inet_ntop,strlcpy,arc4random,arc4random_uniform], [], [], [ -AC_INCLUDES_DEFAULT -#ifdef HAVE_WS2TCPIP_H -#include -#endif -]) -AS_IF([test "x$ac_cv_have_decl_inet_pton" = xyes], - [], - [AC_REPLACE_FUNCS(inet_pton)] -) -AS_IF([test "x$ac_cv_have_decl_inet_ntop" = xyes], - [], - [AC_REPLACE_FUNCS(inet_ntop)] -) -AC_REPLACE_FUNCS(strlcpy) -AC_REPLACE_FUNCS(arc4random) -AC_REPLACE_FUNCS(arc4random_uniform) -if test "$ac_cv_func_arc4random" = "no"; then - AC_LIBOBJ(explicit_bzero) - AC_LIBOBJ(arc4_lock) - AC_CHECK_FUNCS([getentropy],,[ - if test "$USE_WINSOCK" = 1; then - AC_LIBOBJ(getentropy_win) - else - case `uname` in - Darwin) - AC_LIBOBJ(getentropy_osx) - ;; - SunOS) - AC_LIBOBJ(getentropy_solaris) - AC_CHECK_HEADERS([sys/sha2.h],, [ - AC_CHECK_FUNCS([SHA512_Update],,[ - AC_LIBOBJ(sha512) - ]) - ], [AC_INCLUDES_DEFAULT]) - if test "$ac_cv_header_sys_sha2_h" = "yes"; then - # this lib needed for sha2 on solaris - LIBS="$LIBS -lmd" - fi - AC_SEARCH_LIBS([clock_gettime], [rt]) - ;; - Linux|*) - AC_LIBOBJ(getentropy_linux) - dnl AC_CHECK_FUNCS([SHA512_Update],,[ - dnl AC_DEFINE([COMPAT_SHA512], [1], [Do sha512 definitions in config.h]) - dnl AC_LIBOBJ(sha512) - dnl]) - AC_CHECK_HEADERS([sys/sysctl.h],,, [AC_INCLUDES_DEFAULT]) - AC_CHECK_FUNCS([getauxval]) - AC_SEARCH_LIBS([clock_gettime], [rt]) - ;; - esac - fi - ]) -fi - -AC_TYPE_SIGNAL - -case `uname` in -FreeBSD) - C99COMPATFLAGS="" -;; -*) - C99COMPATFLAGS="-D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600" -;; -esac -AC_SUBST(C99COMPATFLAGS) - -AC_DEFINE_UNQUOTED([MAX_CNAME_REFERRALS], [100], [The maximum number of cname referrals.]) -AC_DEFINE_UNQUOTED([DRAFT_RRTYPES], [1], [Define this to enable all rrtypes in gldns.]) - -AH_BOTTOM([ - -#ifdef HAVE___FUNC__ -#define __FUNC__ __func__ -#else -#define __FUNC__ __FUNCTION__ -#endif - -#ifdef GETDNS_ON_WINDOWS - /* On windows it is allowed to increase the FD_SETSIZE - * (and necessary to make our custom eventloop work) - * See: https://support.microsoft.com/en-us/kb/111855 - */ -# ifndef FD_SETSIZE -# define FD_SETSIZE 1024 -# endif - -/* the version of the windows API enabled */ -# ifndef WINVER -# define WINVER 0x0600 // 0x0502 -# endif -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0600 // 0x0502 -# endif -# ifdef HAVE_WS2TCPIP_H -# include -# endif - -# ifdef _MSC_VER -# if _MSC_VER >= 1800 -# define PRIsz "zu" -# else -# define PRIsz "Iu" -# endif -# else -# define PRIsz "Iu" -# endif - -# ifdef HAVE_WINSOCK2_H -# include -# endif - -/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ -# ifdef HAVE_WINSOCK2_H -# define FD_SET_T (u_int) -# else -# define FD_SET_T -# endif - - /* Windows wants us to use _strdup instead of strdup */ -# ifndef strdup -# define strdup _strdup -# endif -#else -# define PRIsz "zu" -#endif - -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if STDC_HEADERS -#include -#include -#endif - -#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY || !defined(strlcpy) -size_t strlcpy(char *dst, const char *src, size_t siz); -#else -#ifndef __BSD_VISIBLE -#define __BSD_VISIBLE 1 -#endif -#endif -#if !defined(HAVE_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM -uint32_t arc4random(void); -#endif -#if !defined(HAVE_ARC4RANDOM_UNIFORM) || !HAVE_DECL_ARC4RANDOM_UNIFORM -uint32_t arc4random_uniform(uint32_t upper_bound); -#endif -#ifndef HAVE_ARC4RANDOM -void explicit_bzero(void* buf, size_t len); -int getentropy(void* buf, size_t len); -void arc4random_buf(void* buf, size_t n); -void _ARC4_LOCK(void); -void _ARC4_UNLOCK(void); -#endif -#ifdef COMPAT_SHA512 -#ifndef SHA512_DIGEST_LENGTH -#define SHA512_BLOCK_LENGTH 128 -#define SHA512_DIGEST_LENGTH 64 -#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) -typedef struct _SHA512_CTX { - uint64_t state[8]; - uint64_t bitcount[2]; - uint8_t buffer[SHA512_BLOCK_LENGTH]; -} SHA512_CTX; -#endif /* SHA512_DIGEST_LENGTH */ -void SHA512_Init(SHA512_CTX*); -void SHA512_Update(SHA512_CTX*, void*, size_t); -void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); -unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); -#endif /* COMPAT_SHA512 */ - -#ifndef HAVE_DECL_INET_PTON -int inet_pton(int af, const char* src, void* dst); -#endif /* HAVE_INET_PTON */ - -#ifndef HAVE_DECL_INET_NTOP -const char *inet_ntop(int af, const void *src, char *dst, size_t size); -#endif - -#ifndef HAVE_GETTIMEOFDAY -int gettimeofday(struct timeval* tv, void* tz); -#endif - -#ifdef USE_WINSOCK -# ifndef _CUSTOM_VSNPRINTF -# define _CUSTOM_VSNPRINTF -static inline int _gldns_custom_vsnprintf(char *str, size_t size, const char *format, va_list ap) -{ int r = vsnprintf(str, size, format, ap); return r == -1 ? _vscprintf(format, ap) : r; } -# define vsnprintf _gldns_custom_vsnprintf -# endif -#endif - -#ifdef __cplusplus -} -#endif - -/** Use on-board gldns */ -#define USE_GLDNS 1 -#ifdef HAVE_SSL -# define GLDNS_BUILD_CONFIG_HAVE_SSL 1 -#endif - -#ifdef HAVE_STDARG_H -#include -#endif - -#include - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef HAVE_NETINET_TCP_H -#include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_SYS_STAT_H -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#ifdef HAVE_INTTYPES_H -#include -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -#ifdef HAVE_SYS_LIMITS_H -#include -#endif - -#ifdef PATH_MAX -#define _GETDNS_PATH_MAX PATH_MAX -#else -#define _GETDNS_PATH_MAX 2048 -#endif - -#ifndef PRIu64 -#define PRIu64 "llu" -#endif - -#ifdef HAVE_ATTR_FORMAT -# define ATTR_FORMAT(archetype, string_index, first_to_check) \ - __attribute__ ((format (archetype, string_index, first_to_check))) -#else /* !HAVE_ATTR_FORMAT */ -# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ -#endif /* !HAVE_ATTR_FORMAT */ - -#if defined(DOXYGEN) -# define ATTR_UNUSED(x) x -#elif defined(__cplusplus) -# define ATTR_UNUSED(x) -#elif defined(HAVE_ATTR_UNUSED) -# define ATTR_UNUSED(x) x __attribute__((unused)) -#else /* !HAVE_ATTR_UNUSED */ -# define ATTR_UNUSED(x) x -#endif /* !HAVE_ATTR_UNUSED */ - -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) -#define strptime unbound_strptime -struct tm; -char *strptime(const char *s, const char *format, struct tm *tm); -#endif - -#if !defined(HAVE_SIGSET_T) && defined(HAVE__SIGSET_T) -typedef _sigset_t sigset_t; -#endif -#if !defined(HAVE_SIGEMPTYSET) -# define sigemptyset(pset) (*(pset) = 0) -#endif -#if !defined(HAVE_SIGFILLSET) -# define sigfillset(pset) (*(pset) = (sigset_t)-1) -#endif -#if !defined(HAVE_SIGADDSET) -# define sigaddset(pset, num) (*(pset) |= (1L<<(num))) -#endif - -#ifdef HAVE_LIBUNBOUND -# include -# ifdef HAVE_UNBOUND_EVENT_H -# include -# else -# ifdef HAVE_UNBOUND_EVENT_API -# ifndef _UB_EVENT_PRIMITIVES -# define _UB_EVENT_PRIMITIVES -struct ub_event_base; -struct ub_ctx* ub_ctx_create_ub_event(struct ub_event_base* base); -typedef void (*ub_event_callback_t)(void*, int, void*, int, int, char*); -int ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype, - int rrclass, void* mydata, ub_event_callback_t callback, int* async_id); -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -} -#endif -]) - -dnl --------------------------------------------------------------------------- -dnl ----- -dnl ----- End of "Things needed for gldns" section -dnl ----- - - -AC_CONFIG_HEADER([src/config.h]) -AC_OUTPUT diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index 94770c77..00000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,93 +0,0 @@ -# -# @configure_input@ -# -# -# Copyright (c) 2013, Verisign, Inc., NLnet Labs -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the names of the copyright holders nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package = @PACKAGE_NAME@ -version = @PACKAGE_VERSION@ -tarname = @PACKAGE_TARNAME@ -distdir = $(tarname)-$(version) - -api_version = @API_VERSION@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -# datarootdir is here to please some checkers -datarootdir=@datarootdir@ -mandir = @mandir@ -INSTALL = @INSTALL@ - -srcdir = @srcdir@ -VPATH = @srcdir@ - -EDITS=-e 's/@''version@/$(version)/g' -DOXYGEN = @DOXYGEN@ - -DOCDIRS = html latex man -MANPAGES3 = libgetdns.3 getdns_address.3 getdns_cancel_callback.3 getdns_context.3 getdns_context_set.3 getdns_context_set_context_update_callback.3 getdns_convert.3 getdns_dict.3 getdns_dict_get.3 getdns_dict_set.3 getdns_display_ip_address.3 getdns_general.3 getdns_hostname.3 getdns_list.3 getdns_list_get.3 getdns_list_set.3 getdns_pretty_print_dict.3 getdns_root_trust_anchor.3 getdns_service.3 getdns_validate_dnssec.3 - -default: all - -all: doc - -doc: $(MANPAGES3) - if test x_$(DOXYGEN) != x_ ; then cd ../src; doxygen; fi - -.SUFFIXES: .3.in .3 -.3.in.3: - sed $(EDITS) -e "s/@date@/$(api_version)/g" $< > $@ - -# we assume that we want a separate file for each "name" specified for each man page -# and consider these "alternate names" simple copies of the main man page -install: $(MANPAGES3) - $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) - $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man3 - for x in $(MANPAGES3); do echo $(INSTALL) -m 644 $$x $(DESTDIR)$(mandir)/man3; $(INSTALL) -m 644 $$x $(DESTDIR)$(mandir)/man3; for altpg in $$($(srcdir)/manpgaltnames $$x); do cp $$x $$altpg; echo $(INSTALL) -m 644 $$altpg $(DESTDIR)$(mandir)/man3; $(INSTALL) -m 644 $$altpg $(DESTDIR)$(mandir)/man3; done; done - -check: $(MANPAGES3) - for x in $(MANPAGES3); do LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $$x 2>&1 >/dev/null | awk "-vpage=$$x" '{printf("%s: ", page);print}'; if ! lexgrog $$x >/dev/null 2>&1 ; then echo $$x: manpage-has-bad-whatis-entry; fi; done - -uninstall: - for x in $(MANPAGES3); do echo rm -f $(DESTDIR)$(mandir)/man3/$$x; rm -f $(DESTDIR)$(mandir)/man3/$$x; for altpg in $$($(srcdir)/manpgaltnames $$x); do echo rm -f $(DESTDIR)$(mandir)/man3/$$altpg; rm -f $(DESTDIR)$(mandir)/man3/$$altpg; done; done - -clean: - for x in $(MANPAGES3); do rm -f $$($(srcdir)/manpgaltnames $$x); done - rm -f tagfile - rm -rf $(DOCDIRS) $(MANPAGES3) - -distclean : clean - rm -f Makefile config.status config.log - rm -Rf autom4te.cache - -Makefile: Makefile.in ../config.status - cd .. && ./config.status $@ - -configure.status: configure - cd .. && ./config.status --recheck - -.PHONY: clean $(DOC) diff --git a/m4/acx_getaddrinfo.m4 b/m4/acx_getaddrinfo.m4 deleted file mode 100644 index a4af9e1d..00000000 --- a/m4/acx_getaddrinfo.m4 +++ /dev/null @@ -1,81 +0,0 @@ -# Taken from acx_nlnetlabs.m4 - common macros for configure checks -# Copyright 2009, Wouter Wijngaards, NLnet Labs. -# BSD licensed. -# - -dnl Check getaddrinfo. -dnl Works on linux, solaris, bsd and windows(links winsock). -dnl defines HAVE_GETADDRINFO, USE_WINSOCK. -AC_DEFUN([ACX_CHECK_GETADDRINFO_WITH_INCLUDES], -[AC_REQUIRE([AC_PROG_CC]) -AC_MSG_CHECKING(for getaddrinfo) -ac_cv_func_getaddrinfo=no -AC_LINK_IFELSE( -[AC_LANG_SOURCE([[ -#ifdef __cplusplus -extern "C" -{ -#endif -char* getaddrinfo(); -char* (*f) () = getaddrinfo; -#ifdef __cplusplus -} -#endif -int main() { - ; - return 0; -} -]])], -dnl this case on linux, solaris, bsd -[ac_cv_func_getaddrinfo="yes" -dnl see if on windows -if test "$ac_cv_header_windows_h" = "yes"; then - AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) - USE_WINSOCK="1" - LIBS="$LIBS -lws2_32 -lcrypt32" -fi -], -dnl no quick getaddrinfo, try mingw32 and winsock2 library. -ORIGLIBS="$LIBS" -LIBS="$LIBS -lws2_32 -lcrypt32" -AC_LINK_IFELSE( -[AC_LANG_PROGRAM( -[ -#define _WIN32_WINNT 0x0501 -#ifdef HAVE_WINDOWS_H -#include -#endif -#ifdef HAVE_WINSOCK_H -#include -#endif -#ifdef HAVE_WINSOCK2_H -#include -#endif -#include -#ifdef HAVE_WS2TCPIP_H -#include -#endif -], -[ - (void)getaddrinfo(NULL, NULL, NULL, NULL); -] -)], -[ -ac_cv_func_getaddrinfo="yes" -dnl already: LIBS="$LIBS -lws2_32 -lcrypt32" -AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) -USE_WINSOCK="1" -], -[ -ac_cv_func_getaddrinfo="no" -LIBS="$ORIGLIBS" -]) -) - -AC_MSG_RESULT($ac_cv_func_getaddrinfo) -if test $ac_cv_func_getaddrinfo = yes; then - AC_DEFINE(HAVE_GETADDRINFO, 1, [Whether getaddrinfo is available]) -fi -])dnl Endof AC_CHECK_GETADDRINFO_WITH_INCLUDES - -dnl End of file diff --git a/m4/acx_openssl.m4 b/m4/acx_openssl.m4 deleted file mode 100644 index fc3b4dde..00000000 --- a/m4/acx_openssl.m4 +++ /dev/null @@ -1,164 +0,0 @@ -# Taken from acx_nlnetlabs.m4 - common macros for configure checks -# Copyright 2009, Wouter Wijngaards, NLnet Labs. -# BSD licensed. -# -dnl Add a -R to the RUNTIME_PATH. Only if rpath is enabled and it is -dnl an absolute path. -dnl $1: the pathname to add. -AC_DEFUN([ACX_RUNTIME_PATH_ADD], [ - if test "x$enable_rpath" = xyes; then - if echo "$1" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$1" - fi - fi -]) -dnl Common code for both ACX_WITH_SSL and ACX_WITH_SSL_OPTIONAL -dnl Takes one argument; the withval checked in those 2 functions -dnl sets up the environment for the given openssl path -AC_DEFUN([ACX_SSL_CHECKS], [ - withval=$1 - if test x_$withval != x_no; then - AC_MSG_CHECKING(for SSL) - if test x_$withval = x_ -o x_$withval = x_yes; then - withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr" - fi - for dir in $withval; do - ssldir="$dir" - if test -f "$dir/include/openssl/ssl.h"; then - found_ssl="yes" - AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) - dnl assume /usr/include is already in the include-path. - if test "$ssldir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$ssldir/include" - LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include" - fi - break; - fi - done - if test x_$found_ssl != x_yes; then - AC_MSG_ERROR(Cannot find the SSL libraries in $withval) - else - AC_MSG_RESULT(found in $ssldir) - HAVE_SSL=yes - dnl assume /usr is already in the lib and dynlib paths. - if test "$ssldir" != "/usr" -a "$ssldir" != ""; then - LDFLAGS="$LDFLAGS -L$ssldir/lib" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib" - ACX_RUNTIME_PATH_ADD([$ssldir/lib]) - fi - - AC_MSG_CHECKING([for HMAC_Update in -lcrypto]) - LIBS="-lssl -lcrypto $LIBS" - LIBSSL_LIBS="-lssl -lcrypto $LIBSSL_LIBS" - AC_TRY_LINK(, [ - int HMAC_Update(void); - (void)HMAC_Update(); - ], [ - AC_DEFINE([HAVE_HMAC_UPDATE], 1, - [If you have HMAC_Update]) - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - # check if -lwsock32 or -lgdi32 are needed. - BAKLIBS="$LIBS" - BAKSSLLIBS="$LIBSSL_LIBS" - LIBS="$LIBS -lgdi32" - LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32" - AC_MSG_CHECKING([if -lcrypto needs -lgdi32]) - AC_TRY_LINK([], [ - int HMAC_Update(void); - (void)HMAC_Update(); - ],[ - AC_DEFINE([HAVE_HMAC_UPDATE], 1, - [If you have HMAC_Update]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl" - AC_MSG_CHECKING([if -lcrypto needs -ldl]) - AC_TRY_LINK([], [ - int HMAC_Update(void); - (void)HMAC_Update(); - ],[ - AC_DEFINE([HAVE_HMAC_UPDATE], 1, - [If you have HMAC_Update]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - 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 -AC_CHECK_HEADERS([openssl/ssl.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS([openssl/err.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT]) - -dnl TLS v1.2 requires OpenSSL 1.0.1 -AC_CHECK_FUNC(TLSv1_2_client_method,AC_DEFINE([HAVE_TLS_v1_2], [1], - [Define if you have libssl with tls 1.2]),[AC_MSG_WARN([Cannot find TLSv1_2_client_method in libssl library. TLS will not be available.])]) - -dnl Native OpenSSL hostname verification requires OpenSSL 1.0.2 -AC_CHECK_FUNC(SSL_CTX_get0_param,AC_DEFINE([HAVE_SSL_HN_AUTH], [1], - [Define if you have libssl with host name verification]),[AC_MSG_WARN([Cannot find SSL_CTX_get0_param in libssl library. TLS hostname verification will not be available.])]) -]) - -dnl Check for SSL, where SSL is mandatory -dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found -dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. -dnl Checks main header files of SSL. -dnl -AC_DEFUN([ACX_WITH_SSL], -[ -AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], - [enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ - ],[ - withval="yes" - ]) - if test x_$withval = x_no; then - AC_MSG_ERROR([Need SSL library to do digital signature cryptography]) - fi - ACX_SSL_CHECKS($withval) -])dnl End of ACX_WITH_SSL - -dnl Check for SSL, where ssl is optional (--without-ssl is allowed) -dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found -dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. -dnl Checks main header files of SSL. -dnl -AC_DEFUN([ACX_WITH_SSL_OPTIONAL], -[ -AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], - [enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ - ],[ - withval="yes" - ]) - ACX_SSL_CHECKS($withval) -])dnl End of ACX_WITH_SSL_OPTIONAL - -dnl Setup to use -lssl -dnl To use -lcrypto, use the ACX_WITH_SSL setup (before this one). -AC_DEFUN([ACX_LIB_SSL], -[ -# check if libssl needs libdl -BAKLIBS="$LIBS" -LIBS="-lssl $LIBS" -AC_MSG_CHECKING([if libssl needs libdl]) -AC_TRY_LINK_FUNC([SSL_CTX_new], [ - AC_MSG_RESULT([no]) - LIBS="$BAKLIBS" -] , [ - AC_MSG_RESULT([yes]) - LIBS="$BAKLIBS" - AC_SEARCH_LIBS([dlopen], [dl]) -]) ])dnl End of ACX_LIB_SSL - - diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 deleted file mode 100644 index 51df0c09..00000000 --- a/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 3 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/m4/ax_lib_nettle.m4 b/m4/ax_lib_nettle.m4 deleted file mode 100644 index e0ba1eac..00000000 --- a/m4/ax_lib_nettle.m4 +++ /dev/null @@ -1,80 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_lib_nettle.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_LIB_NETTLE([yes|no|auto]) -# -# DESCRIPTION -# -# Searches for the 'nettle' library with the --with... option. -# -# If found, define HAVE_NETTLE and macro NETTLE_LIBS. Also defines -# NETTLE_WITH_ for the algorithms found available. Possible -# algorithms: AES ARCTWO BLOWFISH CAST128 DES DES3 SERPENT TWOFISH MD2 MD4 -# MD5 SHA1 SHA256. -# -# The argument is used if no --with...-nettle option is set. Value "yes" -# requires the configuration by default. Value "no" does not require it by -# default. Value "auto" configures the library only if available. -# -# See also AX_LIB_BEECRYPT, AX_LIB_CRYPTO, and AX_LIB_GCRYPT. -# -# LICENSE -# -# Copyright (c) 2009 Fabien Coelho -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 10 - -# AX_CHECK_NETTLE_ALGO([name],[function]) -AC_DEFUN([AX_CHECK_NETTLE_ALGO],[ - AC_CHECK_LIB([nettle], [nettle_$2], - AC_DEFINE([NETTLE_WITH_$1],[1],[Algorithm $1 in nettle library])) -]) - -# AX_LIB_NETTLE([yes|no|auto]) -AC_DEFUN([AX_LIB_NETTLE],[ - AC_MSG_CHECKING([whether nettle is enabled]) - AC_ARG_WITH([nettle], - AC_HELP_STRING([--with-nettle], [Require nettle library (required with GnuTLS)]),[ - AC_MSG_RESULT([$withval]) - ax_with_nettle=$withval - ],[ - AC_MSG_RESULT([$1]) - ax_with_nettle=$1 - ]) - if test "$ax_with_nettle" = "yes" -o "$ax_with_nettle" = "auto" ; then - AC_CHECK_HEADERS([nettle/nettle-meta.h],[ - AC_CHECK_LIB([nettle],[nettle_base64_encode_final],[ - AC_DEFINE([HAVE_NETTLE],[1],[Nettle library is available]) - HAVE_NETTLE=1 - AC_SUBST([NETTLE_LIBS],[-lnettle]) - # ciphers - AX_CHECK_NETTLE_ALGO([AES],[aes_encrypt]) - AX_CHECK_NETTLE_ALGO([ARCTWO],[arctwo_encrypt]) - AX_CHECK_NETTLE_ALGO([BLOWFISH],[blowfish_encrypt]) - AX_CHECK_NETTLE_ALGO([CAST128],[cast128_encrypt]) - AX_CHECK_NETTLE_ALGO([DES],[des_encrypt]) - AX_CHECK_NETTLE_ALGO([DES3],[des3_encrypt]) - AX_CHECK_NETTLE_ALGO([SERPENT],[serpent_encrypt]) - AX_CHECK_NETTLE_ALGO([TWOFISH],[twofish_encrypt]) - # digests - AX_CHECK_NETTLE_ALGO([MD2],[md2_digest]) - AX_CHECK_NETTLE_ALGO([MD4],[md4_digest]) - AX_CHECK_NETTLE_ALGO([MD5],[md5_digest]) - AX_CHECK_NETTLE_ALGO([SHA1],[sha1_digest]) - AX_CHECK_NETTLE_ALGO([SHA256],[sha256_digest]) - ]) - ]) - # complain only if explicitly required - if test "$ax_with_nettle" = "yes" -a "x$HAVE_NETTLE" = "x" ; then - AC_MSG_ERROR([cannot configure required nettle library]) - fi - fi -]) diff --git a/m4/pkg.m4 b/m4/pkg.m4 deleted file mode 100644 index c5b26b52..00000000 --- a/m4/pkg.m4 +++ /dev/null @@ -1,214 +0,0 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) -AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) -AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])# PKG_CHECK_MODULES - - -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, - [with_pkgconfigdir=]pkg_default) -AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR - - -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --with-noarch-pkgconfigdir parameter. -AC_DEFUN([PKG_NOARCH_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([noarch-pkgconfigdir], - [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, - [with_noarch_pkgconfigdir=]pkg_default) -AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR - - -# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------- -# Retrieves the value of the pkg-config variable for the given module. -AC_DEFUN([PKG_CHECK_VAR], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl - -_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -AS_VAR_COPY([$1], [pkg_cv_][$1]) - -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])# PKG_CHECK_VAR diff --git a/spec/example/Makefile.in b/spec/example/Makefile.in deleted file mode 100644 index 8ff7f2d1..00000000 --- a/spec/example/Makefile.in +++ /dev/null @@ -1,172 +0,0 @@ -# -# @configure_input@ -# -# Copyright (c) 2013, Verisign, Inc., NLNet Labs -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the names of the copyright holders nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package = @PACKAGE_NAME@ -version = @PACKAGE_VERSION@ -tarname = @PACKAGE_TARNAME@ -distdir = $(tarname)-$(version) - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -LIBTOOL = ../../libtool - -srcdir = @srcdir@ - -EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@ -EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@ -EXTENSION_LIBEVENT_LIB=../../src/libgetdns_ext_event.la - -CC=@CC@ -CFLAGS=-I$(srcdir) -I$(srcdir)/../../src -I../../src @CFLAGS@ -LDFLAGS=@LDFLAGS@ -L../../src -LDLIBS=../../src/libgetdns.la @LIBS@ - - -OBJS=example-all-functions.lo example-simple-answers.lo example-tree.lo example-synchronous.lo example-reverse.lo - -PROGRAMS=example-all-functions example-synchronous example-simple-answers example-tree example-reverse - -.SUFFIXES: .c .o .a .lo .h - -.c.o: - $(CC) $(CFLAGS) -c $< -o $@ - -.c.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@ - -default: all -example: all - -all: $(PROGRAMS) - -$(OBJS): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@ - -example-all-functions: example-all-functions.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ example-all-functions.lo - -example-synchronous: example-synchronous.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ example-synchronous.lo - -$(EXTENSION_LIBEVENT_LIB): - @echo "***" - @echo "*** Three examples from the specification need libevent." - @echo "*** libevent was not found or usable at configure time." - @echo "*** To compile and run all examples from the spec, make sure" - @echo "*** libevent is available and usable during configuration." - @echo "***" - @false - -example-simple-answers: example-simple-answers.lo $(EXTENSION_LIBEVENT_LIB) - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-simple-answers.lo - -example-tree: example-tree.lo $(EXTENSION_LIBEVENT_LIB) - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-tree.lo - -example-reverse: example-reverse.lo $(EXTENSION_LIBEVENT_LIB) - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-reverse.lo - -clean: - rm -f *.o *.lo $(PROGRAMS) - rm -rf .libs - -distclean : clean - rm -f Makefile config.status config.log - rm -Rf autom4te.cache - -$(distdir): FORCE - mkdir -p $(distdir)/src - cp configure.ac $(distdir) - cp configure $(distdir) - cp Makefile.in $(distdir) - cp src/Makefile.in $(distdir)/src - -distcheck: $(distdir).tar.gz - gzip -cd $(distdir).tar.gz | tar xvf - - cd $(distdir) && ./configure - cd $(distdir) && $(MAKE) all - cd $(distdir) && $(MAKE) check - cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install - cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall - @remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \ - if test "$${remaining}" -ne 0; then - echo "@@@ $${remaining} file(s) remaining in stage directory!"; \ - exit 1; \ - fi - cd $(distdir) && $(MAKE) clean - rm -rf $(distdir) - @echo "*** Package $(distdir).tar.gz is ready for distribution" - -Makefile: $(srcdir)/Makefile.in ../../config.status - cd ../.. && ./config.status spec/example/Makefile - -configure.status: configure - cd ../.. && ./config.status --recheck - -.PHONY: clean - -depend: - (cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new ) - (blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I../../src -I"$$blddir"/../../src *.c | \ - sed -e "s? $$blddir/? ?g" \ - -e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \ - -e 's? \$$(srcdir)/\.\./\.\./src/config\.h? ../../src/config.h?g' \ - -e 's? $$(srcdir)/\.\./\.\./src/getdns/getdns_extra\.h? ../../src/getdns/getdns_extra.h?g' \ - -e 's? \.\./\.\./src/getdns/getdns_ext_libevent\.h? $$(srcdir)/../../src/getdns/getdns_ext_libevent.h?g' \ - -e 's? \.\./\.\./src/getdns/getdns_ext_libev\.h? $$(srcdir)/../../src/getdns/getdns_ext_libev.h?g' \ - -e 's? \.\./\.\./src/getdns/getdns_ext_libuv\.h? $$(srcdir)/../../src/getdns/getdns_ext_libuv.h?g' \ - -e 's? \.\./\.\./src/debug\.h? $$(srcdir)/../../src/debug.h?g' \ - -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new ) - (cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \ - || mv Makefile.in.new Makefile.in ) - - -# Dependencies for the examples -example-all-functions.lo example-all-functions.o: $(srcdir)/example-all-functions.c $(srcdir)/getdns_libevent.h \ - ../../src/config.h \ - ../../src/getdns/getdns.h \ - $(srcdir)/../../src/getdns/getdns_ext_libevent.h \ - ../../src/getdns/getdns_extra.h -example-reverse.lo example-reverse.o: $(srcdir)/example-reverse.c $(srcdir)/getdns_libevent.h \ - ../../src/config.h \ - ../../src/getdns/getdns.h \ - $(srcdir)/../../src/getdns/getdns_ext_libevent.h \ - ../../src/getdns/getdns_extra.h -example-simple-answers.lo example-simple-answers.o: $(srcdir)/example-simple-answers.c $(srcdir)/getdns_libevent.h \ - ../../src/config.h \ - ../../src/getdns/getdns.h \ - $(srcdir)/../../src/getdns/getdns_ext_libevent.h \ - ../../src/getdns/getdns_extra.h -example-synchronous.lo example-synchronous.o: $(srcdir)/example-synchronous.c $(srcdir)/getdns_core_only.h \ - ../../src/getdns/getdns.h -example-tree.lo example-tree.o: $(srcdir)/example-tree.c $(srcdir)/getdns_libevent.h \ - ../../src/config.h \ - ../../src/getdns/getdns.h \ - $(srcdir)/../../src/getdns/getdns_ext_libevent.h \ - ../../src/getdns/getdns_extra.h diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index 9b206491..00000000 --- a/src/Makefile.in +++ /dev/null @@ -1,612 +0,0 @@ -# -# @configure_input@ -# -# Copyright (c) 2013, Verisign, Inc., NLnet Labs -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the names of the copyright holders nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package = @PACKAGE_NAME@ -version = @PACKAGE_VERSION@ -tarname = @PACKAGE_TARNAME@ -distdir = $(tarname)-$(version) -libversion = @GETDNS_LIBVERSION@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -sbindir = @sbindir@ -libdir = @libdir@ -includedir = @includedir@ -sysconfdir = @sysconfdir@ -localstatedir = @localstatedir@ -runstatedir = @runstatedir@ -stubbyconfdir = $(sysconfdir)/stubby -have_libevent = @have_libevent@ -have_libuv = @have_libuv@ -have_libev = @have_libev@ -# datarootdir is here to please some checkers -datarootdir=@datarootdir@ -mandir=@mandir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -srcdir = @srcdir@ -tlsdir = @TLSDIR@ -stubbysrcdir = $(srcdir)/../stubby -LIBTOOL = ../libtool - -CC=@CC@ -CFLAGS=-I$(srcdir) -I. -I$(srcdir)/util/auxiliary -I$(srcdir)/tls -I$(srcdir)/$(tlsdir) -I$(stubbysrcdir)/src @CFLAGS@ @CPPFLAGS@ $(XTRA_CFLAGS) -WPEDANTICFLAG=@WPEDANTICFLAG@ -WNOERRORFLAG=@WNOERRORFLAG@ -LDFLAGS=@LDFLAGS@ @LIBS@ - -STUBBY_LDFLAGS=@STUBBY_LDFLAGS@ @STUBBY_LIBS@ - -EXTENSION_LIBEVENT_LIB=@EXTENSION_LIBEVENT_LIB@ -EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@ -EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@ -EXTENSION_LIBEV_LIB=@EXTENSION_LIBEV_LIB@ -EXTENSION_LIBEV_EXT_LIBS=@EXTENSION_LIBEV_EXT_LIBS@ -EXTENSION_LIBEV_LDFLAGS=@EXTENSION_LIBEV_LDFLAGS@ -EXTENSION_LIBUV_LIB=@EXTENSION_LIBUV_LIB@ -EXTENSION_LIBUV_EXT_LIBS=@EXTENSION_LIBUV_EXT_LIBS@ -EXTENSION_LIBUV_LDFLAGS=@EXTENSION_LIBUV_LDFLAGS@ - -C99COMPATFLAGS=@C99COMPATFLAGS@ - -DEFAULT_EVENTLOOP_OBJ=@DEFAULT_EVENTLOOP@.lo - -GETDNS_OBJ=const-info.lo convert.lo dict.lo dnssec.lo general.lo \ - list.lo request-internal.lo platform.lo rr-dict.lo \ - rr-iter.lo server.lo stub.lo sync.lo ub_loop.lo util-internal.lo \ - mdns.lo pubkey-pinning.lo - -GLDNS_OBJ=keyraw.lo gbuffer.lo wire2str.lo parse.lo parseutil.lo rrdef.lo \ - str2wire.lo - -PROGRAMS=@STUBBY@ - -LIBOBJDIR= -LIBOBJS=@LIBOBJS@ -COMPAT_OBJ=$(LIBOBJS:.o=.lo) - -UTIL_OBJ=rbtree.lo lruhash.lo lookup3.lo locks.lo - -JSMN_OBJ=jsmn.lo -TLS_OBJ=tls.lo pubkey-pinning-internal.lo keyraw-internal.lo -TLS_COMMON_OBJ=val_secalgo.lo anchor-internal.lo -YXML_OBJ=yxml.lo - -YAML_OBJ=convert_yaml_to_json.lo -DANESSL_OBJ=danessl.lo - -GETDNS_XTRA_OBJS=@GETDNS_XTRA_OBJS@ @DANESSL_XTRA_OBJS@ -STUBBY_XTRA_OBJS=@STUBBY_XTRA_OBJS@ - -EXTENSION_OBJ=$(DEFAULT_EVENTLOOP_OBJ) libevent.lo libev.lo - -NON_C99_OBJS=libuv.lo context.lo anchor.lo - -.SUFFIXES: .c .o .a .lo .h - -.c.o: - $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@ - -.c.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@ - -default: all - -all: libgetdns.la $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBUV_LIB) $(EXTENSION_LIBEV_LIB) $(PROGRAMS) - -$(GETDNS_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/$(@:.lo=.c) -o $@ - -$(GLDNS_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/gldns/$(@:.lo=.c) -o $@ - -$(COMPAT_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/compat/$(@:.lo=.c) -o $@ - -$(UTIL_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WNOERRORFLAG) -c $(srcdir)/util/$(@:.lo=.c) -o $@ - -$(JSMN_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -DJSMN_GETDNS -c $(srcdir)/jsmn/$(@:.lo=.c) -o $@ - -$(TLS_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$(tlsdir)/$(@:.lo=.c) -o $@ - -$(TLS_COMMON_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/tls/$(@:.lo=.c) -o $@ - -$(YAML_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(stubbysrcdir)/src/yaml/$(@:.lo=.c) -o $@ - -$(DANESSL_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WNOERRORFLAG) -c $(srcdir)/ssl_dane/$(@:.lo=.c) -o $@ - -$(YXML_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -I$(srcdir)/yxml -DYXML_GETDNS -Wno-unused-parameter -c $(srcdir)/yxml/$(@:.lo=.c) -o $@ - -$(EXTENSION_OBJ): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/extension/$(@:.lo=.c) -o $@ - -anchor.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) $(C99COMPATFLAGS) -c $(srcdir)/anchor.c -o anchor.lo - -context.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) $(C99COMPATFLAGS) -c $(srcdir)/context.c -o context.lo - -libuv.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) $(C99COMPATFLAGS) -c $(srcdir)/extension/libuv.c -o libuv.lo - -install-headers: getdns/getdns.h getdns/getdns_extra.h - $(INSTALL) -m 755 -d $(DESTDIR)$(includedir) - $(INSTALL) -m 755 -d $(DESTDIR)$(includedir)/getdns - $(INSTALL) -m 644 getdns/getdns.h $(DESTDIR)$(includedir)/getdns/getdns.h - $(INSTALL) -m 644 getdns/getdns_extra.h $(DESTDIR)$(includedir)/getdns/getdns_extra.h - if test $(have_libevent) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libevent.h $(DESTDIR)$(includedir)/getdns/ ; fi - if test $(have_libuv) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libuv.h $(DESTDIR)$(includedir)/getdns/ ; fi - if test $(have_libev) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libev.h $(DESTDIR)$(includedir)/getdns/ ; fi - -uninstall-headers: - rm -rf $(DESTDIR)$(includedir)/getdns - -install-libs: libgetdns.la $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBUV_LIB) $(EXTENSION_LIBEV_LIB) - $(INSTALL) -m 755 -d $(DESTDIR)$(libdir) - $(LIBTOOL) --mode=install cp libgetdns.la $(DESTDIR)$(libdir) - if test $(have_libevent) = 1 ; then $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEVENT_LIB) $(DESTDIR)$(libdir) ; fi - if test $(have_libuv) = 1 ; then $(LIBTOOL) --mode=install cp $(EXTENSION_LIBUV_LIB) $(DESTDIR)$(libdir) ; fi - if test $(have_libev) = 1 ; then $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEV_LIB) $(DESTDIR)$(libdir) ; fi - $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) - -uninstall-libs: - if test $(have_libevent) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEVENT_LIB) ; fi - if test $(have_libuv) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBUV_LIB) ; fi - if test $(have_libev) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEV_LIB) ; fi - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libgetdns.la - -install: install-libs install-headers @INSTALL_STUBBY@ - -uninstall: @UNINSTALL_STUBBY@ uninstall-headers uninstall-libs - -libgetdns_ext_event.la: libgetdns.la libevent.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ libevent.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libevent.symbols - -libgetdns_ext_uv.la: libgetdns.la libuv.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ libuv.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libuv.symbols - - -libgetdns_ext_ev.la: libgetdns.la libev.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ libev.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libev.symbols - -libgetdns.la: $(GETDNS_OBJ) version.lo context.lo anchor.lo $(DEFAULT_EVENTLOOP_OBJ) $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ) $(JSMN_OBJ) $(TLS_OBJ) $(TLS_COMMON_OBJ) $(YXML_OBJ) $(GETDNS_XTRA_OBJS) - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(GETDNS_OBJ) version.lo context.lo anchor.lo $(DEFAULT_EVENTLOOP_OBJ) $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ) $(JSMN_OBJ) $(TLS_OBJ) $(TLS_COMMON_OBJ) $(YXML_OBJ) $(GETDNS_XTRA_OBJS) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/libgetdns.symbols - -test: default - cd test && $(MAKE) $@ - -getdns_query: default - cd tools && $(MAKE) $@ - -getdns_server_mon: default - cd tools && $(MAKE) $@ - -stubby.1: $(stubbysrcdir)/doc/stubby.1.in - sed -e "s|@ETCDIR@|$(stubbyconfdir)|g" $(stubbysrcdir)/doc/stubby.1.in > $@ - -stubby.lo: $(stubbysrcdir)/src/stubby.c - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -DSTUBBYCONFDIR='"$(sysconfdir)/stubby"' -DRUNSTATEDIR='"$(runstatedir)"' -c $(stubbysrcdir)/src/stubby.c -o $@ - -stubby: stubby.lo libgetdns.la $(STUBBY_XTRA_OBJS) - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ stubby.lo $(STUBBY_XTRA_OBJS) $(STUBBY_LDFLAGS) libgetdns.la - -install-stubby-files-unix: $(stubbysrcdir)/stubby.yml.example - $(INSTALL) -m 755 -d $(DESTDIR)$(stubbyconfdir) - test -f $(DESTDIR)$(stubbyconfdir)/stubby.yml || \ - $(INSTALL_DATA) $(stubbysrcdir)/stubby.yml.example $(DESTDIR)$(stubbyconfdir)/stubby.yml - -install-stubby-files-macos: $(stubbysrcdir)/macos/stubby-setdns-macos.sh install-stubby-files-unix - $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) - $(INSTALL) -m 755 $(stubbysrcdir)/macos/stubby-setdns-macos.sh $(DESTDIR)$(sbindir) - -stubby.yml.windows: $(stubbysrcdir)/stubby.yml.example - awk "{sub(/$$/,\"\r\")}1" $(stubbysrcdir)/stubby.yml.example > stubby.yml.windows - -install-stubby-files-windows: stubby.yml.windows - $(INSTALL) -m 755 -d $(DESTDIR)$(stubbyconfdir) - test -f $(DESTDIR)$(stubbyconfdir)/stubby.yml || \ - $(INSTALL_DATA) stubby.yml.windows $(DESTDIR)$(stubbyconfdir)/stubby.yml - -install-stubby: stubby stubby.1 install-stubby-files-@HOSTOS@ - $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) - $(LIBTOOL) --mode=install cp stubby $(DESTDIR)$(bindir) - $(INSTALL) -m 755 -d $(DESTDIR)$(runstatedir) - $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) - $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 - $(INSTALL) -m 644 stubby\.1 $(DESTDIR)$(mandir)/man1 - -uninstall-stubby: - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/stubby - rm -f $(DESTDIR)$(sbindir)/stubby-setdns-macos.sh - rm -f $(DESTDIR)$(mandir)/man1/stubby.1 - -scratchpad: default - cd test && $(MAKE) $@ - -pad: scratchpad - -clean: - cd tools && $(MAKE) $@ - cd test && $(MAKE) $@ - rm -f *.o *.lo extension/*.lo extension/*.o $(PROGRAMS) libgetdns.la libgetdns_ext_*.la - rm -rf .libs extension/.libs - -distclean : clean - cd tools && $(MAKE) $@ - cd test && $(MAKE) $@ - rmdir test 2>/dev/null || true - rm -f Makefile config.status config.log Doxyfile config.h version.c getdns/Makefile getdns/getdns.h getdns/getdns_extra.h - rmdir getdns 2>/dev/null || true - rmdir extension 2>/dev/null || true - rm -Rf autom4te.cache - -Makefile: $(srcdir)/Makefile.in ../config.status - cd .. && ./config.status src/Makefile - -depend: - (cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new ) - - (blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I"$$blddir" -Itls -I$(tlsdir) -Iyxml -Iutil/auxiliary -I../stubby/src *.c gldns/*.c compat/*.c util/*.c jsmn/*.c $(tlsdir)/*.c yxml/*.c extension/*.c ../stubby/src/*.c | \ - sed -e "s? $$blddir/? ?g" \ - -e 's? gldns/? $$(srcdir)/gldns/?g' \ - -e 's? compat/? $$(srcdir)/compat/?g' \ - -e 's? util/auxiliary/util/? $$(srcdir)/util/auxiliary/util/?g' \ - -e 's? util/? $$(srcdir)/util/?g' \ - -e 's? jsmn/? $$(srcdir)/jsmn/?g' \ - -e 's? tls/? $$(srcdir)/tls/?g' \ - -e 's? $(tlsdir)/? $$(srcdir)/$$(tlsdir)/?g' \ - -e 's? yxml/? $$(srcdir)/yxml/?g' \ - -e 's? extension/? $$(srcdir)/extension/?g' \ - -e 's? \.\./stubby/? $$(stubbysrcdir)/?g' \ - -e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \ - -e 's? \$$(srcdir)/config\.h? config.h?g' \ - -e 's? \$$(srcdir)/getdns/getdns_extra\.h? getdns/getdns_extra.h?g' \ - -e 's? \$$(srcdir)/version\.c? version.c?g' \ - -e 's? getdns/getdns_ext_libevent\.h? $$(srcdir)/getdns/getdns_ext_libevent.h?g' \ - -e 's? getdns/getdns_ext_libev\.h? $$(srcdir)/getdns/getdns_ext_libev.h?g' \ - -e 's? getdns/getdns_ext_libuv\.h? $$(srcdir)/getdns/getdns_ext_libuv.h?g' \ - -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new ) - (cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \ - || mv Makefile.in.new Makefile.in ) - cd tools && $(MAKE) $@ - cd test && $(MAKE) $@ - -.PHONY: clean test -FORCE: - -# Dependencies for gldns, utils, the extensions and compat functions -anchor.lo anchor.o: $(srcdir)/anchor.c \ - config.h $(srcdir)/debug.h \ - $(srcdir)/anchor.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/types-internal.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/context.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/yxml/yxml.h $(srcdir)/gldns/parseutil.h $(srcdir)/gldns/str2wire.h \ - $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h \ - $(srcdir)/general.h $(srcdir)/util-internal.h $(srcdir)/platform.h -const-info.lo const-info.o: $(srcdir)/const-info.c \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/const-info.h -context.lo context.o: $(srcdir)/context.c \ - config.h $(srcdir)/anchor.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/types-internal.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/debug.h $(srcdir)/gldns/str2wire.h \ - $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \ - $(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/tls.h \ - $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h $(srcdir)/platform.h $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h \ - $(srcdir)/stub.h $(srcdir)/list.h $(srcdir)/dict.h $(srcdir)/pubkey-pinning.h $(srcdir)/const-info.h -convert.lo convert.o: $(srcdir)/convert.c \ - config.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/extension/default_eventloop.h \ - $(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h \ - $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h \ - $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h \ - $(srcdir)/gldns/parseutil.h $(srcdir)/const-info.h $(srcdir)/dict.h $(srcdir)/list.h $(srcdir)/jsmn/jsmn.h $(srcdir)/convert.h -dict.lo dict.o: $(srcdir)/dict.c \ - config.h \ - $(srcdir)/types-internal.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/util-internal.h $(srcdir)/context.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/dict.h $(srcdir)/list.h $(srcdir)/const-info.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/parseutil.h -dnssec.lo dnssec.o: $(srcdir)/dnssec.c \ - config.h $(srcdir)/debug.h \ - getdns/getdns.h \ - $(srcdir)/context.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \ - $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h \ - $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h \ - $(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h $(srcdir)/gldns/parseutil.h $(srcdir)/general.h \ - $(srcdir)/dict.h $(srcdir)/list.h $(srcdir)/util/val_secalgo.h $(srcdir)/gldns/gbuffer.h -general.lo general.o: $(srcdir)/general.c \ - config.h $(srcdir)/general.h \ - getdns/getdns.h \ - $(srcdir)/types-internal.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/ub_loop.h $(srcdir)/debug.h \ - $(srcdir)/gldns/wire2str.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \ - $(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/util-internal.h $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/stub.h $(srcdir)/dict.h $(srcdir)/mdns.h -list.lo list.o: $(srcdir)/list.c $(srcdir)/types-internal.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/util-internal.h \ - config.h $(srcdir)/context.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/list.h $(srcdir)/dict.h -mdns.lo mdns.o: $(srcdir)/mdns.c \ - config.h $(srcdir)/debug.h \ - $(srcdir)/context.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \ - $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/general.h \ - $(srcdir)/gldns/rrdef.h $(srcdir)/util-internal.h $(srcdir)/platform.h $(srcdir)/mdns.h -platform.lo platform.o: $(srcdir)/platform.c $(srcdir)/platform.h \ - config.h -pubkey-pinning.lo pubkey-pinning.o: $(srcdir)/pubkey-pinning.c \ - config.h $(srcdir)/debug.h \ - getdns/getdns.h \ - $(srcdir)/context.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \ - $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h \ - $(srcdir)/gldns/parseutil.h $(srcdir)/pubkey-pinning.h $(srcdir)/tls/pubkey-pinning-internal.h -request-internal.lo request-internal.o: $(srcdir)/request-internal.c \ - config.h \ - $(srcdir)/types-internal.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/util-internal.h $(srcdir)/context.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/dict.h $(srcdir)/convert.h $(srcdir)/general.h -rr-dict.lo rr-dict.o: $(srcdir)/rr-dict.c $(srcdir)/rr-dict.h \ - config.h \ - getdns/getdns.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/util-internal.h $(srcdir)/context.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/gldns/pkthdr.h \ - $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/dict.h -rr-iter.lo rr-iter.o: $(srcdir)/rr-iter.c $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - config.h \ - getdns/getdns.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/rrdef.h -server.lo server.o: $(srcdir)/server.c \ - config.h \ - getdns/getdns_extra.h \ - getdns/getdns.h \ - $(srcdir)/context.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/util-internal.h $(srcdir)/platform.h -stub.lo stub.o: $(srcdir)/stub.c \ - config.h $(srcdir)/debug.h \ - $(srcdir)/stub.h \ - getdns/getdns.h \ - $(srcdir)/types-internal.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \ - $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/rr-iter.h \ - $(srcdir)/rr-dict.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \ - $(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/anchor.h \ - $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h $(srcdir)/platform.h $(srcdir)/general.h \ - $(srcdir)/pubkey-pinning.h -sync.lo sync.o: $(srcdir)/sync.c \ - getdns/getdns.h \ - config.h $(srcdir)/context.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/general.h $(srcdir)/util-internal.h $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/stub.h $(srcdir)/gldns/wire2str.h -ub_loop.lo ub_loop.o: $(srcdir)/ub_loop.c $(srcdir)/ub_loop.h \ - config.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/debug.h -util-internal.lo util-internal.o: $(srcdir)/util-internal.c \ - config.h \ - getdns/getdns.h \ - $(srcdir)/dict.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/types-internal.h \ - getdns/getdns_extra.h \ - $(srcdir)/list.h $(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \ - $(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h \ - $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h \ - $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/dnssec.h \ - $(srcdir)/gldns/rrdef.h -gbuffer.lo gbuffer.o: $(srcdir)/gldns/gbuffer.c \ - config.h \ - $(srcdir)/gldns/gbuffer.h -keyraw.lo keyraw.o: $(srcdir)/gldns/keyraw.c \ - config.h \ - $(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h $(srcdir)/gldns/rrdef.h -parse.lo parse.o: $(srcdir)/gldns/parse.c \ - config.h \ - $(srcdir)/gldns/parse.h $(srcdir)/gldns/parseutil.h $(srcdir)/gldns/gbuffer.h -parseutil.lo parseutil.o: $(srcdir)/gldns/parseutil.c \ - config.h \ - $(srcdir)/gldns/parseutil.h -rrdef.lo rrdef.o: $(srcdir)/gldns/rrdef.c \ - config.h \ - $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/parseutil.h -str2wire.lo str2wire.o: $(srcdir)/gldns/str2wire.c \ - config.h \ - $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/gbuffer.h \ - $(srcdir)/gldns/parse.h $(srcdir)/gldns/parseutil.h -wire2str.lo wire2str.o: $(srcdir)/gldns/wire2str.c \ - config.h \ - $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/pkthdr.h \ - $(srcdir)/gldns/parseutil.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/keyraw.h \ - $(srcdir)/$(tlsdir)/keyraw-internal.h -arc4_lock.lo arc4_lock.o: $(srcdir)/compat/arc4_lock.c \ - config.h -arc4random.lo arc4random.o: $(srcdir)/compat/arc4random.c \ - config.h \ - $(srcdir)/compat/chacha_private.h -arc4random_uniform.lo arc4random_uniform.o: $(srcdir)/compat/arc4random_uniform.c \ - config.h -explicit_bzero.lo explicit_bzero.o: $(srcdir)/compat/explicit_bzero.c \ - config.h -getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c \ - config.h -getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c \ - config.h -getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c \ - config.h -getentropy_win.lo getentropy_win.o: $(srcdir)/compat/getentropy_win.c -gettimeofday.lo gettimeofday.o: $(srcdir)/compat/gettimeofday.c \ - config.h -inet_ntop.lo inet_ntop.o: $(srcdir)/compat/inet_ntop.c \ - config.h -inet_pton.lo inet_pton.o: $(srcdir)/compat/inet_pton.c \ - config.h -sha512.lo sha512.o: $(srcdir)/compat/sha512.c \ - config.h -strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c \ - config.h -strptime.lo strptime.o: $(srcdir)/compat/strptime.c \ - config.h -locks.lo locks.o: $(srcdir)/util/locks.c \ - config.h $(srcdir)/util/locks.h \ - $(srcdir)/util/orig-headers/locks.h $(srcdir)/util/auxiliary/util/log.h $(srcdir)/debug.h -lookup3.lo lookup3.o: $(srcdir)/util/lookup3.c \ - config.h \ - $(srcdir)/util/auxiliary/util/storage/lookup3.h $(srcdir)/util/lookup3.h \ - $(srcdir)/util/orig-headers/lookup3.h -lruhash.lo lruhash.o: $(srcdir)/util/lruhash.c \ - config.h \ - $(srcdir)/util/auxiliary/util/storage/lruhash.h $(srcdir)/util/lruhash.h \ - $(srcdir)/util/orig-headers/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/orig-headers/locks.h \ - $(srcdir)/util/auxiliary/util/log.h $(srcdir)/debug.h $(srcdir)/util/auxiliary/util/fptr_wlist.h -rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c \ - config.h \ - $(srcdir)/util/auxiliary/log.h $(srcdir)/util/auxiliary/util/log.h $(srcdir)/debug.h \ - $(srcdir)/util/auxiliary/fptr_wlist.h $(srcdir)/util/auxiliary/util/fptr_wlist.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h -jsmn.lo jsmn.o: $(srcdir)/jsmn/jsmn.c $(srcdir)/jsmn/jsmn.h -keyraw-internal.lo keyraw-internal.o: $(srcdir)/$(tlsdir)/keyraw-internal.c \ - config.h \ - $(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h $(srcdir)/gldns/rrdef.h -pubkey-pinning-internal.lo pubkey-pinning-internal.o: $(srcdir)/$(tlsdir)/pubkey-pinning-internal.c \ - config.h $(srcdir)/debug.h \ - getdns/getdns.h \ - $(srcdir)/context.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/tls/pubkey-pinning-internal.h -tls.lo tls.o: $(srcdir)/$(tlsdir)/tls.c \ - config.h $(srcdir)/debug.h \ - $(srcdir)/context.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/const-info.h $(srcdir)/tls.h -yxml.lo yxml.o: $(srcdir)/yxml/yxml.c $(srcdir)/yxml/yxml.h -libev.lo libev.o: $(srcdir)/extension/libev.c \ - config.h \ - $(srcdir)/types-internal.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/getdns/getdns_ext_libev.h -libevent.lo libevent.o: $(srcdir)/extension/libevent.c \ - config.h \ - $(srcdir)/types-internal.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/getdns/getdns_ext_libevent.h -libuv.lo libuv.o: $(srcdir)/extension/libuv.c \ - config.h $(srcdir)/debug.h \ - $(srcdir)/types-internal.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/getdns/getdns_ext_libuv.h -poll_eventloop.lo poll_eventloop.o: $(srcdir)/extension/poll_eventloop.c \ - config.h \ - $(srcdir)/util-internal.h $(srcdir)/context.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \ - $(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \ - $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \ - $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \ - $(srcdir)/platform.h $(srcdir)/debug.h -select_eventloop.lo select_eventloop.o: $(srcdir)/extension/select_eventloop.c \ - config.h $(srcdir)/debug.h \ - $(srcdir)/types-internal.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/platform.h \ - $(srcdir)/extension/select_eventloop.h -stubby.lo stubby.o: $(stubbysrcdir)/src/stubby.c \ - config.h \ - getdns/getdns.h \ - getdns/getdns_extra.h \ - $(stubbysrcdir)/src/yaml/convert_yaml_to_json.h diff --git a/src/test/Makefile.in b/src/test/Makefile.in deleted file mode 100644 index 9d4dad00..00000000 --- a/src/test/Makefile.in +++ /dev/null @@ -1,314 +0,0 @@ -# -# @configure_input@ -# -# Copyright (c) 2013, Verisign, Inc., NLNet Labs -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the names of the copyright holders nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package = @PACKAGE_NAME@ -version = @PACKAGE_VERSION@ -tarname = @PACKAGE_TARNAME@ -distdir = $(tarname)-$(version) - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -INSTALL = @INSTALL@ -LIBTOOL = ../../libtool - -srcdir = @srcdir@ - -have_libevent = @have_libevent@ -have_libuv = @have_libuv@ -have_libev = @have_libev@ -NOLIBCHECK = @NOLIBCHECK@ - -EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@ -EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@ -EXTENSION_LIBUV_EXT_LIBS=@EXTENSION_LIBUV_EXT_LIBS@ -EXTENSION_LIBUV_LDFLAGS=@EXTENSION_LIBUV_LDFLAGS@ -EXTENSION_LIBEV_EXT_LIBS=@EXTENSION_LIBEV_EXT_LIBS@ -EXTENSION_LIBEV_LDFLAGS=@EXTENSION_LIBEV_LDFLAGS@ - -CHECK_GETDNS=@CHECK_GETDNS@ -CHECK_UV_PROG=@CHECK_UV_PROG@ -CHECK_EVENT_PROG=@CHECK_EVENT_PROG@ -CHECK_EV_PROG=@CHECK_EV_PROG@ - -CC=@CC@ -CFLAGS=-I$(srcdir)/.. -I$(srcdir) -I.. $(cflags) @CFLAGS@ @CPPFLAGS@ $(XTRA_CFLAGS) -WPEDANTICFLAG=@WPEDANTICFLAG@ -LDFLAGS=-L.. @LDFLAGS@ -LDLIBS=../libgetdns.la @LIBS@ -CHECK_LIBS=@CHECK_LIBS@ -CHECK_CFLAGS=@CHECK_CFLAGS@ - -CHECK_OBJS=check_getdns_common.lo check_getdns_context_set_timeout.lo \ - check_getdns.lo check_getdns_transport.lo - -ALL_OBJS=$(CHECK_OBJS) check_getdns_libevent.lo check_getdns_libev.lo \ - check_getdns_selectloop.lo scratchpad.lo \ - testmessages.lo tests_dict.lo tests_list.lo tests_namespaces.lo \ - tests_stub_async.lo tests_stub_sync.lo - -NON_C99_OBJS=check_getdns_libuv.lo - -PROGRAMS=tests_dict tests_list tests_namespaces tests_stub_async tests_stub_sync $(CHECK_GETDNS) $(CHECK_EV_PROG) $(CHECK_EVENT_PROG) $(CHECK_UV_PROG) - - -.SUFFIXES: .c .o .a .lo .h - -.c.o: - $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@ - -.c.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@ - -default: all - -all: $(PROGRAMS) - -$(ALL_OBJS): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/$(@:.lo=.c) -o $@ - -$(NON_C99_OBJS): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -c $(srcdir)/$(@:.lo=.c) -o $@ - -tests_dict: tests_dict.lo testmessages.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_dict.lo testmessages.lo - -tests_list: tests_list.lo testmessages.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_list.lo testmessages.lo - -tests_namespaces: tests_namespaces.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_namespaces.lo - -tests_stub_async: tests_stub_async.lo testmessages.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_stub_async.lo testmessages.lo - -tests_stub_sync: tests_stub_sync.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_stub_sync.lo - -check_getdns_common: check_getdns_common.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ check_getdns_common.lo - -check_getdns: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_selectloop.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_selectloop.lo - -check_getdns_event: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libevent.lo ../libgetdns_ext_event.la - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libevent.lo $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) ../libgetdns_ext_event.la $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) - -check_getdns_uv: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libuv.lo ../libgetdns_ext_uv.la - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libuv.lo $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) ../libgetdns_ext_uv.la $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS) - -check_getdns_ev: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libev.lo ../libgetdns_ext_ev.la - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libev.lo $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) ../libgetdns_ext_ev.la $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS) - -scratchpad: scratchpad.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ scratchpad.lo $(LDFLAGS) $(LDLIBS) - -scratchpad.lo: scratchpad.c - -$(srcdir)/scratchpad.c: scratchpad.template.c - [ ! -f $(srcdir)/scratchpad.c ] && cp -p $(srcdir)/scratchpad.template.c $(srcdir)/scratchpad.c || true - -install: - echo nothing to install - -uninstall: - echo nothing to uninstall - -nolibcheck: - @echo "***" - @echo "*** Cannot run unit tests, because they could not be compiled," - @echo "*** because libcheck was not found or usable at configure time." - @echo "*** To compile and run unit tests make sure libcheck is available" - @echo "*** and usable during configuration" - @echo "***" - @false - -test_noeventloop: $(NOLIBCHECK) all - rm -f $(CHECK_GETDNS).failed - GETDNS_TEST_PORT=43210 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_GETDNS).log" ./$(CHECK_GETDNS) || echo "$(CHECK_GETDNS) failed" >> $(CHECK_GETDNS).failed - -test_libevent: $(NOLIBCHECK) all - rm -f $(CHECK_EVENT_PROG).failed - if test $(have_libevent) = 1 ; then GETDNS_TEST_PORT=44321 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_EVENT_PROG).log" ./$(CHECK_EVENT_PROG) || echo "$(CHECK_EVENT_PROG) failed" >> $(CHECK_EVENT_PROG).failed; fi - -test_libev: $(NOLIBCHECK) all - rm -f $(CHECK_EV_PROG).failed - if test $(have_libev) = 1 ; then GETDNS_TEST_PORT=45432 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_EV_PROG).log" ./$(CHECK_EV_PROG) || echo "$(CHECK_EV_PROG) failed" >> $(CHECK_EV_PROG).failed; fi - -test_libuv: $(NOLIBCHECK) all - rm -f $(CHECK_UV_PROG).failed - if test $(have_libev) = 1 ; then GETDNS_TEST_PORT=46543 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_UV_PROG).log" ./$(CHECK_UV_PROG) || echo "$(CHECK_UV_PROG) failed" >> $(CHECK_UV_PROG).failed; fi - -test: test_noeventloop test_libevent test_libev test_libuv - rm -f fails - if test -f $(CHECK_GETDNS).failed ; then cat $(CHECK_GETDNS).failed >> fails ; fi - if test -f $(CHECK_EVENT_PROG).failed ; then cat $(CHECK_EVENT_PROG).failed >> fails ; fi - if test -f $(CHECK_EV_PROG).failed ; then cat $(CHECK_EV_PROG).failed >> fails ; fi - if test -f $(CHECK_UV_PROG).failed ; then cat $(CHECK_UV_PROG).failed >> fails ; fi - test ! -e fails - @echo "All tests OK" - -clean: - rm -f *.o *.lo $(PROGRAMS) scratchpad - rm -rf .libs - rm -f check_getdns.log check_getdns_event.log check_getdns_ev.log check_getdns_uv.log - -distclean : clean - rm -f scratchpad.c - rm -f Makefile config.status config.log - rm -f check_getdns_uv.core check_getdns.core check_getdns_event.core - rm -Rf autom4te.cache - -$(distdir): FORCE - mkdir -p $(distdir)/src - cp configure.ac $(distdir) - cp configure $(distdir) - cp Makefile.in $(distdir) - cp src/Makefile.in $(distdir)/src - -distcheck: $(distdir).tar.gz - gzip -cd $(distdir).tar.gz | tar xvf - - cd $(distdir) && ./configure - cd $(distdir) && $(MAKE) all - cd $(distdir) && $(MAKE) check - cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install - cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall - @remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \ - if test "$${remaining}" -ne 0; then - echo "@@@ $${remaining} file(s) remaining in stage directory!"; \ - exit 1; \ - fi - cd $(distdir) && $(MAKE) clean - rm -rf $(distdir) - @echo "*** Package $(distdir).tar.gz is ready for distribution" - -Makefile: $(srcdir)/Makefile.in ../../config.status - cd ../.. && ./config.status src/test/Makefile - -configure.status: configure - cd ../.. && ./config.status --recheck - -depend: - (cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new ) - (blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I.. -I"$$blddir"/.. *.c | \ - sed -e "s? $$blddir/? ?g" \ - -e 's? \([a-z0-9_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \ - -e 's? \.\./\([a-z0-9_-]*\)\.h? $$(srcdir)/../\1.h?g' \ - -e 's? \.\./\([a-z0-9_-]*\)/\([a-z0-9_-]*\)\.h? $$(srcdir)/../\1/\2.h?g' \ - -e 's? \$$(srcdir)/config\.h? ../config.h?g' \ - -e 's? \$$(srcdir)/\.\./config\.h? ../config.h?g' \ - -e 's? \$$(srcdir)/\.\./getdns/getdns\.h? ../getdns/getdns.h?g' \ - -e 's? \$$(srcdir)/\.\./getdns/getdns_extra\.h? ../getdns/getdns_extra.h?g' \ - -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new ) - (cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \ - || mv Makefile.in.new Makefile.in ) - -.PHONY: clean test - -# Dependencies for the unit tests -check_getdns.lo check_getdns.o: $(srcdir)/check_getdns.c \ - ../getdns/getdns.h \ - $(srcdir)/check_getdns_common.h \ - ../getdns/getdns_extra.h \ - $(srcdir)/check_getdns_address.h $(srcdir)/check_getdns_address_sync.h \ - $(srcdir)/check_getdns_cancel_callback.h $(srcdir)/check_getdns_context_create.h \ - $(srcdir)/check_getdns_context_destroy.h \ - $(srcdir)/check_getdns_context_set_context_update_callback.h \ - $(srcdir)/check_getdns_context_set_dns_transport.h \ - $(srcdir)/check_getdns_context_set_timeout.h \ - $(srcdir)/check_getdns_context_set_upstream_recursive_servers.h \ - $(srcdir)/check_getdns_convert_alabel_to_ulabel.h \ - $(srcdir)/check_getdns_convert_ulabel_to_alabel.h $(srcdir)/check_getdns_dict_destroy.h \ - $(srcdir)/check_getdns_dict_get_bindata.h $(srcdir)/check_getdns_dict_get_data_type.h \ - $(srcdir)/check_getdns_dict_get_dict.h $(srcdir)/check_getdns_dict_get_int.h \ - $(srcdir)/check_getdns_dict_get_list.h $(srcdir)/check_getdns_dict_get_names.h \ - $(srcdir)/check_getdns_dict_set_bindata.h $(srcdir)/check_getdns_dict_set_dict.h \ - $(srcdir)/check_getdns_dict_set_int.h $(srcdir)/check_getdns_dict_set_list.h \ - $(srcdir)/check_getdns_display_ip_address.h $(srcdir)/check_getdns_general.h \ - $(srcdir)/check_getdns_general_sync.h $(srcdir)/check_getdns_hostname.h \ - $(srcdir)/check_getdns_hostname_sync.h $(srcdir)/check_getdns_list_get_bindata.h \ - $(srcdir)/check_getdns_list_get_data_type.h $(srcdir)/check_getdns_list_get_dict.h \ - $(srcdir)/check_getdns_list_get_int.h $(srcdir)/check_getdns_list_get_length.h \ - $(srcdir)/check_getdns_list_get_list.h $(srcdir)/check_getdns_pretty_print_dict.h \ - $(srcdir)/check_getdns_service.h $(srcdir)/check_getdns_service_sync.h \ - $(srcdir)/check_getdns_transport.h -check_getdns_common.lo check_getdns_common.o: $(srcdir)/check_getdns_common.c \ - ../getdns/getdns.h \ - ../config.h \ - $(srcdir)/check_getdns_common.h \ - ../getdns/getdns_extra.h \ - $(srcdir)/check_getdns_eventloop.h -check_getdns_context_set_timeout.lo check_getdns_context_set_timeout.o: $(srcdir)/check_getdns_context_set_timeout.c \ - $(srcdir)/check_getdns_context_set_timeout.h $(srcdir)/check_getdns_common.h \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h -check_getdns_libev.lo check_getdns_libev.o: $(srcdir)/check_getdns_libev.c $(srcdir)/check_getdns_eventloop.h \ - ../config.h \ - ../getdns/getdns.h \ - $(srcdir)/../getdns/getdns_ext_libev.h \ - ../getdns/getdns_extra.h \ - $(srcdir)/check_getdns_common.h -check_getdns_libevent.lo check_getdns_libevent.o: $(srcdir)/check_getdns_libevent.c $(srcdir)/check_getdns_eventloop.h \ - ../config.h \ - ../getdns/getdns.h \ - $(srcdir)/../getdns/getdns_ext_libevent.h \ - ../getdns/getdns_extra.h \ - $(srcdir)/check_getdns_libevent.h $(srcdir)/check_getdns_common.h -check_getdns_libuv.lo check_getdns_libuv.o: $(srcdir)/check_getdns_libuv.c $(srcdir)/check_getdns_eventloop.h \ - ../config.h \ - ../getdns/getdns.h \ - $(srcdir)/../getdns/getdns_ext_libuv.h \ - ../getdns/getdns_extra.h \ - $(srcdir)/check_getdns_common.h -check_getdns_selectloop.lo check_getdns_selectloop.o: $(srcdir)/check_getdns_selectloop.c \ - $(srcdir)/check_getdns_eventloop.h \ - ../config.h \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h -check_getdns_transport.lo check_getdns_transport.o: $(srcdir)/check_getdns_transport.c \ - $(srcdir)/check_getdns_transport.h $(srcdir)/check_getdns_common.h \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h -scratchpad.template.lo scratchpad.template.o: scratchpad.template.c \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h -testmessages.lo testmessages.o: $(srcdir)/testmessages.c $(srcdir)/testmessages.h -tests_dict.lo tests_dict.o: $(srcdir)/tests_dict.c $(srcdir)/testmessages.h \ - ../getdns/getdns.h -tests_list.lo tests_list.o: $(srcdir)/tests_list.c $(srcdir)/testmessages.h \ - ../getdns/getdns.h -tests_namespaces.lo tests_namespaces.o: $(srcdir)/tests_namespaces.c $(srcdir)/testmessages.h \ - ../getdns/getdns.h -tests_stub_async.lo tests_stub_async.o: $(srcdir)/tests_stub_async.c \ - ../config.h \ - $(srcdir)/testmessages.h \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h -tests_stub_sync.lo tests_stub_sync.o: $(srcdir)/tests_stub_sync.c $(srcdir)/testmessages.h \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in deleted file mode 100644 index 6cefffcd..00000000 --- a/src/tools/Makefile.in +++ /dev/null @@ -1,133 +0,0 @@ -# -# @configure_input@ -# -# Copyright (c) 2013, Verisign, Inc., NLNet Labs -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the names of the copyright holders nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package = @PACKAGE_NAME@ -version = @PACKAGE_VERSION@ -tarname = @PACKAGE_TARNAME@ -distdir = $(tarname)-$(version) - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -INSTALL = @INSTALL@ -LIBTOOL = ../../libtool - -srcdir = @srcdir@ - -CC=@CC@ -WPEDANTICFLAG=@WPEDANTICFLAG@ -CFLAGS=-I$(srcdir)/.. -I$(srcdir) -I.. $(cflags) @CFLAGS@ @CPPFLAGS@ $(WPEDANTICFLAG) $(XTRA_CFLAGS) -LDFLAGS=-L.. @LDFLAGS@ -LDLIBS=../libgetdns.la @LIBS@ - -ALL_OBJS=getdns_query.lo getdns_server_mon.lo - -PROGRAMS=getdns_query getdns_server_mon - - -.SUFFIXES: .c .o .a .lo .h - -.c.o: - $(CC) $(CFLAGS) -c $< -o $@ - -.c.lo: - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@ - -default: all - -all: $(PROGRAMS) - -$(ALL_OBJS): - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@ - -getdns_query: getdns_query.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ getdns_query.lo $(LDFLAGS) $(LDLIBS) - -getdns_server_mon: getdns_server_mon.lo - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ getdns_server_mon.lo $(LDFLAGS) $(LDLIBS) - -stubby: - cd .. && $(MAKE) $@ - -install-getdns_query: getdns_query - $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) - $(LIBTOOL) --mode=install cp getdns_query $(DESTDIR)$(bindir) - -uninstall-getdns_query: - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/getdns_query - -install-getdns_server_mon: getdns_server_mon - $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) - $(LIBTOOL) --mode=install cp getdns_server_mon $(DESTDIR)$(bindir) - -uninstall-getdns_server_mon: - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/getdns_server_mon - -install-stubby: - cd .. && $(MAKE) $@ - -uninstall-stubby: - cd .. && $(MAKE) $@ - -clean: - rm -f *.o *.lo $(PROGRAMS) - rm -rf .libs - -distclean : clean - rm -f Makefile - -Makefile: $(srcdir)/Makefile.in ../../config.status - cd ../.. && ./config.status src/test/Makefile - -depend: - (cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new ) - (blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I.. -I"$$blddir"/.. *.c | \ - sed -e "s? $$blddir/? ?g" \ - -e 's? \([a-z0-9_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \ - -e 's? \.\./\([a-z0-9_-]*\)\.h? $$(srcdir)/../\1.h?g' \ - -e 's? \.\./\([a-z0-9_-]*\)/\([a-z0-9_-]*\)\.h? $$(srcdir)/../\1/\2.h?g' \ - -e 's? \$$(srcdir)/config\.h? ../config.h?g' \ - -e 's? \$$(srcdir)/\.\./config\.h? ../config.h?g' \ - -e 's? \$$(srcdir)/\.\./getdns/getdns\.h? ../getdns/getdns.h?g' \ - -e 's? \$$(srcdir)/\.\./getdns/getdns_extra\.h? ../getdns/getdns_extra.h?g' \ - -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new ) - (cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \ - || mv Makefile.in.new Makefile.in ) - -.PHONY: clean test - -# Dependencies for getdns_query -getdns_query.lo getdns_query.o: $(srcdir)/getdns_query.c \ - ../config.h \ - $(srcdir)/../debug.h \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h -getdns_server_mon.lo getdns_server_mon.o: $(srcdir)/getdns_server_mon.c \ - ../config.h \ - ../getdns/getdns.h \ - ../getdns/getdns_extra.h diff --git a/stubby b/stubby index 8a7301ec..6ce87658 160000 --- a/stubby +++ b/stubby @@ -1 +1 @@ -Subproject commit 8a7301ec3d7f160e17cd1a5c1969b15c632d1b5a +Subproject commit 6ce87658d2504c06a47ec60de27e6ae282635f0a