From 98b3b93791777218c04a67ddaef22619162249f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 12 Feb 2020 12:14:00 +0100 Subject: [PATCH 1/3] Remove python based tools (dnssec-keymgr, dnssec-coverage, dnssec-checkds) With the introduction of dnssec-policy, the aforementioned tools were either rendered obsolete, or they will be replaced with dnssec-policy based tools. Remove the tools and the requirement to have Python installed. Python 3 is still being used for tests, so keep the autoconf test, but make it much simpler. --- README | 9 - README.md | 10 - bin/Makefile.in | 2 +- bin/dnssec/dnssec-keygen.docbook | 7 - bin/python/.gitignore | 8 - bin/python/Makefile.in | 80 -- bin/python/dnssec-checkds.8 | 95 --- bin/python/dnssec-checkds.docbook | 148 ---- bin/python/dnssec-checkds.html | 122 --- bin/python/dnssec-checkds.py.in | 27 - bin/python/dnssec-coverage.8 | 156 ---- bin/python/dnssec-coverage.docbook | 272 ------- bin/python/dnssec-coverage.html | 236 ------ bin/python/dnssec-coverage.py.in | 27 - bin/python/dnssec-keymgr.8 | 298 -------- bin/python/dnssec-keymgr.docbook | 422 ----------- bin/python/dnssec-keymgr.html | 371 ---------- bin/python/dnssec-keymgr.py.in | 27 - bin/python/isc/.gitignore | 17 - bin/python/isc/Makefile.in | 43 -- bin/python/isc/__init__.py.in | 24 - bin/python/isc/checkds.py.in | 182 ----- bin/python/isc/coverage.py.in | 290 -------- bin/python/isc/dnskey.py.in | 511 ------------- bin/python/isc/eventlist.py.in | 166 ----- bin/python/isc/keydict.py.in | 87 --- bin/python/isc/keyevent.py.in | 76 -- bin/python/isc/keymgr.py.in | 157 ---- bin/python/isc/keyseries.py.in | 220 ------ bin/python/isc/keyzone.py.in | 57 -- bin/python/isc/policy.py.in | 692 ------------------ bin/python/isc/rndc.py.in | 188 ----- bin/python/isc/tests/.gitignore | 2 - bin/python/isc/tests/Makefile.in | 31 - bin/python/isc/tests/dnskey_test.py.in | 52 -- bin/python/isc/tests/policy_test.py.in | 83 --- .../isc/tests/test-policies/01-keysize.pol | 52 -- .../isc/tests/test-policies/02-prepublish.pol | 42 -- .../tests/test-policies/03-postpublish.pol | 42 -- .../test-policies/04-combined-pre-post.pol | 66 -- .../tests/test-policies/05-numeric-zone.pol | 15 - .../testdata/Kexample.com.+007+35529.key | 8 - .../testdata/Kexample.com.+007+35529.private | 18 - bin/python/isc/utils.py.in | 71 -- bin/python/setup.py | 21 - bin/tests/system/checkds/clean.sh | 13 - bin/tests/system/checkds/dig.bat | 32 - bin/tests/system/checkds/dig.pl | 39 - bin/tests/system/checkds/dig.sh | 22 - .../system/checkds/missing.example.dnskey.db | 3 - .../system/checkds/missing.example.ds.db | 2 - .../system/checkds/none.example.dnskey.db | 3 - bin/tests/system/checkds/none.example.ds.db | 0 bin/tests/system/checkds/ok.example.dnskey.db | 2 - bin/tests/system/checkds/ok.example.ds.db | 2 - bin/tests/system/checkds/prep.example.db | 121 --- bin/tests/system/checkds/prep.example.ds.db | 2 - bin/tests/system/checkds/tests.sh | 115 --- .../system/checkds/wrong.example.dnskey.db | 2 - bin/tests/system/checkds/wrong.example.ds.db | 2 - bin/tests/system/conf.sh.in | 5 +- bin/tests/system/conf.sh.win32 | 5 +- .../system/coverage/01-ksk-inactive/README | 10 - .../system/coverage/01-ksk-inactive/expect | 6 - .../system/coverage/02-zsk-inactive/README | 10 - .../system/coverage/02-zsk-inactive/expect | 6 - .../system/coverage/03-ksk-unpublished/README | 10 - .../system/coverage/03-ksk-unpublished/expect | 8 - .../system/coverage/04-zsk-unpublished/README | 10 - .../system/coverage/04-zsk-unpublished/expect | 8 - .../coverage/05-ksk-unpub-active/README | 12 - .../coverage/05-ksk-unpub-active/expect | 8 - .../coverage/06-zsk-unpub-active/README | 12 - .../coverage/06-zsk-unpub-active/expect | 8 - bin/tests/system/coverage/07-ksk-ttl/README | 4 - bin/tests/system/coverage/07-ksk-ttl/expect | 9 - bin/tests/system/coverage/08-zsk-ttl/README | 4 - bin/tests/system/coverage/08-zsk-ttl/expect | 9 - bin/tests/system/coverage/09-check-zsk/README | 6 - bin/tests/system/coverage/09-check-zsk/expect | 6 - bin/tests/system/coverage/10-check-ksk/README | 7 - bin/tests/system/coverage/10-check-ksk/expect | 6 - bin/tests/system/coverage/11-cutoff/README | 10 - bin/tests/system/coverage/11-cutoff/expect | 6 - .../system/coverage/12-ksk-deletion/expect | 6 - .../system/coverage/13-dotted-dotless/expect | 7 - bin/tests/system/coverage/clean.sh | 17 - bin/tests/system/coverage/setup.sh | 117 --- bin/tests/system/coverage/tests.sh | 85 --- .../system/keymgr/01-ksk-inactive/README | 6 - .../system/keymgr/01-ksk-inactive/expect | 9 - .../system/keymgr/02-zsk-inactive/README | 6 - .../system/keymgr/02-zsk-inactive/expect | 9 - .../system/keymgr/03-ksk-unpublished/README | 6 - .../system/keymgr/03-ksk-unpublished/expect | 9 - .../system/keymgr/04-zsk-unpublished/README | 6 - .../system/keymgr/04-zsk-unpublished/expect | 9 - .../system/keymgr/05-ksk-unpub-active/README | 7 - .../system/keymgr/05-ksk-unpub-active/expect | 9 - .../system/keymgr/06-zsk-unpub-active/README | 7 - .../system/keymgr/06-zsk-unpub-active/expect | 9 - bin/tests/system/keymgr/07-ksk-ttl/README | 6 - bin/tests/system/keymgr/07-ksk-ttl/expect | 9 - bin/tests/system/keymgr/08-zsk-ttl/README | 6 - bin/tests/system/keymgr/08-zsk-ttl/expect | 9 - bin/tests/system/keymgr/09-no-keys/README | 5 - bin/tests/system/keymgr/09-no-keys/expect | 9 - bin/tests/system/keymgr/10-change-roll/README | 7 - bin/tests/system/keymgr/10-change-roll/expect | 9 - bin/tests/system/keymgr/11-many-simul/README | 6 - bin/tests/system/keymgr/11-many-simul/expect | 9 - bin/tests/system/keymgr/12-many-active/README | 6 - bin/tests/system/keymgr/12-many-active/expect | 9 - bin/tests/system/keymgr/13-noroll/README | 6 - bin/tests/system/keymgr/13-noroll/expect | 9 - bin/tests/system/keymgr/14-wrongalg/README | 6 - bin/tests/system/keymgr/14-wrongalg/expect | 9 - bin/tests/system/keymgr/15-unspec/README | 6 - bin/tests/system/keymgr/15-unspec/expect | 9 - .../system/keymgr/16-wrongalg-unspec/README | 6 - .../system/keymgr/16-wrongalg-unspec/expect | 9 - bin/tests/system/keymgr/17-noforce/README | 6 - bin/tests/system/keymgr/17-noforce/expect | 9 - .../system/keymgr/18-nonstd-prepub/README | 7 - .../system/keymgr/18-nonstd-prepub/expect | 9 - .../keymgr/18-nonstd-prepub/policy.conf | 18 - bin/tests/system/keymgr/19-old-keys/README | 7 - bin/tests/system/keymgr/19-old-keys/expect | 12 - bin/tests/system/keymgr/19-old-keys/extra.sh | 19 - .../system/keymgr/19-old-keys/policy.conf | 18 - bin/tests/system/keymgr/clean.sh | 16 - bin/tests/system/keymgr/policy.conf | 21 - bin/tests/system/keymgr/policy.good | 187 ----- bin/tests/system/keymgr/policy.sample | 58 -- bin/tests/system/keymgr/setup.sh | 186 ----- bin/tests/system/keymgr/testpolicy.py | 39 - bin/tests/system/keymgr/tests.sh | 144 ---- bin/win32/BINDInstall/BINDInstallDlg.cpp | 4 - configure | 136 +--- configure.ac | 108 +-- contrib/README | 5 - contrib/kasp/README | 11 - contrib/kasp/kasp.xml | 134 ---- contrib/kasp/kasp2policy.py | 230 ------ contrib/kasp/policy.good | 24 - doc/arm/Bv9ARM-book.xml | 3 - doc/arm/man.dnssec-checkds.html | 161 ---- doc/arm/man.dnssec-coverage.html | 275 ------- doc/arm/man.dnssec-keymgr.html | 410 ----------- doc/design/dnssec-policy | 12 - doc/dev/dev.md | 2 - lib/isc/win32/libisc.vcxproj.in | 5 - util/copyrights | 130 ---- win32utils/Configure | 93 +-- win32utils/build.txt | 44 +- 155 files changed, 25 insertions(+), 9067 deletions(-) delete mode 100644 bin/python/.gitignore delete mode 100644 bin/python/Makefile.in delete mode 100644 bin/python/dnssec-checkds.8 delete mode 100644 bin/python/dnssec-checkds.docbook delete mode 100644 bin/python/dnssec-checkds.html delete mode 100644 bin/python/dnssec-checkds.py.in delete mode 100644 bin/python/dnssec-coverage.8 delete mode 100644 bin/python/dnssec-coverage.docbook delete mode 100644 bin/python/dnssec-coverage.html delete mode 100644 bin/python/dnssec-coverage.py.in delete mode 100644 bin/python/dnssec-keymgr.8 delete mode 100644 bin/python/dnssec-keymgr.docbook delete mode 100644 bin/python/dnssec-keymgr.html delete mode 100644 bin/python/dnssec-keymgr.py.in delete mode 100644 bin/python/isc/.gitignore delete mode 100644 bin/python/isc/Makefile.in delete mode 100644 bin/python/isc/__init__.py.in delete mode 100644 bin/python/isc/checkds.py.in delete mode 100644 bin/python/isc/coverage.py.in delete mode 100644 bin/python/isc/dnskey.py.in delete mode 100644 bin/python/isc/eventlist.py.in delete mode 100644 bin/python/isc/keydict.py.in delete mode 100644 bin/python/isc/keyevent.py.in delete mode 100644 bin/python/isc/keymgr.py.in delete mode 100644 bin/python/isc/keyseries.py.in delete mode 100644 bin/python/isc/keyzone.py.in delete mode 100644 bin/python/isc/policy.py.in delete mode 100644 bin/python/isc/rndc.py.in delete mode 100644 bin/python/isc/tests/.gitignore delete mode 100644 bin/python/isc/tests/Makefile.in delete mode 100644 bin/python/isc/tests/dnskey_test.py.in delete mode 100644 bin/python/isc/tests/policy_test.py.in delete mode 100644 bin/python/isc/tests/test-policies/01-keysize.pol delete mode 100644 bin/python/isc/tests/test-policies/02-prepublish.pol delete mode 100644 bin/python/isc/tests/test-policies/03-postpublish.pol delete mode 100644 bin/python/isc/tests/test-policies/04-combined-pre-post.pol delete mode 100644 bin/python/isc/tests/test-policies/05-numeric-zone.pol delete mode 100644 bin/python/isc/tests/testdata/Kexample.com.+007+35529.key delete mode 100644 bin/python/isc/tests/testdata/Kexample.com.+007+35529.private delete mode 100644 bin/python/isc/utils.py.in delete mode 100644 bin/python/setup.py delete mode 100644 bin/tests/system/checkds/clean.sh delete mode 100755 bin/tests/system/checkds/dig.bat delete mode 100644 bin/tests/system/checkds/dig.pl delete mode 100755 bin/tests/system/checkds/dig.sh delete mode 100644 bin/tests/system/checkds/missing.example.dnskey.db delete mode 100644 bin/tests/system/checkds/missing.example.ds.db delete mode 100644 bin/tests/system/checkds/none.example.dnskey.db delete mode 100644 bin/tests/system/checkds/none.example.ds.db delete mode 100644 bin/tests/system/checkds/ok.example.dnskey.db delete mode 100644 bin/tests/system/checkds/ok.example.ds.db delete mode 100644 bin/tests/system/checkds/prep.example.db delete mode 100644 bin/tests/system/checkds/prep.example.ds.db delete mode 100644 bin/tests/system/checkds/tests.sh delete mode 100644 bin/tests/system/checkds/wrong.example.dnskey.db delete mode 100644 bin/tests/system/checkds/wrong.example.ds.db delete mode 100644 bin/tests/system/coverage/01-ksk-inactive/README delete mode 100644 bin/tests/system/coverage/01-ksk-inactive/expect delete mode 100644 bin/tests/system/coverage/02-zsk-inactive/README delete mode 100644 bin/tests/system/coverage/02-zsk-inactive/expect delete mode 100644 bin/tests/system/coverage/03-ksk-unpublished/README delete mode 100644 bin/tests/system/coverage/03-ksk-unpublished/expect delete mode 100644 bin/tests/system/coverage/04-zsk-unpublished/README delete mode 100644 bin/tests/system/coverage/04-zsk-unpublished/expect delete mode 100644 bin/tests/system/coverage/05-ksk-unpub-active/README delete mode 100644 bin/tests/system/coverage/05-ksk-unpub-active/expect delete mode 100644 bin/tests/system/coverage/06-zsk-unpub-active/README delete mode 100644 bin/tests/system/coverage/06-zsk-unpub-active/expect delete mode 100644 bin/tests/system/coverage/07-ksk-ttl/README delete mode 100644 bin/tests/system/coverage/07-ksk-ttl/expect delete mode 100644 bin/tests/system/coverage/08-zsk-ttl/README delete mode 100644 bin/tests/system/coverage/08-zsk-ttl/expect delete mode 100644 bin/tests/system/coverage/09-check-zsk/README delete mode 100644 bin/tests/system/coverage/09-check-zsk/expect delete mode 100644 bin/tests/system/coverage/10-check-ksk/README delete mode 100644 bin/tests/system/coverage/10-check-ksk/expect delete mode 100644 bin/tests/system/coverage/11-cutoff/README delete mode 100644 bin/tests/system/coverage/11-cutoff/expect delete mode 100644 bin/tests/system/coverage/12-ksk-deletion/expect delete mode 100644 bin/tests/system/coverage/13-dotted-dotless/expect delete mode 100644 bin/tests/system/coverage/clean.sh delete mode 100644 bin/tests/system/coverage/setup.sh delete mode 100644 bin/tests/system/coverage/tests.sh delete mode 100644 bin/tests/system/keymgr/01-ksk-inactive/README delete mode 100644 bin/tests/system/keymgr/01-ksk-inactive/expect delete mode 100644 bin/tests/system/keymgr/02-zsk-inactive/README delete mode 100644 bin/tests/system/keymgr/02-zsk-inactive/expect delete mode 100644 bin/tests/system/keymgr/03-ksk-unpublished/README delete mode 100644 bin/tests/system/keymgr/03-ksk-unpublished/expect delete mode 100644 bin/tests/system/keymgr/04-zsk-unpublished/README delete mode 100644 bin/tests/system/keymgr/04-zsk-unpublished/expect delete mode 100644 bin/tests/system/keymgr/05-ksk-unpub-active/README delete mode 100644 bin/tests/system/keymgr/05-ksk-unpub-active/expect delete mode 100644 bin/tests/system/keymgr/06-zsk-unpub-active/README delete mode 100644 bin/tests/system/keymgr/06-zsk-unpub-active/expect delete mode 100644 bin/tests/system/keymgr/07-ksk-ttl/README delete mode 100644 bin/tests/system/keymgr/07-ksk-ttl/expect delete mode 100644 bin/tests/system/keymgr/08-zsk-ttl/README delete mode 100644 bin/tests/system/keymgr/08-zsk-ttl/expect delete mode 100644 bin/tests/system/keymgr/09-no-keys/README delete mode 100644 bin/tests/system/keymgr/09-no-keys/expect delete mode 100644 bin/tests/system/keymgr/10-change-roll/README delete mode 100644 bin/tests/system/keymgr/10-change-roll/expect delete mode 100644 bin/tests/system/keymgr/11-many-simul/README delete mode 100644 bin/tests/system/keymgr/11-many-simul/expect delete mode 100644 bin/tests/system/keymgr/12-many-active/README delete mode 100644 bin/tests/system/keymgr/12-many-active/expect delete mode 100644 bin/tests/system/keymgr/13-noroll/README delete mode 100644 bin/tests/system/keymgr/13-noroll/expect delete mode 100644 bin/tests/system/keymgr/14-wrongalg/README delete mode 100644 bin/tests/system/keymgr/14-wrongalg/expect delete mode 100644 bin/tests/system/keymgr/15-unspec/README delete mode 100644 bin/tests/system/keymgr/15-unspec/expect delete mode 100644 bin/tests/system/keymgr/16-wrongalg-unspec/README delete mode 100644 bin/tests/system/keymgr/16-wrongalg-unspec/expect delete mode 100644 bin/tests/system/keymgr/17-noforce/README delete mode 100644 bin/tests/system/keymgr/17-noforce/expect delete mode 100644 bin/tests/system/keymgr/18-nonstd-prepub/README delete mode 100644 bin/tests/system/keymgr/18-nonstd-prepub/expect delete mode 100644 bin/tests/system/keymgr/18-nonstd-prepub/policy.conf delete mode 100644 bin/tests/system/keymgr/19-old-keys/README delete mode 100644 bin/tests/system/keymgr/19-old-keys/expect delete mode 100644 bin/tests/system/keymgr/19-old-keys/extra.sh delete mode 100644 bin/tests/system/keymgr/19-old-keys/policy.conf delete mode 100644 bin/tests/system/keymgr/clean.sh delete mode 100644 bin/tests/system/keymgr/policy.conf delete mode 100644 bin/tests/system/keymgr/policy.good delete mode 100644 bin/tests/system/keymgr/policy.sample delete mode 100644 bin/tests/system/keymgr/setup.sh delete mode 100644 bin/tests/system/keymgr/testpolicy.py delete mode 100644 bin/tests/system/keymgr/tests.sh delete mode 100644 contrib/kasp/README delete mode 100644 contrib/kasp/kasp.xml delete mode 100644 contrib/kasp/kasp2policy.py delete mode 100644 contrib/kasp/policy.good delete mode 100644 doc/arm/man.dnssec-checkds.html delete mode 100644 doc/arm/man.dnssec-coverage.html delete mode 100644 doc/arm/man.dnssec-keymgr.html diff --git a/README b/README index 41c682d14b..61a4764efe 100644 --- a/README +++ b/README @@ -181,15 +181,6 @@ This can be downloaded from https://developer.apple.com/download/more/ or, if you have Xcode already installed, you can run xcode-select --install. (Note that an Apple ID may be required to access the download page.) -Dependencies - -Portions of BIND that are written in Python, including dnssec-keymgr, -dnssec-coverage, dnssec-checkds, and some of the system tests, require the -argparse, ply and distutils.core modules to be available. argparse is a -standard module as of Python 2.7 and Python 3.2. ply is available from -https://pypi.python.org/pypi/ply. distutils.core is required for -installation. - Compile-time options To see a full list of configuration options, run configure --help. diff --git a/README.md b/README.md index be07b54ac2..41b7bb7b57 100644 --- a/README.md +++ b/README.md @@ -195,16 +195,6 @@ or, if you have Xcode already installed, you can run `xcode-select --install`. (Note that an Apple ID may be required to access the download page.) -### Dependencies - -Portions of BIND that are written in Python, including -`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the -system tests, require the `argparse`, `ply` and `distutils.core` modules -to be available. -`argparse` is a standard module as of Python 2.7 and Python 3.2. -`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply). -`distutils.core` is required for installation. - #### Compile-time options To see a full list of configuration options, run `configure --help`. diff --git a/bin/Makefile.in b/bin/Makefile.in index 9ad7f626b8..389557222e 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -12,7 +12,7 @@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \ - @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests + @NZD_TOOLS@ @PKCS11_TOOLS@ plugins tests TARGETS = @BIND9_MAKE_RULES@ diff --git a/bin/dnssec/dnssec-keygen.docbook b/bin/dnssec/dnssec-keygen.docbook index 3b9c816224..0768b302b2 100644 --- a/bin/dnssec/dnssec-keygen.docbook +++ b/bin/dnssec/dnssec-keygen.docbook @@ -108,13 +108,6 @@ line. For DNSSEC keys, this must match the name of the zone for which the key is being generated. - - The dnssec-keymgr command acts as a wrapper - around dnssec-keygen, generating and updating keys - as needed to enforce defined security policies such as key rollover - scheduling. Using dnssec-keymgr may be preferable - to direct use of dnssec-keygen. - OPTIONS diff --git a/bin/python/.gitignore b/bin/python/.gitignore deleted file mode 100644 index 010fab03c1..0000000000 --- a/bin/python/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -build -dnssec-checkds -dnssec-checkds.py -dnssec-coverage -dnssec-coverage.py -dnssec-keymgr -dnssec-keymgr.py -*.pyc diff --git a/bin/python/Makefile.in b/bin/python/Makefile.in deleted file mode 100644 index aa678d47ab..0000000000 --- a/bin/python/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -PYTHON = @PYTHON@ - -SUBDIRS = isc - -TARGETS = dnssec-checkds dnssec-coverage dnssec-keymgr -PYSRCS = dnssec-checkds.py dnssec-coverage.py dnssec-keymgr.py - -MANPAGES = dnssec-checkds.8 dnssec-coverage.8 dnssec-keymgr.8 -HTMLPAGES = dnssec-checkds.html dnssec-coverage.html dnssec-keymgr.html -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -dnssec-checkds: dnssec-checkds.py - cp -f dnssec-checkds.py dnssec-checkds - chmod +x dnssec-checkds - -dnssec-coverage: dnssec-coverage.py - cp -f dnssec-coverage.py dnssec-coverage - chmod +x dnssec-coverage - -dnssec-keymgr: dnssec-keymgr.py - cp -f dnssec-keymgr.py dnssec-keymgr - chmod +x dnssec-keymgr - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: ${TARGETS} installdirs - ${INSTALL_SCRIPT} dnssec-checkds ${DESTDIR}${sbindir} - ${INSTALL_SCRIPT} dnssec-coverage ${DESTDIR}${sbindir} - ${INSTALL_SCRIPT} dnssec-keymgr ${DESTDIR}${sbindir} - ${INSTALL_DATA} ${srcdir}/dnssec-checkds.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/dnssec-coverage.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/dnssec-keymgr.8 ${DESTDIR}${mandir}/man8 - if test -n "${PYTHON}" ; then \ - if test -n "${DESTDIR}" ; then \ - ${PYTHON} ${srcdir}/setup.py install --root=${DESTDIR} --prefix=${prefix} @PYTHON_INSTALL_LIB@ ; \ - else \ - ${PYTHON} ${srcdir}/setup.py install --prefix=${prefix} @PYTHON_INSTALL_LIB@ ; \ - fi ; \ - rm -rf build ; \ - fi - -uninstall:: - rm -f ${DESTDIR}${mandir}/man8/dnssec-keymgr.8 - rm -f ${DESTDIR}${mandir}/man8/dnssec-coverage.8 - rm -f ${DESTDIR}${mandir}/man8/dnssec-checkds.8 - rm -f ${DESTDIR}${sbindir}/dnssec-keymgr - rm -f ${DESTDIR}${sbindir}/dnssec-coverage - rm -f ${DESTDIR}${sbindir}/dnssec-checkds - # only manually uninstall for the python package itself - -clean distclean:: - rm -f ${TARGETS} - rm -rf build - -distclean:: - rm -f dnssec-checkds.py dnssec-coverage.py dnssec-keymgr.py diff --git a/bin/python/dnssec-checkds.8 b/bin/python/dnssec-checkds.8 deleted file mode 100644 index c85cbfc691..0000000000 --- a/bin/python/dnssec-checkds.8 +++ /dev/null @@ -1,95 +0,0 @@ -.\" Copyright (C) 2012-2020 Internet Systems Consortium, Inc. ("ISC") -.\" -.\" This Source Code Form is subject to the terms of the Mozilla Public -.\" License, v. 2.0. If a copy of the MPL was not distributed with this -.\" file, You can obtain one at http://mozilla.org/MPL/2.0/. -.\" -.hy 0 -.ad l -'\" t -.\" Title: dnssec-checkds -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 2013-01-01 -.\" Manual: BIND9 -.\" Source: ISC -.\" Language: English -.\" -.TH "DNSSEC\-CHECKDS" "8" "2013\-01\-01" "ISC" "BIND9" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dnssec-checkds \- DNSSEC delegation consistency checking tool -.SH "SYNOPSIS" -.HP \w'\fBdnssec\-checkds\fR\ 'u -\fBdnssec\-checkds\fR [\fB\-d\ \fR\fB\fIdig\ path\fR\fR] [\fB\-D\ \fR\fB\fIdsfromkey\ path\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-s\ \fR\fB\fIfile\fR\fR] {zone} -.SH "DESCRIPTION" -.PP -\fBdnssec\-checkds\fR -verifies the correctness of Delegation Signer (DS) resource records for keys in a specified zone\&. -.SH "OPTIONS" -.PP -\-a \fIalgorithm\fR -.RS 4 -Specify a digest algorithm to use when converting the zone\*(Aqs DNSKEY records to expected DS records\&. This option can be repeated, so that multiple records are checked for each DNSKEY record\&. -.sp -The -\fIalgorithm\fR -must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&. -.RE -.PP -\-f \fIfile\fR -.RS 4 -If a -\fBfile\fR -is specified, then the zone is read from that file to find the DNSKEY records\&. If not, then the DNSKEY records for the zone are looked up in the DNS\&. -.RE -.PP -\-s \fIfile\fR -.RS 4 -Specifies a prepared dsset file, such as would be generated by -\fBdnssec\-signzone\fR, to use as a source for the DS RRset instead of querying the parent\&. -.RE -.PP -\-d \fIdig path\fR -.RS 4 -Specifies a path to a -\fBdig\fR -binary\&. Used for testing\&. -.RE -.PP -\-D \fIdsfromkey path\fR -.RS 4 -Specifies a path to a -\fBdnssec\-dsfromkey\fR -binary\&. Used for testing\&. -.RE -.SH "SEE ALSO" -.PP -\fBdnssec-dsfromkey\fR(8), -\fBdnssec-keygen\fR(8), -\fBdnssec-signzone\fR(8), -.SH "AUTHOR" -.PP -\fBInternet Systems Consortium, Inc\&.\fR -.SH "COPYRIGHT" -.br -Copyright \(co 2012-2020 Internet Systems Consortium, Inc. ("ISC") -.br diff --git a/bin/python/dnssec-checkds.docbook b/bin/python/dnssec-checkds.docbook deleted file mode 100644 index 3a86682b00..0000000000 --- a/bin/python/dnssec-checkds.docbook +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - 2013-01-01 - - - ISC - Internet Systems Consortium, Inc. - - - - dnssec-checkds - 8 - BIND9 - - - - dnssec-checkds - DNSSEC delegation consistency checking tool - - - - - 2012 - 2013 - 2014 - 2015 - 2016 - 2017 - 2018 - 2019 - 2020 - Internet Systems Consortium, Inc. ("ISC") - - - - - - dnssec-checkds - - - - - - zone - - - - DESCRIPTION - - dnssec-checkds - verifies the correctness of Delegation Signer (DS) - resource records for keys in a specified zone. - - - - OPTIONS - - - - - -a algorithm - - - Specify a digest algorithm to use when converting the - zone's DNSKEY records to expected DS records. This - option can be repeated, so that multiple records are - checked for each DNSKEY record. - - - The algorithm must be one of - SHA-1, SHA-256, or SHA-384. These values are case insensitive, - and the hyphen may be omitted. If no algorithm is specified, - the default is SHA-256. - - - - - - -f file - - - If a is specified, then the zone is - read from that file to find the DNSKEY records. If not, - then the DNSKEY records for the zone are looked up in the DNS. - - - - - - -s file - - - Specifies a prepared dsset file, such as would be generated - by dnssec-signzone, to use as a source for - the DS RRset instead of querying the parent. - - - - - - -d dig path - - - Specifies a path to a dig binary. Used - for testing. - - - - - - -D dsfromkey path - - - Specifies a path to a dnssec-dsfromkey binary. - Used for testing. - - - - - - - SEE ALSO - - - dnssec-dsfromkey8 - , - - dnssec-keygen8 - , - - dnssec-signzone8 - , - - - - diff --git a/bin/python/dnssec-checkds.html b/bin/python/dnssec-checkds.html deleted file mode 100644 index 9e23bdcdc6..0000000000 --- a/bin/python/dnssec-checkds.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - -dnssec-checkds - - -
-
- - - - - -
-

Name

-

- dnssec-checkds - — DNSSEC delegation consistency checking tool -

-
- - - -
-

Synopsis

-

- dnssec-checkds - [-d dig path] - [-D dsfromkey path] - [-f file] - [-l domain] - [-s file] - {zone} -

-
- -
-

DESCRIPTION

- -

dnssec-checkds - verifies the correctness of Delegation Signer (DS) - resource records for keys in a specified zone. -

-
- -
-

OPTIONS

- -
-
-a algorithm
-
-

- Specify a digest algorithm to use when converting the - zone's DNSKEY records to expected DS records. This - option can be repeated, so that multiple records are - checked for each DNSKEY record. -

-

- The algorithm must be one of - SHA-1, SHA-256, or SHA-384. These values are case insensitive, - and the hyphen may be omitted. If no algorithm is specified, - the default is SHA-256. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file to find the DNSKEY records. If not, - then the DNSKEY records for the zone are looked up in the DNS. -

-
-
-s file
-
-

- Specifies a prepared dsset file, such as would be generated - by dnssec-signzone, to use as a source for - the DS RRset instead of querying the parent. -

-
-
-d dig path
-
-

- Specifies a path to a dig binary. Used - for testing. -

-
-
-D dsfromkey path
-
-

- Specifies a path to a dnssec-dsfromkey binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - , -

-
- -
- diff --git a/bin/python/dnssec-checkds.py.in b/bin/python/dnssec-checkds.py.in deleted file mode 100644 index ed5ac37488..0000000000 --- a/bin/python/dnssec-checkds.py.in +++ /dev/null @@ -1,27 +0,0 @@ -#!@PYTHON@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import os -import sys - -sys.path.insert(0, os.path.dirname(sys.argv[0])) -if os.name != 'nt': - if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir - sys.path.insert(1, '@PYTHON_INSTALL_DIR@') - else: - sys.path.insert(1, os.path.join('@prefix@', 'lib', - 'python' + sys.version[:3], 'site-packages')) - -import isc.checkds - -if __name__ == "__main__": - isc.checkds.main() diff --git a/bin/python/dnssec-coverage.8 b/bin/python/dnssec-coverage.8 deleted file mode 100644 index 295a1e5edf..0000000000 --- a/bin/python/dnssec-coverage.8 +++ /dev/null @@ -1,156 +0,0 @@ -.\" Copyright (C) 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") -.\" -.\" This Source Code Form is subject to the terms of the Mozilla Public -.\" License, v. 2.0. If a copy of the MPL was not distributed with this -.\" file, You can obtain one at http://mozilla.org/MPL/2.0/. -.\" -.hy 0 -.ad l -'\" t -.\" Title: dnssec-coverage -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 2014-01-11 -.\" Manual: BIND9 -.\" Source: ISC -.\" Language: English -.\" -.TH "DNSSEC\-COVERAGE" "8" "2014\-01\-11" "ISC" "BIND9" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dnssec-coverage \- checks future DNSKEY coverage for a zone -.SH "SYNOPSIS" -.HP \w'\fBdnssec\-coverage\fR\ 'u -\fBdnssec\-coverage\fR [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-l\ \fR\fB\fIlength\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-d\ \fR\fB\fIDNSKEY\ TTL\fR\fR] [\fB\-m\ \fR\fB\fImax\ TTL\fR\fR] [\fB\-r\ \fR\fB\fIinterval\fR\fR] [\fB\-c\ \fR\fB\fIcompilezone\ path\fR\fR] [\fB\-k\fR] [\fB\-z\fR] [zone...] -.SH "DESCRIPTION" -.PP -\fBdnssec\-coverage\fR -verifies that the DNSSEC keys for a given zone or a set of zones have timing metadata set properly to ensure no future lapses in DNSSEC coverage\&. -.PP -If -\fBzone\fR -is specified, then keys found in the key repository matching that zone are scanned, and an ordered list is generated of the events scheduled for that key (i\&.e\&., publication, activation, inactivation, deletion)\&. The list of events is walked in order of occurrence\&. Warnings are generated if any event is scheduled which could cause the zone to enter a state in which validation failures might occur: for example, if the number of published or active keys for a given algorithm drops to zero, or if a key is deleted from the zone too soon after a new key is rolled, and cached data signed by the prior key has not had time to expire from resolver caches\&. -.PP -If -\fBzone\fR -is not specified, then all keys in the key repository will be scanned, and all zones for which there are keys will be analyzed\&. (Note: This method of reporting is only accurate if all the zones that have keys in a given repository share the same TTL parameters\&.) -.SH "OPTIONS" -.PP -\-K \fIdirectory\fR -.RS 4 -Sets the directory in which keys can be found\&. Defaults to the current working directory\&. -.RE -.PP -\-f \fIfile\fR -.RS 4 -If a -\fBfile\fR -is specified, then the zone is read from that file; the largest TTL and the DNSKEY TTL are determined directly from the zone data, and the -\fB\-m\fR -and -\fB\-d\fR -options do not need to be specified on the command line\&. -.RE -.PP -\-l \fIduration\fR -.RS 4 -The length of time to check for DNSSEC coverage\&. Key events scheduled further into the future than -\fBduration\fR -will be ignored, and assumed to be correct\&. -.sp -The value of -\fBduration\fR -can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.RE -.PP -\-m \fImaximum TTL\fR -.RS 4 -Sets the value to be used as the maximum TTL for the zone or zones being analyzed when determining whether there is a possibility of validation failure\&. When a zone\-signing key is deactivated, there must be enough time for the record in the zone with the longest TTL to have expired from resolver caches before that key can be purged from the DNSKEY RRset\&. If that condition does not apply, a warning will be generated\&. -.sp -The length of the TTL can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.sp -This option is not necessary if the -\fB\-f\fR -has been used to specify a zone file\&. If -\fB\-f\fR -has been specified, this option may still be used; it will override the value found in the file\&. -.sp -If this option is not used and the maximum TTL cannot be retrieved from a zone file, a warning is generated and a default value of 1 week is used\&. -.RE -.PP -\-d \fIDNSKEY TTL\fR -.RS 4 -Sets the value to be used as the DNSKEY TTL for the zone or zones being analyzed when determining whether there is a possibility of validation failure\&. When a key is rolled (that is, replaced with a new key), there must be enough time for the old DNSKEY RRset to have expired from resolver caches before the new key is activated and begins generating signatures\&. If that condition does not apply, a warning will be generated\&. -.sp -The length of the TTL can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.sp -This option is not necessary if -\fB\-f\fR -has been used to specify a zone file from which the TTL of the DNSKEY RRset can be read, or if a default key TTL was set using ith the -\fB\-L\fR -to -\fBdnssec\-keygen\fR\&. If either of those is true, this option may still be used; it will override the values found in the zone file or the key file\&. -.sp -If this option is not used and the key TTL cannot be retrieved from the zone file or the key file, then a warning is generated and a default value of 1 day is used\&. -.RE -.PP -\-r \fIresign interval\fR -.RS 4 -Sets the value to be used as the resign interval for the zone or zones being analyzed when determining whether there is a possibility of validation failure\&. This value defaults to 22\&.5 days, which is also the default in -\fBnamed\fR\&. However, if it has been changed by the -\fBsig\-validity\-interval\fR -option in -named\&.conf, then it should also be changed here\&. -.sp -The length of the interval can be set in seconds, or in larger units of time by adding a suffix: \*(Aqmi\*(Aq for minutes, \*(Aqh\*(Aq for hours, \*(Aqd\*(Aq for days, \*(Aqw\*(Aq for weeks, \*(Aqmo\*(Aq for months, \*(Aqy\*(Aq for years\&. -.RE -.PP -\-k -.RS 4 -Only check KSK coverage; ignore ZSK events\&. Cannot be used with -\fB\-z\fR\&. -.RE -.PP -\-z -.RS 4 -Only check ZSK coverage; ignore KSK events\&. Cannot be used with -\fB\-k\fR\&. -.RE -.PP -\-c \fIcompilezone path\fR -.RS 4 -Specifies a path to a -\fBnamed\-compilezone\fR -binary\&. Used for testing\&. -.RE -.SH "SEE ALSO" -.PP -\fBdnssec-checkds\fR(8), -\fBdnssec-dsfromkey\fR(8), -\fBdnssec-keygen\fR(8), -\fBdnssec-signzone\fR(8) -.SH "AUTHOR" -.PP -\fBInternet Systems Consortium, Inc\&.\fR -.SH "COPYRIGHT" -.br -Copyright \(co 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") -.br diff --git a/bin/python/dnssec-coverage.docbook b/bin/python/dnssec-coverage.docbook deleted file mode 100644 index cbbf773ff6..0000000000 --- a/bin/python/dnssec-coverage.docbook +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - 2014-01-11 - - - ISC - Internet Systems Consortium, Inc. - - - - dnssec-coverage - 8 - BIND9 - - - - dnssec-coverage - checks future DNSKEY coverage for a zone - - - - - 2013 - 2014 - 2015 - 2016 - 2018 - 2019 - 2020 - Internet Systems Consortium, Inc. ("ISC") - - - - - - dnssec-coverage - - - - - - - - - - zone - - - - DESCRIPTION - - dnssec-coverage - verifies that the DNSSEC keys for a given zone or a set of zones - have timing metadata set properly to ensure no future lapses in DNSSEC - coverage. - - - If is specified, then keys found in - the key repository matching that zone are scanned, and an ordered - list is generated of the events scheduled for that key (i.e., - publication, activation, inactivation, deletion). The list of - events is walked in order of occurrence. Warnings are generated - if any event is scheduled which could cause the zone to enter a - state in which validation failures might occur: for example, if - the number of published or active keys for a given algorithm drops - to zero, or if a key is deleted from the zone too soon after a new - key is rolled, and cached data signed by the prior key has not had - time to expire from resolver caches. - - - If is not specified, then all keys in the - key repository will be scanned, and all zones for which there are - keys will be analyzed. (Note: This method of reporting is only - accurate if all the zones that have keys in a given repository - share the same TTL parameters.) - - - - OPTIONS - - - - - -K directory - - - Sets the directory in which keys can be found. Defaults to the - current working directory. - - - - - - -f file - - - If a is specified, then the zone is - read from that file; the largest TTL and the DNSKEY TTL are - determined directly from the zone data, and the - and options do - not need to be specified on the command line. - - - - - - -l duration - - - The length of time to check for DNSSEC coverage. Key events - scheduled further into the future than - will be ignored, and assumed to be correct. - - - The value of can be set in seconds, - or in larger units of time by adding a suffix: 'mi' for minutes, - 'h' for hours, 'd' for days, 'w' for weeks, 'mo' for months, - 'y' for years. - - - - - - -m maximum TTL - - - Sets the value to be used as the maximum TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a zone-signing key is - deactivated, there must be enough time for the record in the - zone with the longest TTL to have expired from resolver caches - before that key can be purged from the DNSKEY RRset. If that - condition does not apply, a warning will be generated. - - - The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. - - - This option is not necessary if the has - been used to specify a zone file. If has - been specified, this option may still be used; it will override - the value found in the file. - - - If this option is not used and the maximum TTL cannot be retrieved - from a zone file, a warning is generated and a default value of - 1 week is used. - - - - - - -d DNSKEY TTL - - - Sets the value to be used as the DNSKEY TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a key is rolled (that - is, replaced with a new key), there must be enough time for the - old DNSKEY RRset to have expired from resolver caches before - the new key is activated and begins generating signatures. If - that condition does not apply, a warning will be generated. - - - The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. - - - This option is not necessary if has - been used to specify a zone file from which the TTL - of the DNSKEY RRset can be read, or if a default key TTL was - set using ith the to - dnssec-keygen. If either of those is true, - this option may still be used; it will override the values - found in the zone file or the key file. - - - If this option is not used and the key TTL cannot be retrieved - from the zone file or the key file, then a warning is generated - and a default value of 1 day is used. - - - - - - -r resign interval - - - Sets the value to be used as the resign interval for the zone - or zones being analyzed when determining whether there is a - possibility of validation failure. This value defaults to - 22.5 days, which is also the default in - named. However, if it has been changed - by the option in - named.conf, then it should also be - changed here. - - - The length of the interval can be set in seconds, or in larger - units of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. - - - - - - -k - - - Only check KSK coverage; ignore ZSK events. Cannot be - used with . - - - - - - -z - - - Only check ZSK coverage; ignore KSK events. Cannot be - used with . - - - - - - - -c compilezone path - - - Specifies a path to a named-compilezone binary. - Used for testing. - - - - - - - SEE ALSO - - - - dnssec-checkds8 - , - - dnssec-dsfromkey8 - , - - dnssec-keygen8 - , - - dnssec-signzone8 - - - - - diff --git a/bin/python/dnssec-coverage.html b/bin/python/dnssec-coverage.html deleted file mode 100644 index 83b881a248..0000000000 --- a/bin/python/dnssec-coverage.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - -dnssec-coverage - - -
-
- - - - - -
-

Name

-

- dnssec-coverage - — checks future DNSKEY coverage for a zone -

-
- - - -
-

Synopsis

-

- dnssec-coverage - [-K directory] - [-l length] - [-f file] - [-d DNSKEY TTL] - [-m max TTL] - [-r interval] - [-c compilezone path] - [-k] - [-z] - [zone...] -

-
- -
-

DESCRIPTION

- -

dnssec-coverage - verifies that the DNSSEC keys for a given zone or a set of zones - have timing metadata set properly to ensure no future lapses in DNSSEC - coverage. -

-

- If zone is specified, then keys found in - the key repository matching that zone are scanned, and an ordered - list is generated of the events scheduled for that key (i.e., - publication, activation, inactivation, deletion). The list of - events is walked in order of occurrence. Warnings are generated - if any event is scheduled which could cause the zone to enter a - state in which validation failures might occur: for example, if - the number of published or active keys for a given algorithm drops - to zero, or if a key is deleted from the zone too soon after a new - key is rolled, and cached data signed by the prior key has not had - time to expire from resolver caches. -

-

- If zone is not specified, then all keys in the - key repository will be scanned, and all zones for which there are - keys will be analyzed. (Note: This method of reporting is only - accurate if all the zones that have keys in a given repository - share the same TTL parameters.) -

-
- -
-

OPTIONS

- - -
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file; the largest TTL and the DNSKEY TTL are - determined directly from the zone data, and the - -m and -d options do - not need to be specified on the command line. -

-
-
-l duration
-
-

- The length of time to check for DNSSEC coverage. Key events - scheduled further into the future than duration - will be ignored, and assumed to be correct. -

-

- The value of duration can be set in seconds, - or in larger units of time by adding a suffix: 'mi' for minutes, - 'h' for hours, 'd' for days, 'w' for weeks, 'mo' for months, - 'y' for years. -

-
-
-m maximum TTL
-
-

- Sets the value to be used as the maximum TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a zone-signing key is - deactivated, there must be enough time for the record in the - zone with the longest TTL to have expired from resolver caches - before that key can be purged from the DNSKEY RRset. If that - condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if the -f has - been used to specify a zone file. If -f has - been specified, this option may still be used; it will override - the value found in the file. -

-

- If this option is not used and the maximum TTL cannot be retrieved - from a zone file, a warning is generated and a default value of - 1 week is used. -

-
-
-d DNSKEY TTL
-
-

- Sets the value to be used as the DNSKEY TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a key is rolled (that - is, replaced with a new key), there must be enough time for the - old DNSKEY RRset to have expired from resolver caches before - the new key is activated and begins generating signatures. If - that condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if -f has - been used to specify a zone file from which the TTL - of the DNSKEY RRset can be read, or if a default key TTL was - set using ith the -L to - dnssec-keygen. If either of those is true, - this option may still be used; it will override the values - found in the zone file or the key file. -

-

- If this option is not used and the key TTL cannot be retrieved - from the zone file or the key file, then a warning is generated - and a default value of 1 day is used. -

-
-
-r resign interval
-
-

- Sets the value to be used as the resign interval for the zone - or zones being analyzed when determining whether there is a - possibility of validation failure. This value defaults to - 22.5 days, which is also the default in - named. However, if it has been changed - by the sig-validity-interval option in - named.conf, then it should also be - changed here. -

-

- The length of the interval can be set in seconds, or in larger - units of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-
-
-k
-
-

- Only check KSK coverage; ignore ZSK events. Cannot be - used with -z. -

-
-
-z
-
-

- Only check ZSK coverage; ignore KSK events. Cannot be - used with -k. -

-
-
-c compilezone path
-
-

- Specifies a path to a named-compilezone binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- - dnssec-checkds(8) - , - - dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - -

-
- -
- diff --git a/bin/python/dnssec-coverage.py.in b/bin/python/dnssec-coverage.py.in deleted file mode 100644 index 8518dc3b66..0000000000 --- a/bin/python/dnssec-coverage.py.in +++ /dev/null @@ -1,27 +0,0 @@ -#!@PYTHON@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import os -import sys - -sys.path.insert(0, os.path.dirname(sys.argv[0])) -if os.name != 'nt': - if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir - sys.path.insert(1, '@PYTHON_INSTALL_DIR@') - else: - sys.path.insert(1, os.path.join('@prefix@', 'lib', - 'python' + sys.version[:3], 'site-packages')) - -import isc.coverage - -if __name__ == "__main__": - isc.coverage.main() diff --git a/bin/python/dnssec-keymgr.8 b/bin/python/dnssec-keymgr.8 deleted file mode 100644 index e51b7d8b31..0000000000 --- a/bin/python/dnssec-keymgr.8 +++ /dev/null @@ -1,298 +0,0 @@ -.\" Copyright (C) 2016-2020 Internet Systems Consortium, Inc. ("ISC") -.\" -.\" This Source Code Form is subject to the terms of the Mozilla Public -.\" License, v. 2.0. If a copy of the MPL was not distributed with this -.\" file, You can obtain one at http://mozilla.org/MPL/2.0/. -.\" -.hy 0 -.ad l -'\" t -.\" Title: dnssec-keymgr -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 2016-06-03 -.\" Manual: BIND9 -.\" Source: ISC -.\" Language: English -.\" -.TH "DNSSEC\-KEYMGR" "8" "2016\-06\-03" "ISC" "BIND9" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dnssec-keymgr \- Ensures correct DNSKEY coverage for a zone based on a defined policy -.SH "SYNOPSIS" -.HP \w'\fBdnssec\-keymgr\fR\ 'u -\fBdnssec\-keymgr\fR [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-c\ \fR\fB\fIfile\fR\fR] [\fB\-f\fR] [\fB\-k\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-z\fR] [\fB\-g\ \fR\fB\fIpath\fR\fR] [\fB\-s\ \fR\fB\fIpath\fR\fR] [zone...] -.SH "DESCRIPTION" -.PP -\fBdnssec\-keymgr\fR -is a high level Python wrapper to facilitate the key rollover process for zones handled by BIND\&. It uses the BIND commands for manipulating DNSSEC key metadata: -\fBdnssec\-keygen\fR -and -\fBdnssec\-settime\fR\&. -.PP -DNSSEC policy can be read from a configuration file (default -/etc/dnssec\-policy\&.conf), from which the key parameters, publication and rollover schedule, and desired coverage duration for any given zone can be determined\&. This file may be used to define individual DNSSEC policies on a per\-zone basis, or to set a "default" policy used for all zones\&. -.PP -When -\fBdnssec\-keymgr\fR -runs, it examines the DNSSEC keys for one or more zones, comparing their timing metadata against the policies for those zones\&. If key settings do not conform to the DNSSEC policy (for example, because the policy has been changed), they are automatically corrected\&. -.PP -A zone policy can specify a duration for which we want to ensure the key correctness (\fBcoverage\fR)\&. It can also specify a rollover period (\fBroll\-period\fR)\&. If policy indicates that a key should roll over before the coverage period ends, then a successor key will automatically be created and added to the end of the key series\&. -.PP -If zones are specified on the command line, -\fBdnssec\-keymgr\fR -will examine only those zones\&. If a specified zone does not already have keys in place, then keys will be generated for it according to policy\&. -.PP -If zones are -\fInot\fR -specified on the command line, then -\fBdnssec\-keymgr\fR -will search the key directory (either the current working directory or the directory set by the -\fB\-K\fR -option), and check the keys for all the zones represented in the directory\&. -.PP -Key times that are in the past will not be updated unless the -\fB\-f\fR -is used (see below)\&. Key inactivation and deletion times that are less than five minutes in the future will be delayed by five minutes\&. -.PP -It is expected that this tool will be run automatically and unattended (for example, by -\fBcron\fR)\&. -.SH "OPTIONS" -.PP -\-c \fIfile\fR -.RS 4 -If -\fB\-c\fR -is specified, then the DNSSEC policy is read from -\fBfile\fR\&. (If not specified, then the policy is read from -/etc/dnssec\-policy\&.conf; if that file doesn\*(Aqt exist, a built\-in global default policy is used\&.) -.RE -.PP -\-f -.RS 4 -Force: allow updating of key events even if they are already in the past\&. This is not recommended for use with zones in which keys have already been published\&. However, if a set of keys has been generated all of which have publication and activation dates in the past, but the keys have not been published in a zone as yet, then this option can be used to clean them up and turn them into a proper series of keys with appropriate rollover intervals\&. -.RE -.PP -\-g \fIkeygen\-path\fR -.RS 4 -Specifies a path to a -\fBdnssec\-keygen\fR -binary\&. Used for testing\&. See also the -\fB\-s\fR -option\&. -.RE -.PP -\-h -.RS 4 -Print the -\fBdnssec\-keymgr\fR -help summary and exit\&. -.RE -.PP -\-K \fIdirectory\fR -.RS 4 -Sets the directory in which keys can be found\&. Defaults to the current working directory\&. -.RE -.PP -\-k -.RS 4 -Only apply policies to KSK keys\&. See also the -\fB\-z\fR -option\&. -.RE -.PP -\-q -.RS 4 -Quiet: suppress printing of -\fBdnssec\-keygen\fR -and -\fBdnssec\-settime\fR\&. -.RE -.PP -\-s \fIsettime\-path\fR -.RS 4 -Specifies a path to a -\fBdnssec\-settime\fR -binary\&. Used for testing\&. See also the -\fB\-g\fR -option\&. -.RE -.PP -\-v -.RS 4 -Print the -\fBdnssec\-keymgr\fR -version and exit\&. -.RE -.PP -\-z -.RS 4 -Only apply policies to ZSK keys\&. See also the -\fB\-k\fR -option\&. -.RE -.SH "POLICY CONFIGURATION" -.PP -The -dnssec\-policy\&.conf -file can specify three kinds of policies: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIPolicy classes\fR -(\fBpolicy \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR) can be inherited by zone policies or other policy classes; these can be used to create sets of different security profiles\&. For example, a policy class -\fBnormal\fR -might specify 1024\-bit key sizes, but a class -\fBextra\fR -might specify 2048 bits instead; -\fBextra\fR -would be used for zones that had unusually high security needs\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIAlgorithm policies:\fR -(\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&. };\fR -) override default per\-algorithm settings\&. For example, by default, RSASHA256 keys use 2048\-bit key sizes for both KSK and ZSK\&. This can be modified using -\fBalgorithm\-policy\fR, and the new key sizes would then be used for any key of type RSASHA256\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIZone policies:\fR -(\fBzone \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR -) set policy for a single zone by name\&. A zone policy can inherit a policy class by including a -\fBpolicy\fR -option\&. Zone names beginning with digits (i\&.e\&., 0\-9) must be quoted\&. If a zone does not have its own policy then the "default" policy applies\&. -.RE -.PP -Options that can be specified in policies: -.PP -\fBalgorithm\fR \fIname\fR; -.RS 4 -The key algorithm\&. If no policy is defined, the default is RSASHA256\&. -.RE -.PP -\fBcoverage\fR \fIduration\fR; -.RS 4 -The length of time to ensure that keys will be correct; no action will be taken to create new keys to be activated after this time\&. This can be represented as a number of seconds, or as a duration using human\-readable units (examples: "1y" or "6 months")\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is six months\&. -.RE -.PP -\fBdirectory\fR \fIpath\fR; -.RS 4 -Specifies the directory in which keys should be stored\&. -.RE -.PP -\fBkey\-size\fR \fIkeytype\fR \fIsize\fR; -.RS 4 -Specifies the number of bits to use in creating keys\&. The keytype is either "zsk" or "ksk"\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&. -.RE -.PP -\fBkeyttl\fR \fIduration\fR; -.RS 4 -The key TTL\&. If no policy is defined, the default is one hour\&. -.RE -.PP -\fBpost\-publish\fR \fIkeytype\fR \fIduration\fR; -.RS 4 -How long after inactivation a key should be deleted from the zone\&. Note: If -\fBroll\-period\fR -is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&. -.RE -.PP -\fBpre\-publish\fR \fIkeytype\fR \fIduration\fR; -.RS 4 -How long before activation a key should be published\&. Note: If -\fBroll\-period\fR -is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&. -.RE -.PP -\fBroll\-period\fR \fIkeytype\fR \fIduration\fR; -.RS 4 -How frequently keys should be rolled over\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is one year for ZSKs\&. KSKs do not roll over by default\&. -.RE -.PP -\fBstandby\fR \fIkeytype\fR \fInumber\fR; -.RS 4 -Not yet implemented\&. -.RE -.SH "REMAINING WORK" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Enable scheduling of KSK rollovers using the -\fB\-P sync\fR -and -\fB\-D sync\fR -options to -\fBdnssec\-keygen\fR -and -\fBdnssec\-settime\fR\&. Check the parent zone (as in -\fBdnssec\-checkds\fR) to determine when it\*(Aqs safe for the key to roll\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Allow configuration of standby keys and use of the REVOKE bit, for keys that use RFC 5011 semantics\&. -.RE -.SH "SEE ALSO" -.PP -\fBdnssec-coverage\fR(8), -\fBdnssec-keygen\fR(8), -\fBdnssec-settime\fR(8), -\fBdnssec-checkds\fR(8) -.SH "AUTHOR" -.PP -\fBInternet Systems Consortium, Inc\&.\fR -.SH "COPYRIGHT" -.br -Copyright \(co 2016-2020 Internet Systems Consortium, Inc. ("ISC") -.br diff --git a/bin/python/dnssec-keymgr.docbook b/bin/python/dnssec-keymgr.docbook deleted file mode 100644 index dd29a9a046..0000000000 --- a/bin/python/dnssec-keymgr.docbook +++ /dev/null @@ -1,422 +0,0 @@ - - - - - 2016-06-03 - - - ISC - Internet Systems Consortium, Inc. - - - - dnssec-keymgr - 8 - BIND9 - - - - dnssec-keymgr - Ensures correct DNSKEY coverage for a zone based on a defined policy - - - - - 2016 - 2017 - 2018 - 2019 - 2020 - Internet Systems Consortium, Inc. ("ISC") - - - - - - dnssec-keymgr - - - - - - - - - - zone - - - - DESCRIPTION - - dnssec-keymgr is a high level Python wrapper - to facilitate the key rollover process for zones handled by - BIND. It uses the BIND commands for manipulating DNSSEC key - metadata: dnssec-keygen and - dnssec-settime. - - - DNSSEC policy can be read from a configuration file (default - /etc/dnssec-policy.conf), from which the - key parameters, publication and rollover schedule, and desired - coverage duration for any given zone can be determined. This - file may be used to define individual DNSSEC policies on a - per-zone basis, or to set a "default" policy - used for all zones. - - - When dnssec-keymgr runs, it examines the DNSSEC - keys for one or more zones, comparing their timing metadata against - the policies for those zones. If key settings do not conform to the - DNSSEC policy (for example, because the policy has been changed), - they are automatically corrected. - - - A zone policy can specify a duration for which we want to - ensure the key correctness (). It can - also specify a rollover period (). - If policy indicates that a key should roll over before the - coverage period ends, then a successor key will automatically be - created and added to the end of the key series. - - - If zones are specified on the command line, - dnssec-keymgr will examine only those zones. - If a specified zone does not already have keys in place, then - keys will be generated for it according to policy. - - - If zones are not specified on the command - line, then dnssec-keymgr will search the - key directory (either the current working directory or the directory - set by the option), and check the keys for - all the zones represented in the directory. - - - Key times that are in the past will not be updated unless - the is used (see below). Key inactivation - and deletion times that are less than five minutes in the future - will be delayed by five minutes. - - - It is expected that this tool will be run automatically and - unattended (for example, by cron). - - - - OPTIONS - - - -c file - - - If is specified, then the DNSSEC - policy is read from . (If not - specified, then the policy is read from - /etc/dnssec-policy.conf; if that file - doesn't exist, a built-in global default policy is used.) - - - - - - -f - - - Force: allow updating of key events even if they are - already in the past. This is not recommended for use with - zones in which keys have already been published. However, - if a set of keys has been generated all of which have - publication and activation dates in the past, but the - keys have not been published in a zone as yet, then this - option can be used to clean them up and turn them into a - proper series of keys with appropriate rollover intervals. - - - - - - -g keygen-path - - - Specifies a path to a dnssec-keygen binary. - Used for testing. - See also the option. - - - - - - -h - - - Print the dnssec-keymgr help summary - and exit. - - - - - - -K directory - - - Sets the directory in which keys can be found. Defaults to the - current working directory. - - - - - - -k - - - Only apply policies to KSK keys. - See also the option. - - - - - - -q - - - Quiet: suppress printing of dnssec-keygen - and dnssec-settime. - - - - - - -s settime-path - - - Specifies a path to a dnssec-settime binary. - Used for testing. - See also the option. - - - - - - -v - - - Print the dnssec-keymgr version and exit. - - - - - - -z - - - Only apply policies to ZSK keys. - See also the option. - - - - - - - POLICY CONFIGURATION - - The dnssec-policy.conf file can specify three kinds - of policies: - - - - - Policy classes - () - can be inherited by zone policies or other policy classes; these - can be used to create sets of different security profiles. For - example, a policy class normal might specify - 1024-bit key sizes, but a class extra might - specify 2048 bits instead; extra would be - used for zones that had unusually high security needs. - - - - - Algorithm policies: - ( ) - override default per-algorithm settings. For example, by default, - RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This - can be modified using algorithm-policy, and the - new key sizes would then be used for any key of type RSASHA256. - - - - - Zone policies: - ( ) - set policy for a single zone by name. A zone policy can inherit - a policy class by including a option. - Zone names beginning with digits (i.e., 0-9) must be quoted. - If a zone does not have its own policy then the - "default" policy applies. - - - - - Options that can be specified in policies: - - - - algorithm - name; - - - The key algorithm. If no policy is defined, the default is - RSASHA256. - - - - - coverage - duration; - - - The length of time to ensure that keys will be correct; no action - will be taken to create new keys to be activated after this time. - This can be represented as a number of seconds, or as a duration - using human-readable units (examples: "1y" or "6 months"). - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. - If no policy is configured, the default is six months. - - - - - directory - path; - - - Specifies the directory in which keys should be stored. - - - - - key-size keytype - size; - - - Specifies the number of bits to use in creating keys. - The keytype is either "zsk" or "ksk". - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is 2048 bits for RSA keys. - - - - - keyttl - duration; - - - The key TTL. If no policy is defined, the default is one hour. - - - - - post-publish keytype - duration; - - - How long after inactivation a key should be deleted from the zone. - Note: If is not set, this value is - ignored. The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm - policies as well as in policy classes or zone policies. The default - is one month. - - - - - pre-publish keytype - duration; - - - How long before activation a key should be published. Note: If - is not set, this value is ignored. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. The default is - one month. - - - - - roll-period keytype - duration; - - - How frequently keys should be rolled over. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is one year for ZSKs. KSKs do not - roll over by default. - - - - - standby keytype - number; - - - Not yet implemented. - - - - - - - REMAINING WORK - - - - Enable scheduling of KSK rollovers using the - and options to - dnssec-keygen and - dnssec-settime. Check the parent zone - (as in dnssec-checkds) to determine when it's - safe for the key to roll. - - - - - Allow configuration of standby keys and use of the REVOKE bit, - for keys that use RFC 5011 semantics. - - - - - - SEE ALSO - - - dnssec-coverage8 - , - - dnssec-keygen8 - , - - dnssec-settime8 - , - - dnssec-checkds8 - - - - - diff --git a/bin/python/dnssec-keymgr.html b/bin/python/dnssec-keymgr.html deleted file mode 100644 index 6fe0876501..0000000000 --- a/bin/python/dnssec-keymgr.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - -dnssec-keymgr - - -
-
- - - - - -
-

Name

-

- dnssec-keymgr - — Ensures correct DNSKEY coverage for a zone based on a defined policy -

-
- - - -
-

Synopsis

-

- dnssec-keymgr - [-K directory] - [-c file] - [-f] - [-k] - [-q] - [-v] - [-z] - [-g path] - [-s path] - [zone...] -

-
- -
-

DESCRIPTION

-

- dnssec-keymgr is a high level Python wrapper - to facilitate the key rollover process for zones handled by - BIND. It uses the BIND commands for manipulating DNSSEC key - metadata: dnssec-keygen and - dnssec-settime. -

-

- DNSSEC policy can be read from a configuration file (default - /etc/dnssec-policy.conf), from which the - key parameters, publication and rollover schedule, and desired - coverage duration for any given zone can be determined. This - file may be used to define individual DNSSEC policies on a - per-zone basis, or to set a "default" policy - used for all zones. -

-

- When dnssec-keymgr runs, it examines the DNSSEC - keys for one or more zones, comparing their timing metadata against - the policies for those zones. If key settings do not conform to the - DNSSEC policy (for example, because the policy has been changed), - they are automatically corrected. -

-

- A zone policy can specify a duration for which we want to - ensure the key correctness (coverage). It can - also specify a rollover period (roll-period). - If policy indicates that a key should roll over before the - coverage period ends, then a successor key will automatically be - created and added to the end of the key series. -

-

- If zones are specified on the command line, - dnssec-keymgr will examine only those zones. - If a specified zone does not already have keys in place, then - keys will be generated for it according to policy. -

-

- If zones are not specified on the command - line, then dnssec-keymgr will search the - key directory (either the current working directory or the directory - set by the -K option), and check the keys for - all the zones represented in the directory. -

-

- Key times that are in the past will not be updated unless - the -f is used (see below). Key inactivation - and deletion times that are less than five minutes in the future - will be delayed by five minutes. -

-

- It is expected that this tool will be run automatically and - unattended (for example, by cron). -

-
- -
-

OPTIONS

-
-
-c file
-
-

- If -c is specified, then the DNSSEC - policy is read from file. (If not - specified, then the policy is read from - /etc/dnssec-policy.conf; if that file - doesn't exist, a built-in global default policy is used.) -

-
-
-f
-
-

- Force: allow updating of key events even if they are - already in the past. This is not recommended for use with - zones in which keys have already been published. However, - if a set of keys has been generated all of which have - publication and activation dates in the past, but the - keys have not been published in a zone as yet, then this - option can be used to clean them up and turn them into a - proper series of keys with appropriate rollover intervals. -

-
-
-g keygen-path
-
-

- Specifies a path to a dnssec-keygen binary. - Used for testing. - See also the -s option. -

-
-
-h
-
-

- Print the dnssec-keymgr help summary - and exit. -

-
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-k
-
-

- Only apply policies to KSK keys. - See also the -z option. -

-
-
-q
-
-

- Quiet: suppress printing of dnssec-keygen - and dnssec-settime. -

-
-
-s settime-path
-
-

- Specifies a path to a dnssec-settime binary. - Used for testing. - See also the -g option. -

-
-
-v
-
-

- Print the dnssec-keymgr version and exit. -

-
-
-z
-
-

- Only apply policies to ZSK keys. - See also the -k option. -

-
-
-
- -
-

POLICY CONFIGURATION

-

- The dnssec-policy.conf file can specify three kinds - of policies: -

-
    -
  • -

    - Policy classes - (policy name { ... };) - can be inherited by zone policies or other policy classes; these - can be used to create sets of different security profiles. For - example, a policy class normal might specify - 1024-bit key sizes, but a class extra might - specify 2048 bits instead; extra would be - used for zones that had unusually high security needs. -

    -
  • -
  • -

    - Algorithm policies: - (algorithm-policy algorithm { ... }; ) - override default per-algorithm settings. For example, by default, - RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This - can be modified using algorithm-policy, and the - new key sizes would then be used for any key of type RSASHA256. -

    -
  • -
  • -

    - Zone policies: - (zone name { ... }; ) - set policy for a single zone by name. A zone policy can inherit - a policy class by including a policy option. - Zone names beginning with digits (i.e., 0-9) must be quoted. - If a zone does not have its own policy then the - "default" policy applies. -

    -
  • -
-

- Options that can be specified in policies: -

-
-
algorithm - name;
-
-

- The key algorithm. If no policy is defined, the default is - RSASHA256. -

-
-
coverage - duration;
-
-

- The length of time to ensure that keys will be correct; no action - will be taken to create new keys to be activated after this time. - This can be represented as a number of seconds, or as a duration - using human-readable units (examples: "1y" or "6 months"). - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. - If no policy is configured, the default is six months. -

-
-
directory - path;
-
-

- Specifies the directory in which keys should be stored. -

-
-
key-size keytype - size;
-
-

- Specifies the number of bits to use in creating keys. - The keytype is either "zsk" or "ksk". - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is 2048 bits for RSA keys. -

-
-
keyttl - duration;
-
-

- The key TTL. If no policy is defined, the default is one hour. -

-
-
post-publish keytype - duration;
-
-

- How long after inactivation a key should be deleted from the zone. - Note: If roll-period is not set, this value is - ignored. The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm - policies as well as in policy classes or zone policies. The default - is one month. -

-
-
pre-publish keytype - duration;
-
-

- How long before activation a key should be published. Note: If - roll-period is not set, this value is ignored. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. The default is - one month. -

-
-
roll-period keytype - duration;
-
-

- How frequently keys should be rolled over. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is one year for ZSKs. KSKs do not - roll over by default. -

-
-
standby keytype - number;
-
-

- Not yet implemented. -

-
-
-
- -
-

REMAINING WORK

-
    -
  • -

    - Enable scheduling of KSK rollovers using the -P sync - and -D sync options to - dnssec-keygen and - dnssec-settime. Check the parent zone - (as in dnssec-checkds) to determine when it's - safe for the key to roll. -

    -
  • -
  • -

    - Allow configuration of standby keys and use of the REVOKE bit, - for keys that use RFC 5011 semantics. -

    -
  • -
-
- -
-

SEE ALSO

-

- - dnssec-coverage(8) - , - - dnssec-keygen(8) - , - - dnssec-settime(8) - , - - dnssec-checkds(8) - -

-
- -
- diff --git a/bin/python/dnssec-keymgr.py.in b/bin/python/dnssec-keymgr.py.in deleted file mode 100644 index c8453a78a6..0000000000 --- a/bin/python/dnssec-keymgr.py.in +++ /dev/null @@ -1,27 +0,0 @@ -#!@PYTHON@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import os -import sys - -sys.path.insert(0, os.path.dirname(sys.argv[0])) -if os.name != 'nt': - if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir - sys.path.insert(1, '@PYTHON_INSTALL_DIR@') - else: - sys.path.insert(1, os.path.join('@prefix@', 'lib', - 'python' + sys.version[:3], 'site-packages')) - -import isc.keymgr - -if __name__ == "__main__": - isc.keymgr.main() diff --git a/bin/python/isc/.gitignore b/bin/python/isc/.gitignore deleted file mode 100644 index 18f5372fc6..0000000000 --- a/bin/python/isc/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -__init__.py -checkds.py -coverage.py -dnskey.py -eventlist.py -keydict.py -keyevent.py -keymgr.py -keyseries.py -keyzone.py -parser.out -parsetab.py -policy.py -policy_test.py -rndc.py -tests/dnskey_test.py -utils.py diff --git a/bin/python/isc/Makefile.in b/bin/python/isc/Makefile.in deleted file mode 100644 index ec17b6bd45..0000000000 --- a/bin/python/isc/Makefile.in +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -SUBDIRS = tests - -PYTHON = @PYTHON@ - -PYSRCS = __init__.py checkds.py coverage.py dnskey.py eventlist.py \ - keydict.py keyevent.py keymgr.py keyseries.py keyzone.py \ - policy.py rndc.py utils.py - -TARGETS = parsetab.py - -@BIND9_MAKE_RULES@ - -.SUFFIXES: .py .pyc -.py.pyc: - $(PYTHON) -m compileall . - -parsetab.py: policy.py - $(PYTHON) policy.py parse /dev/null > /dev/null - PYTHONPATH=${srcdir} $(PYTHON) -m parsetab - -check test: subdirs - -clean distclean:: - rm -f *.pyc parser.out parsetab.py - rm -rf __pycache__ build - -distclean:: - rm -rf ${PYSRCS} diff --git a/bin/python/isc/__init__.py.in b/bin/python/isc/__init__.py.in deleted file mode 100644 index 916333c3f8..0000000000 --- a/bin/python/isc/__init__.py.in +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -__all__ = ['checkds', 'coverage', 'keymgr', 'dnskey', 'eventlist', - 'keydict', 'keyevent', 'keyseries', 'keyzone', 'policy', - 'parsetab', 'rndc', 'utils'] - -from isc.dnskey import * -from isc.eventlist import * -from isc.keydict import * -from isc.keyevent import * -from isc.keyseries import * -from isc.keyzone import * -from isc.policy import * -from isc.rndc import * -from isc.utils import * diff --git a/bin/python/isc/checkds.py.in b/bin/python/isc/checkds.py.in deleted file mode 100644 index 0d71629436..0000000000 --- a/bin/python/isc/checkds.py.in +++ /dev/null @@ -1,182 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import argparse -import os -import sys -from subprocess import Popen, PIPE - -from isc.utils import prefix,version - -prog = 'dnssec-checkds' - - -############################################################################ -# SECRR class: -# Class for DS resource record -############################################################################ -class SECRR: - hashalgs = {1: 'SHA-1', 2: 'SHA-256', 3: 'GOST', 4: 'SHA-384'} - rrname = '' - rrclass = 'IN' - keyid = None - keyalg = None - hashalg = None - digest = '' - ttl = 0 - - def __init__(self, rrtext): - if not rrtext: - raise Exception - - # 'str' does not have decode method in python3 - if type(rrtext) is not str: - fields = rrtext.decode('ascii').split() - else: - fields = rrtext.split() - if len(fields) < 7: - raise Exception - - self.rrtype = "DS" - self.rrname = fields[0].lower() - - fields = fields[1:] - if fields[0].upper() in ['IN', 'CH', 'HS']: - self.rrclass = fields[0].upper() - fields = fields[1:] - else: - self.ttl = int(fields[0]) - self.rrclass = fields[1].upper() - fields = fields[2:] - - if fields[0].upper() != self.rrtype: - raise Exception('%s does not match %s' % - (fields[0].upper(), self.rrtype)) - - self.keyid, self.keyalg, self.hashalg = map(int, fields[1:4]) - self.digest = ''.join(fields[4:]).upper() - - def __repr__(self): - return '%s %s %s %d %d %d %s' % \ - (self.rrname, self.rrclass, self.rrtype, - self.keyid, self.keyalg, self.hashalg, self.digest) - - def __eq__(self, other): - return self.__repr__() == other.__repr__() - - -############################################################################ -# check: -# Fetch DS RRset for the given zone from the DNS; fetch DNSKEY -# RRset from the masterfile if specified, or from DNS if not. -# Generate a set of expected DS records from the DNSKEY RRset, -# and report on congruency. -############################################################################ -def check(zone, args): - rrlist = [] - if args.dssetfile: - fp = open(args.dssetfile).read() - else: - cmd = [args.dig, "+noall", "+answer", "-t", "ds", "-q", zone] - fp, _ = Popen(cmd, stdout=PIPE).communicate() - - for line in fp.splitlines(): - if type(line) is not str: - line = line.decode('ascii') - rrlist.append(SECRR(line)) - rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg)) - - klist = [] - - cmd = [args.dsfromkey] - for algo in args.algo: - cmd += ['-a', algo] - - if args.masterfile: - cmd += ["-f", args.masterfile, zone] - fp, _ = Popen(cmd, stdout=PIPE).communicate() - else: - intods, _ = Popen([args.dig, "+noall", "+answer", "-t", "dnskey", - "-q", zone], stdout=PIPE).communicate() - cmd += ["-f", "-", zone] - fp, _ = Popen(cmd, stdin=PIPE, stdout=PIPE).communicate(intods) - - for line in fp.splitlines(): - if type(line) is not str: - line = line.decode('ascii') - klist.append(SECRR(line)) - - if len(klist) < 1: - print("No DNSKEY records found in zone apex") - return False - - match = True - for rr in rrlist: - if rr not in klist: - print("KSK for %s %s/%03d/%05d (%s) missing from child" % - (rr.rrtype, rr.rrname.strip('.'), rr.keyalg, - rr.keyid, SECRR.hashalgs[rr.hashalg])) - match = False - for rr in klist: - if rr not in rrlist: - print("%s for KSK %s/%03d/%05d (%s) missing from parent" % - (rr.rrtype, rr.rrname.strip('.'), rr.keyalg, - rr.keyid, SECRR.hashalgs[rr.hashalg])) - match = False - for rr in klist: - if rr in rrlist: - print("%s for KSK %s/%03d/%05d (%s) found in parent" % - (rr.rrtype, rr.rrname.strip('.'), rr.keyalg, - rr.keyid, SECRR.hashalgs[rr.hashalg])) - - return match - - -############################################################################ -# parse_args: -# Read command line arguments, set global 'args' structure -############################################################################ -def parse_args(): - parser = argparse.ArgumentParser(description=prog + ': checks DS coverage') - - bindir = 'bin' - sbindir = 'bin' if os.name == 'nt' else 'sbin' - - parser.add_argument('zone', type=str, help='zone to check') - parser.add_argument('-a', '--algo', dest='algo', action='append', - default=[], type=str, help='DS digest algorithm') - parser.add_argument('-d', '--dig', dest='dig', - default=os.path.join(prefix(bindir), 'dig'), - type=str, help='path to \'dig\'') - parser.add_argument('-D', '--dsfromkey', dest='dsfromkey', - default=os.path.join(prefix(sbindir), - 'dnssec-dsfromkey'), - type=str, help='path to \'dnssec-dsfromkey\'') - parser.add_argument('-f', '--file', dest='masterfile', type=str, - help='zone master file') - parser.add_argument('-s', '--dsset', dest='dssetfile', type=str, - help='prepared DSset file') - parser.add_argument('-v', '--version', action='version', - version=version) - args = parser.parse_args() - - args.zone = args.zone.strip('.') - - return args - - -############################################################################ -# Main -############################################################################ -def main(): - args = parse_args() - match = check(args.zone, args) - exit(0 if match else 1) diff --git a/bin/python/isc/coverage.py.in b/bin/python/isc/coverage.py.in deleted file mode 100644 index fe591431e8..0000000000 --- a/bin/python/isc/coverage.py.in +++ /dev/null @@ -1,290 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -from __future__ import print_function -import os -import sys -import argparse -import glob -import re -import time -import calendar -import pprint -from collections import defaultdict - -prog = 'dnssec-coverage' - -from isc import dnskey, eventlist, keydict, keyevent, keyzone, utils - -############################################################################ -# print a fatal error and exit -############################################################################ -def fatal(*args, **kwargs): - print(*args, **kwargs) - sys.exit(1) - - -############################################################################ -# output: -############################################################################ -_firstline = True -def output(*args, **kwargs): - """output text, adding a vertical space this is *not* the first - first section being printed since a call to vreset()""" - global _firstline - if 'skip' in kwargs: - skip = kwargs['skip'] - kwargs.pop('skip', None) - else: - skip = True - if _firstline: - _firstline = False - elif skip: - print('') - if args: - print(*args, **kwargs) - - -def vreset(): - """reset vertical spacing""" - global _firstline - _firstline = True - - -############################################################################ -# parse_time -############################################################################ -def parse_time(s): - """ convert a formatted time (e.g., 1y, 6mo, 15mi, etc) into seconds - :param s: String with some text representing a time interval - :return: Integer with the number of seconds in the time interval - """ - s = s.strip() - - # if s is an integer, we're done already - try: - return int(s) - except ValueError: - pass - - # try to parse as a number with a suffix indicating unit of time - r = re.compile(r'([0-9][0-9]*)\s*([A-Za-z]*)') - m = r.match(s) - if not m: - raise ValueError("Cannot parse %s" % s) - n, unit = m.groups() - n = int(n) - unit = unit.lower() - if unit.startswith('y'): - return n * 31536000 - elif unit.startswith('mo'): - return n * 2592000 - elif unit.startswith('w'): - return n * 604800 - elif unit.startswith('d'): - return n * 86400 - elif unit.startswith('h'): - return n * 3600 - elif unit.startswith('mi'): - return n * 60 - elif unit.startswith('s'): - return n - else: - raise ValueError("Invalid suffix %s" % unit) - - -############################################################################ -# set_path: -############################################################################ -def set_path(command, default=None): - """ find the location of a specified command. if a default is supplied - and it works, we use it; otherwise we search PATH for a match. - :param command: string with a command to look for in the path - :param default: default location to use - :return: detected location for the desired command - """ - - fpath = default - if not fpath or not os.path.isfile(fpath) or not os.access(fpath, os.X_OK): - path = os.environ["PATH"] - if not path: - path = os.path.defpath - for directory in path.split(os.pathsep): - fpath = os.path.join(directory, command) - if os.path.isfile(fpath) and os.access(fpath, os.X_OK): - break - fpath = None - - return fpath - - -############################################################################ -# parse_args: -############################################################################ -def parse_args(): - """Read command line arguments, set global 'args' structure""" - compilezone = set_path('named-compilezone', - os.path.join(utils.prefix('sbin'), - 'named-compilezone')) - - parser = argparse.ArgumentParser(description=prog + ': checks future ' + - 'DNSKEY coverage for a zone') - - parser.add_argument('zone', type=str, nargs='*', default=None, - help='zone(s) to check' + - '(default: all zones in the directory)') - parser.add_argument('-K', dest='path', default='.', type=str, - help='a directory containing keys to process', - metavar='dir') - parser.add_argument('-f', dest='filename', type=str, - help='zone master file', metavar='file') - parser.add_argument('-m', dest='maxttl', type=str, - help='the longest TTL in the zone(s)', - metavar='time') - parser.add_argument('-d', dest='keyttl', type=str, - help='the DNSKEY TTL', metavar='time') - parser.add_argument('-r', dest='resign', default='1944000', - type=str, help='the RRSIG refresh interval ' - 'in seconds [default: 22.5 days]', - metavar='time') - parser.add_argument('-c', dest='compilezone', - default=compilezone, type=str, - help='path to \'named-compilezone\'', - metavar='path') - parser.add_argument('-l', dest='checklimit', - type=str, default='0', - help='Length of time to check for ' - 'DNSSEC coverage [default: 0 (unlimited)]', - metavar='time') - parser.add_argument('-z', dest='no_ksk', - action='store_true', default=False, - help='Only check zone-signing keys (ZSKs)') - parser.add_argument('-k', dest='no_zsk', - action='store_true', default=False, - help='Only check key-signing keys (KSKs)') - parser.add_argument('-D', '--debug', dest='debug_mode', - action='store_true', default=False, - help='Turn on debugging output') - parser.add_argument('-v', '--version', action='version', - version=utils.version) - - args = parser.parse_args() - - if args.no_zsk and args.no_ksk: - fatal("ERROR: -z and -k cannot be used together.") - elif args.no_zsk or args.no_ksk: - args.keytype = "KSK" if args.no_zsk else "ZSK" - else: - args.keytype = None - - if args.filename and len(args.zone) > 1: - fatal("ERROR: -f can only be used with one zone.") - - # strip trailing dots if any - args.zone = [x[:-1] if (len(x) > 1 and x[-1] == '.') else x - for x in args.zone] - - # convert from time arguments to seconds - try: - if args.maxttl: - m = parse_time(args.maxttl) - args.maxttl = m - except ValueError: - pass - - try: - if args.keyttl: - k = parse_time(args.keyttl) - args.keyttl = k - except ValueError: - pass - - try: - if args.resign: - r = parse_time(args.resign) - args.resign = r - except ValueError: - pass - - try: - if args.checklimit: - lim = args.checklimit - r = parse_time(args.checklimit) - if r == 0: - args.checklimit = None - else: - args.checklimit = time.time() + r - except ValueError: - pass - - # if we've got the values we need from the command line, stop now - if args.maxttl and args.keyttl: - return args - - # load keyttl and maxttl data from zonefile - if args.zone and args.filename: - try: - zone = keyzone(args.zone[0], args.filename, args.compilezone) - args.maxttl = args.maxttl or zone.maxttl - args.keyttl = args.maxttl or zone.keyttl - except Exception as e: - print("Unable to load zone data from %s: " % args.filename, e) - - if not args.maxttl: - output("WARNING: Maximum TTL value was not specified. Using 1 week\n" - "\t (604800 seconds); re-run with the -m option to get more\n" - "\t accurate results.") - args.maxttl = 604800 - - return args - -############################################################################ -# Main -############################################################################ -def main(): - args = parse_args() - - print("PHASE 1--Loading keys to check for internal timing problems") - - try: - kd = keydict(path=args.path, zones=args.zone, keyttl=args.keyttl) - except Exception as e: - fatal('ERROR: Unable to build key dictionary: ' + str(e)) - - for key in kd: - key.check_prepub(output) - if key.sep: - key.check_postpub(output) - else: - key.check_postpub(output, args.maxttl + args.resign) - - output("PHASE 2--Scanning future key events for coverage failures") - vreset() - - try: - elist = eventlist(kd) - except Exception as e: - fatal('ERROR: Unable to build event list: ' + str(e)) - - errors = False - if not args.zone: - if not elist.coverage(None, args.keytype, args.checklimit, output): - errors = True - else: - for zone in args.zone: - try: - if not elist.coverage(zone, args.keytype, - args.checklimit, output): - errors = True - except: - output('ERROR: Coverage check failed for zone ' + zone) - - sys.exit(1 if errors else 0) diff --git a/bin/python/isc/dnskey.py.in b/bin/python/isc/dnskey.py.in deleted file mode 100644 index 83017c457f..0000000000 --- a/bin/python/isc/dnskey.py.in +++ /dev/null @@ -1,511 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import os -import time -import calendar -from subprocess import Popen, PIPE - -######################################################################## -# Class dnskey -######################################################################## -class TimePast(Exception): - def __init__(self, key, prop, value): - super(TimePast, self).__init__('%s time for key %s (%d) is already past' - % (prop, key, value)) - -class dnskey: - """An individual DNSSEC key. Identified by path, name, algorithm, keyid. - Contains a dictionary of metadata events.""" - - _PROPS = ('Created', 'Publish', 'Activate', 'Inactive', 'Delete', - 'Revoke', 'DSPublish', 'SyncPublish', 'SyncDelete') - _OPTS = (None, '-P', '-A', '-I', '-D', '-R', None, '-Psync', '-Dsync') - - _ALGNAMES = (None, 'RSAMD5', 'DH', 'DSA', None, 'RSASHA1', - 'NSEC3DSA', 'NSEC3RSASHA1', 'RSASHA256', None, - 'RSASHA512', None, 'ECCGOST', 'ECDSAP256SHA256', - 'ECDSAP384SHA384', 'ED25519', 'ED448') - - def __init__(self, key, directory=None, keyttl=None): - # this makes it possible to use algname as a class or instance method - if isinstance(key, tuple) and len(key) == 3: - self._dir = directory or '.' - (name, alg, keyid) = key - self.fromtuple(name, alg, keyid, keyttl) - - self._dir = directory or os.path.dirname(key) or '.' - key = os.path.basename(key) - (name, alg, keyid) = key.split('+') - name = name[1:-1] - alg = int(alg) - keyid = int(keyid.split('.')[0]) - self.fromtuple(name, alg, keyid, keyttl) - - def fromtuple(self, name, alg, keyid, keyttl): - if name.endswith('.'): - fullname = name - name = name.rstrip('.') - else: - fullname = name + '.' - - keystr = "K%s+%03d+%05d" % (fullname, alg, keyid) - key_file = self._dir + (self._dir and os.sep or '') + keystr + ".key" - private_file = (self._dir + (self._dir and os.sep or '') + - keystr + ".private") - - self.keystr = keystr - - self.name = name - self.alg = int(alg) - self.keyid = int(keyid) - self.fullname = fullname - - kfp = open(key_file, "r") - for line in kfp: - if line[0] == ';': - continue - tokens = line.split() - if not tokens: - continue - - if tokens[1].lower() in ('in', 'ch', 'hs'): - septoken = 3 - self.ttl = keyttl - else: - septoken = 4 - self.ttl = int(tokens[1]) if not keyttl else keyttl - - if (int(tokens[septoken]) & 0x1) == 1: - self.sep = True - else: - self.sep = False - kfp.close() - - pfp = open(private_file, "rU") - - self.metadata = dict() - self._changed = dict() - self._delete = dict() - self._times = dict() - self._fmttime = dict() - self._timestamps = dict() - self._original = dict() - self._origttl = None - - for line in pfp: - line = line.strip() - if not line or line[0] in ('!#'): - continue - punctuation = [line.find(c) for c in ':= '] + [len(line)] - found = min([pos for pos in punctuation if pos != -1]) - name = line[:found].rstrip() - value = line[found:].lstrip(":= ").rstrip() - self.metadata[name] = value - - for prop in dnskey._PROPS: - self._changed[prop] = False - if prop in self.metadata: - t = self.parsetime(self.metadata[prop]) - self._times[prop] = t - self._fmttime[prop] = self.formattime(t) - self._timestamps[prop] = self.epochfromtime(t) - self._original[prop] = self._timestamps[prop] - else: - self._times[prop] = None - self._fmttime[prop] = None - self._timestamps[prop] = None - self._original[prop] = None - - pfp.close() - - def commit(self, settime_bin, **kwargs): - quiet = kwargs.get('quiet', False) - cmd = [] - first = True - - if self._origttl is not None: - cmd += ["-L", str(self.ttl)] - - for prop, opt in zip(dnskey._PROPS, dnskey._OPTS): - if not opt or not self._changed[prop]: - continue - - delete = False - if prop in self._delete and self._delete[prop]: - delete = True - - when = 'none' if delete else self._fmttime[prop] - cmd += [opt, when] - first = False - - if cmd: - fullcmd = [settime_bin, "-K", self._dir] + cmd + [self.keystr,] - if not quiet: - print('# ' + ' '.join(fullcmd)) - try: - p = Popen(fullcmd, stdout=PIPE, stderr=PIPE) - stdout, stderr = p.communicate() - if stderr: - raise Exception(str(stderr)) - except Exception as e: - raise Exception('unable to run %s: %s' % - (settime_bin, str(e))) - self._origttl = None - for prop in dnskey._PROPS: - self._original[prop] = self._timestamps[prop] - self._changed[prop] = False - - @classmethod - def generate(cls, keygen_bin, randomdev, keys_dir, name, alg, keysize, sep, - ttl, publish=None, activate=None, **kwargs): - quiet = kwargs.get('quiet', False) - - keygen_cmd = [keygen_bin, "-q", "-K", keys_dir, "-L", str(ttl)] - - if randomdev: - keygen_cmd += ["-r", randomdev] - - if sep: - keygen_cmd.append("-fk") - - if alg: - keygen_cmd += ["-a", alg] - - if keysize: - keygen_cmd += ["-b", str(keysize)] - - if publish: - t = dnskey.timefromepoch(publish) - keygen_cmd += ["-P", dnskey.formattime(t)] - - if activate: - t = dnskey.timefromepoch(activate) - keygen_cmd += ["-A", dnskey.formattime(activate)] - - keygen_cmd.append(name) - - if not quiet: - print('# ' + ' '.join(keygen_cmd)) - - p = Popen(keygen_cmd, stdout=PIPE, stderr=PIPE) - stdout, stderr = p.communicate() - if stderr: - raise Exception('unable to generate key: ' + str(stderr)) - - try: - keystr = stdout.splitlines()[0].decode('ascii') - newkey = dnskey(keystr, keys_dir, ttl) - return newkey - except Exception as e: - raise Exception('unable to parse generated key: %s' % str(e)) - - def generate_successor(self, keygen_bin, randomdev, prepublish, **kwargs): - quiet = kwargs.get('quiet', False) - - if not self.inactive(): - raise Exception("predecessor key %s has no inactive date" % self) - - keygen_cmd = [keygen_bin, "-q", "-K", self._dir, "-S", self.keystr] - - if self.ttl: - keygen_cmd += ["-L", str(self.ttl)] - - if randomdev: - keygen_cmd += ["-r", randomdev] - - if prepublish: - keygen_cmd += ["-i", str(prepublish)] - - if not quiet: - print('# ' + ' '.join(keygen_cmd)) - - p = Popen(keygen_cmd, stdout=PIPE, stderr=PIPE) - stdout, stderr = p.communicate() - if stderr: - raise Exception('unable to generate key: ' + stderr) - - try: - keystr = stdout.splitlines()[0].decode('ascii') - newkey = dnskey(keystr, self._dir, self.ttl) - return newkey - except: - raise Exception('unable to generate successor for key %s' % self) - - @staticmethod - def algstr(alg): - name = None - if alg in range(len(dnskey._ALGNAMES)): - name = dnskey._ALGNAMES[alg] - return name if name else ("%03d" % alg) - - @staticmethod - def algnum(alg): - if not alg: - return None - alg = alg.upper() - try: - return dnskey._ALGNAMES.index(alg) - except ValueError: - return None - - def algname(self, alg=None): - return self.algstr(alg or self.alg) - - @staticmethod - def timefromepoch(secs): - return time.gmtime(secs) - - @staticmethod - def parsetime(string): - return time.strptime(string, "%Y%m%d%H%M%S") - - @staticmethod - def epochfromtime(t): - return calendar.timegm(t) - - @staticmethod - def formattime(t): - return time.strftime("%Y%m%d%H%M%S", t) - - def setmeta(self, prop, secs, now, **kwargs): - force = kwargs.get('force', False) - - if self._timestamps[prop] == secs: - return - - if self._original[prop] is not None and \ - self._original[prop] < now and not force: - raise TimePast(self, prop, self._original[prop]) - - if secs is None: - self._changed[prop] = False \ - if self._original[prop] is None else True - - self._delete[prop] = True - self._timestamps[prop] = None - self._times[prop] = None - self._fmttime[prop] = None - return - - t = self.timefromepoch(secs) - self._timestamps[prop] = secs - self._times[prop] = t - self._fmttime[prop] = self.formattime(t) - self._changed[prop] = False if \ - self._original[prop] == self._timestamps[prop] else True - - def gettime(self, prop): - return self._times[prop] - - def getfmttime(self, prop): - return self._fmttime[prop] - - def gettimestamp(self, prop): - return self._timestamps[prop] - - def created(self): - return self._timestamps["Created"] - - def syncpublish(self): - return self._timestamps["SyncPublish"] - - def setsyncpublish(self, secs, now=time.time(), **kwargs): - self.setmeta("SyncPublish", secs, now, **kwargs) - - def publish(self): - return self._timestamps["Publish"] - - def setpublish(self, secs, now=time.time(), **kwargs): - self.setmeta("Publish", secs, now, **kwargs) - - def activate(self): - return self._timestamps["Activate"] - - def setactivate(self, secs, now=time.time(), **kwargs): - self.setmeta("Activate", secs, now, **kwargs) - - def revoke(self): - return self._timestamps["Revoke"] - - def setrevoke(self, secs, now=time.time(), **kwargs): - self.setmeta("Revoke", secs, now, **kwargs) - - def inactive(self): - return self._timestamps["Inactive"] - - def setinactive(self, secs, now=time.time(), **kwargs): - self.setmeta("Inactive", secs, now, **kwargs) - - def delete(self): - return self._timestamps["Delete"] - - def setdelete(self, secs, now=time.time(), **kwargs): - self.setmeta("Delete", secs, now, **kwargs) - - def syncdelete(self): - return self._timestamps["SyncDelete"] - - def setsyncdelete(self, secs, now=time.time(), **kwargs): - self.setmeta("SyncDelete", secs, now, **kwargs) - - def setttl(self, ttl): - if ttl is None or self.ttl == ttl: - return - elif self._origttl is None: - self._origttl = self.ttl - self.ttl = ttl - elif self._origttl == ttl: - self._origttl = None - self.ttl = ttl - else: - self.ttl = ttl - - def keytype(self): - return ("KSK" if self.sep else "ZSK") - - def __str__(self): - return ("%s/%s/%05d" - % (self.name, self.algname(), self.keyid)) - - def __repr__(self): - return ("%s/%s/%05d (%s)" - % (self.name, self.algname(), self.keyid, - ("KSK" if self.sep else "ZSK"))) - - def date(self): - return (self.activate() or self.publish() or self.created()) - - # keys are sorted first by zone name, then by algorithm. within - # the same name/algorithm, they are sorted according to their - # 'date' value: the activation date if set, OR the publication - # if set, OR the creation date. - def __lt__(self, other): - if self.name != other.name: - return self.name < other.name - if self.alg != other.alg: - return self.alg < other.alg - return self.date() < other.date() - - def check_prepub(self, output=None): - def noop(*args, **kwargs): pass - if not output: - output = noop - - now = int(time.time()) - a = self.activate() - p = self.publish() - - if not a: - return False - - if not p: - if a > now: - output("WARNING: Key %s is scheduled for\n" - "\t activation but not for publication." - % repr(self)) - return False - - if p <= now and a <= now: - return True - - if p == a: - output("WARNING: %s is scheduled to be\n" - "\t published and activated at the same time. This\n" - "\t could result in a coverage gap if the zone was\n" - "\t previously signed. Activation should be at least\n" - "\t %s after publication." - % (repr(self), - dnskey.duration(self.ttl) or 'one DNSKEY TTL')) - return True - - if a < p: - output("WARNING: Key %s is active before it is published" - % repr(self)) - return False - - if self.ttl is not None and a - p < self.ttl: - output("WARNING: Key %s is activated too soon\n" - "\t after publication; this could result in coverage \n" - "\t gaps due to resolver caches containing old data.\n" - "\t Activation should be at least %s after\n" - "\t publication." - % (repr(self), - dnskey.duration(self.ttl) or 'one DNSKEY TTL')) - return False - - return True - - def check_postpub(self, output = None, timespan = None): - def noop(*args, **kwargs): pass - if output is None: - output = noop - - if timespan is None: - timespan = self.ttl - - if timespan is None: - output("WARNING: Key %s using default TTL." % repr(self)) - timespan = (60*60*24) - - now = time.time() - d = self.delete() - i = self.inactive() - - if not d: - return False - - if not i: - if d > now: - output("WARNING: Key %s is scheduled for\n" - "\t deletion but not for inactivation." % repr(self)) - return False - - if d < now and i < now: - return True - - if d < i: - output("WARNING: Key %s is scheduled for\n" - "\t deletion before inactivation." - % repr(self)) - return False - - if d - i < timespan: - output("WARNING: Key %s scheduled for\n" - "\t deletion too soon after deactivation; this may \n" - "\t result in coverage gaps due to resolver caches\n" - "\t containing old data. Deletion should be at least\n" - "\t %s after inactivation." - % (repr(self), dnskey.duration(timespan))) - return False - - return True - - @staticmethod - def duration(secs): - if not secs: - return None - - units = [("year", 60*60*24*365), - ("month", 60*60*24*30), - ("day", 60*60*24), - ("hour", 60*60), - ("minute", 60), - ("second", 1)] - - output = [] - for unit in units: - v, secs = secs // unit[1], secs % unit[1] - if v > 0: - output.append("%d %s%s" % (v, unit[0], "s" if v > 1 else "")) - - return ", ".join(output) - diff --git a/bin/python/isc/eventlist.py.in b/bin/python/isc/eventlist.py.in deleted file mode 100644 index cb72c6e0b8..0000000000 --- a/bin/python/isc/eventlist.py.in +++ /dev/null @@ -1,166 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -from collections import defaultdict -from .dnskey import * -from .keydict import * -from .keyevent import * - - -class eventlist: - _K = defaultdict(lambda: defaultdict(list)) - _Z = defaultdict(lambda: defaultdict(list)) - _zones = set() - _kdict = None - - def __init__(self, kdict): - properties = ["SyncPublish", "Publish", "SyncDelete", - "Activate", "Inactive", "Delete"] - self._kdict = kdict - for zone in kdict.zones(): - self._zones.add(zone) - for alg, keys in kdict[zone].items(): - for k in keys.values(): - for prop in properties: - t = k.gettime(prop) - if not t: - continue - e = keyevent(prop, k, t) - if k.sep: - self._K[zone][alg].append(e) - else: - self._Z[zone][alg].append(e) - - self._K[zone][alg] = sorted(self._K[zone][alg], - key=lambda event: event.when) - self._Z[zone][alg] = sorted(self._Z[zone][alg], - key=lambda event: event.when) - - # scan events per zone, algorithm, and key type, in order of - # occurrence, noting inconsistent states when found - def coverage(self, zone, keytype, until, output = None): - def noop(*args, **kwargs): pass - if not output: - output = noop - - no_zsk = True if (keytype and keytype == "KSK") else False - no_ksk = True if (keytype and keytype == "ZSK") else False - kok = zok = True - found = False - - if zone and not zone in self._zones: - output("ERROR: No key events found for %s" % zone) - return False - - if zone: - found = True - if not no_ksk: - kok = self.checkzone(zone, "KSK", until, output) - if not no_zsk: - zok = self.checkzone(zone, "ZSK", until, output) - else: - for z in self._zones: - if not no_ksk and z in self._K.keys(): - found = True - kok = self.checkzone(z, "KSK", until, output) - if not no_zsk and z in self._Z.keys(): - found = True - zok = self.checkzone(z, "ZSK", until, output) - - if not found: - output("ERROR: No key events found") - return False - - return (kok and zok) - - def checkzone(self, zone, keytype, until, output): - allok = True - if keytype == "KSK": - kz = self._K[zone] - else: - kz = self._Z[zone] - - for alg in kz.keys(): - output("Checking scheduled %s events for zone %s, " - "algorithm %s..." % - (keytype, zone, dnskey.algstr(alg))) - ok = eventlist.checkset(kz[alg], keytype, until, output) - if ok: - output("No errors found") - allok = allok and ok - - return allok - - @staticmethod - def showset(eventset, output): - if not eventset: - return - output(" " + eventset[0].showtime() + ":", skip=False) - for event in eventset: - output(" %s: %s" % (event.what, repr(event.key)), skip=False) - - @staticmethod - def checkset(eventset, keytype, until, output): - groups = list() - group = list() - - # collect up all events that have the same time - eventsfound = False - for event in eventset: - # we found an event - eventsfound = True - - # add event to current group - if (not group or group[0].when == event.when): - group.append(event) - - # if we're at the end of the list, we're done. if - # we've found an event with a later time, start a new group - if (group[0].when != event.when): - groups.append(group) - group = list() - group.append(event) - - if group: - groups.append(group) - - if not eventsfound: - output("ERROR: No %s events found" % keytype) - return False - - active = published = None - for group in groups: - if (until and calendar.timegm(group[0].when) > until): - output("Ignoring events after %s" % - time.strftime("%a %b %d %H:%M:%S UTC %Y", - time.gmtime(until))) - return True - - for event in group: - (active, published) = event.status(active, published) - - eventlist.showset(group, output) - - # and then check for inconsistencies: - if not active: - output("ERROR: No %s's are active after this event" % keytype) - return False - elif not published: - output("ERROR: No %s's are published after this event" - % keytype) - return False - elif not published.intersection(active): - output("ERROR: No %s's are both active and published " - "after this event" % keytype) - return False - - return True - diff --git a/bin/python/isc/keydict.py.in b/bin/python/isc/keydict.py.in deleted file mode 100644 index e4dcb08fc2..0000000000 --- a/bin/python/isc/keydict.py.in +++ /dev/null @@ -1,87 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -from collections import defaultdict -from . import dnskey -import os -import glob - - -######################################################################## -# Class keydict -######################################################################## -class keydict: - """ A dictionary of keys, indexed by name, algorithm, and key id """ - - _keydict = defaultdict(lambda: defaultdict(dict)) - _defttl = None - _missing = [] - - def __init__(self, dp=None, **kwargs): - self._defttl = kwargs.get('keyttl', None) - zones = kwargs.get('zones', None) - - if not zones: - path = kwargs.get('path',None) or '.' - self.readall(path) - else: - for zone in zones: - if 'path' in kwargs and kwargs['path'] is not None: - path = kwargs['path'] - else: - path = dp and dp.policy(zone).directory or '.' - if not self.readone(path, zone): - self._missing.append(zone) - - def readall(self, path): - files = glob.glob(os.path.join(path, '*.private')) - - for infile in files: - key = dnskey(infile, path, self._defttl) - self._keydict[key.name][key.alg][key.keyid] = key - - def readone(self, path, zone): - if not zone.endswith('.'): - zone += '.' - match='K' + zone + '+*.private' - files = glob.glob(os.path.join(path, match)) - - found = False - for infile in files: - key = dnskey(infile, path, self._defttl) - if key.fullname != zone: # shouldn't ever happen - continue - keyname=key.name if zone != '.' else '.' - self._keydict[keyname][key.alg][key.keyid] = key - found = True - - return found - - def __iter__(self): - for zone, algorithms in self._keydict.items(): - for alg, keys in algorithms.items(): - for key in keys.values(): - yield key - - def __getitem__(self, name): - return self._keydict[name] - - def zones(self): - return (self._keydict.keys()) - - def algorithms(self, zone): - return (self._keydict[zone].keys()) - - def keys(self, zone, alg): - return (self._keydict[zone][alg].keys()) - - def missing(self): - return (self._missing) diff --git a/bin/python/isc/keyevent.py.in b/bin/python/isc/keyevent.py.in deleted file mode 100644 index cfc935a643..0000000000 --- a/bin/python/isc/keyevent.py.in +++ /dev/null @@ -1,76 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import time - - -######################################################################## -# Class keyevent -######################################################################## -class keyevent: - """ A discrete key event, e.g., Publish, Activate, Inactive, Delete, - etc. Stores the date of the event, and identifying information - about the key to which the event will occur.""" - - def __init__(self, what, key, when=None): - self.what = what - self.when = when or key.gettime(what) - self.key = key - self.sep = key.sep - self.zone = key.name - self.alg = key.alg - self.keyid = key.keyid - - def __repr__(self): - return repr((self.when, self.what, self.keyid, self.sep, - self.zone, self.alg)) - - def showtime(self): - return time.strftime("%a %b %d %H:%M:%S UTC %Y", self.when) - - # update sets of active and published keys, based on - # the contents of this keyevent - def status(self, active, published, output = None): - def noop(*args, **kwargs): pass - if not output: - output = noop - - if not active: - active = set() - if not published: - published = set() - - if self.what == "Activate": - active.add(self.keyid) - elif self.what == "Publish": - published.add(self.keyid) - elif self.what == "Inactive": - if self.keyid not in active: - output("\tWARNING: %s scheduled to become inactive " - "before it is active" - % repr(self.key)) - else: - active.remove(self.keyid) - elif self.what == "Delete": - if self.keyid in published: - published.remove(self.keyid) - else: - output("WARNING: key %s is scheduled for deletion " - "before it is published" % repr(self.key)) - elif self.what == "Revoke": - # We don't need to worry about the logic of this one; - # just stop counting this key as either active or published - if self.keyid in published: - published.remove(self.keyid) - if self.keyid in active: - active.remove(self.keyid) - - return active, published diff --git a/bin/python/isc/keymgr.py.in b/bin/python/isc/keymgr.py.in deleted file mode 100644 index 2b78f05bea..0000000000 --- a/bin/python/isc/keymgr.py.in +++ /dev/null @@ -1,157 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -from __future__ import print_function -import os, sys, argparse, glob, re, time, calendar, pprint -from collections import defaultdict - -prog='dnssec-keymgr' - -from isc import dnskey, keydict, keyseries, policy, parsetab, utils - -############################################################################ -# print a fatal error and exit -############################################################################ -def fatal(*args, **kwargs): - print(*args, **kwargs) - sys.exit(1) - -############################################################################ -# find the location of an external command -############################################################################ -def set_path(command, default=None): - """ find the location of a specified command. If a default is supplied, - exists and it's an executable, we use it; otherwise we search PATH - for an alternative. - :param command: command to look for - :param default: default value to use - :return: PATH with the location of a suitable binary - """ - fpath = default - if not fpath or not os.path.isfile(fpath) or not os.access(fpath, os.X_OK): - path = os.environ["PATH"] - if not path: - path = os.path.defpath - for directory in path.split(os.pathsep): - fpath = directory + os.sep + command - if os.path.isfile(fpath) and os.access(fpath, os.X_OK): - break - fpath = None - - return fpath - -############################################################################ -# parse arguments -############################################################################ -def parse_args(): - """ Read command line arguments, returns 'args' object - :return: args object properly prepared - """ - - keygen = set_path('dnssec-keygen', - os.path.join(utils.prefix('sbin'), 'dnssec-keygen')) - settime = set_path('dnssec-settime', - os.path.join(utils.prefix('sbin'), 'dnssec-settime')) - - parser = argparse.ArgumentParser(description=prog + ': schedule ' - 'DNSSEC key rollovers according to a ' - 'pre-defined policy') - - parser.add_argument('zone', type=str, nargs='*', default=None, - help='Zone(s) to which the policy should be applied ' + - '(default: all zones in the directory)') - parser.add_argument('-K', dest='path', type=str, - help='Directory containing keys', metavar='dir') - parser.add_argument('-c', dest='policyfile', type=str, - help='Policy definition file', metavar='file') - parser.add_argument('-g', dest='keygen', default=keygen, type=str, - help='Path to \'dnssec-keygen\'', - metavar='path') - parser.add_argument('-r', dest='randomdev', type=str, default=None, - help='DEPRECATED', - metavar='path') - parser.add_argument('-s', dest='settime', default=settime, type=str, - help='Path to \'dnssec-settime\'', - metavar='path') - parser.add_argument('-k', dest='no_zsk', - action='store_true', default=False, - help='Only apply policy to key-signing keys (KSKs)') - parser.add_argument('-z', dest='no_ksk', - action='store_true', default=False, - help='Only apply policy to zone-signing keys (ZSKs)') - parser.add_argument('-f', '--force', dest='force', action='store_true', - default=False, help='Force updates to key events '+ - 'even if they are in the past') - parser.add_argument('-q', '--quiet', dest='quiet', action='store_true', - default=False, help='Update keys silently') - parser.add_argument('-v', '--version', action='version', - version=utils.version) - - args = parser.parse_args() - - if args.randomdev: - fatal("ERROR: -r option has been deprecated.") - - if args.no_zsk and args.no_ksk: - fatal("ERROR: -z and -k cannot be used together.") - - if args.keygen is None: - fatal("ERROR: dnssec-keygen not found") - - if args.settime is None: - fatal("ERROR: dnssec-settime not found") - - # if a policy file was specified, check that it exists. - # if not, use the default file, unless it doesn't exist - if args.policyfile is not None: - if not os.path.exists(args.policyfile): - fatal('ERROR: Policy file "%s" not found' % args.policyfile) - else: - args.policyfile = os.path.join(utils.sysconfdir, - 'dnssec-policy.conf') - if not os.path.exists(args.policyfile): - args.policyfile = None - - return args - -############################################################################ -# main -############################################################################ -def main(): - args = parse_args() - - # As we may have specific locations for the binaries, we put that info - # into a context object that can be passed around - context = {'keygen_path': args.keygen, - 'settime_path': args.settime, - 'keys_path': args.path, - 'randomdev': args.randomdev} - - try: - dp = policy.dnssec_policy(args.policyfile) - except Exception as e: - fatal('Unable to load DNSSEC policy: ' + str(e)) - - try: - kd = keydict(dp, path=args.path, zones=args.zone) - except Exception as e: - fatal('Unable to build key dictionary: ' + str(e)) - - try: - ks = keyseries(kd, context=context) - except Exception as e: - fatal('Unable to build key series: ' + str(e)) - - try: - ks.enforce_policy(dp, ksk=args.no_zsk, zsk=args.no_ksk, - force=args.force, quiet=args.quiet) - except Exception as e: - fatal('Unable to apply policy: ' + str(e)) diff --git a/bin/python/isc/keyseries.py.in b/bin/python/isc/keyseries.py.in deleted file mode 100644 index 2f4906f809..0000000000 --- a/bin/python/isc/keyseries.py.in +++ /dev/null @@ -1,220 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -from collections import defaultdict -from .dnskey import * -from .keydict import * -from .keyevent import * -from .policy import * -import time - - -class keyseries: - _K = defaultdict(lambda: defaultdict(list)) - _Z = defaultdict(lambda: defaultdict(list)) - _zones = set() - _kdict = None - _context = None - - def __init__(self, kdict, now=time.time(), context=None): - self._kdict = kdict - self._context = context - self._zones = set(kdict.missing()) - - for zone in kdict.zones(): - self._zones.add(zone) - for alg, keys in kdict[zone].items(): - for k in keys.values(): - if k.sep: - if not (k.delete() and k.delete() < now): - self._K[zone][alg].append(k) - else: - if not (k.delete() and k.delete() < now): - self._Z[zone][alg].append(k) - - self._K[zone][alg].sort() - self._Z[zone][alg].sort() - - def __iter__(self): - for zone in self._zones: - for collection in [self._K, self._Z]: - if zone not in collection: - continue - for alg, keys in collection[zone].items(): - for key in keys: - yield key - - def dump(self): - for k in self: - print("%s" % repr(k)) - - def fixseries(self, keys, policy, now, **kwargs): - force = kwargs.get('force', False) - if not keys: - return - - # handle the first key - key = keys[0] - if key.sep: - rp = policy.ksk_rollperiod - prepub = policy.ksk_prepublish or (30 * 86400) - postpub = policy.ksk_postpublish or (30 * 86400) - else: - rp = policy.zsk_rollperiod - prepub = policy.zsk_prepublish or (30 * 86400) - postpub = policy.zsk_postpublish or (30 * 86400) - - # the first key should be published and active - p = key.publish() - a = key.activate() - if not p or p > now: - key.setpublish(now) - p = now - if not a or a > now: - key.setactivate(now) - a = now - - i = key.inactive() - fudge = 300 - if not rp: - key.setinactive(None, **kwargs) - key.setdelete(None, **kwargs) - elif not i or a + rp != i: - if not i and a + rp > now + prepub + fudge: - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - elif not i: - key.setinactive(now + prepub + fudge, **kwargs) - key.setdelete(now + prepub + postpub + fudge, **kwargs) - elif i < now: - pass - elif a + rp > i: - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - elif a + rp > now + prepub + fudge: - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - else: - key.setinactive(now + prepub + fudge, **kwargs) - key.setdelete(now + prepub + postpub + fudge, **kwargs) - else: - d = key.delete() - if not d or i + postpub > now + fudge: - key.setdelete(i + postpub, **kwargs) - elif not d: - key.setdelete(now + postpub + fudge, **kwargs) - elif d < now + fudge: - pass - elif d < i + postpub: - key.setdelete(i + postpub, **kwargs) - - if policy.keyttl != key.ttl: - key.setttl(policy.keyttl) - - # handle all the subsequent keys - prev = key - for key in keys[1:]: - # if no rollperiod, then all keys after the first in - # the series kept inactive. - # (XXX: we need to change this to allow standby keys) - if not rp: - key.setpublish(None, **kwargs) - key.setactivate(None, **kwargs) - key.setinactive(None, **kwargs) - key.setdelete(None, **kwargs) - if policy.keyttl != key.ttl: - key.setttl(policy.keyttl) - continue - - # otherwise, ensure all dates are set correctly based on - # the initial key - a = prev.inactive() - p = a - prepub - key.setactivate(a, **kwargs) - key.setpublish(p, **kwargs) - key.setinactive(a + rp, **kwargs) - key.setdelete(a + rp + postpub, **kwargs) - prev.setdelete(a + postpub, **kwargs) - if policy.keyttl != key.ttl: - key.setttl(policy.keyttl) - prev = key - - # if we haven't got sufficient coverage, create successor key(s) - while rp and prev.inactive() and \ - prev.inactive() < now + policy.coverage: - # commit changes to predecessor: a successor can only be - # generated if Inactive has been set in the predecessor key - prev.commit(self._context['settime_path'], **kwargs) - key = prev.generate_successor(self._context['keygen_path'], - self._context['randomdev'], - prepub, **kwargs) - - key.setinactive(key.activate() + rp, **kwargs) - key.setdelete(key.inactive() + postpub, **kwargs) - keys.append(key) - prev = key - - # last key? we already know we have sufficient coverage now, so - # disable the inactivation of the final key (if it was set), - # ensuring that if dnssec-keymgr isn't run again, the last key - # in the series will at least remain usable. - prev.setinactive(None, **kwargs) - prev.setdelete(None, **kwargs) - - # commit changes - for key in keys: - key.commit(self._context['settime_path'], **kwargs) - - - def enforce_policy(self, policies, now=time.time(), **kwargs): - # If zones is provided as a parameter, use that list. - # If not, use what we have in this object - zones = kwargs.get('zones', self._zones) - keys_dir = kwargs.get('dir', self._context.get('keys_path', None)) - force = kwargs.get('force', False) - - for zone in zones: - collections = [] - policy = policies.policy(zone) - keys_dir = keys_dir or policy.directory or '.' - alg = policy.algorithm - algnum = dnskey.algnum(alg) - if 'ksk' not in kwargs or not kwargs['ksk']: - if len(self._Z[zone][algnum]) == 0: - k = dnskey.generate(self._context['keygen_path'], - self._context['randomdev'], - keys_dir, zone, alg, - policy.zsk_keysize, False, - policy.keyttl or 3600, - **kwargs) - self._Z[zone][algnum].append(k) - collections.append(self._Z[zone]) - - if 'zsk' not in kwargs or not kwargs['zsk']: - if len(self._K[zone][algnum]) == 0: - k = dnskey.generate(self._context['keygen_path'], - self._context['randomdev'], - keys_dir, zone, alg, - policy.ksk_keysize, True, - policy.keyttl or 3600, - **kwargs) - self._K[zone][algnum].append(k) - collections.append(self._K[zone]) - - for collection in collections: - for algorithm, keys in collection.items(): - if algorithm != algnum: - continue - try: - self.fixseries(keys, policy, now, **kwargs) - except Exception as e: - raise Exception('%s/%s: %s' % - (zone, dnskey.algstr(algnum), str(e))) diff --git a/bin/python/isc/keyzone.py.in b/bin/python/isc/keyzone.py.in deleted file mode 100644 index bc8c51d72f..0000000000 --- a/bin/python/isc/keyzone.py.in +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import os -import sys -import re -from subprocess import Popen, PIPE - -######################################################################## -# Exceptions -######################################################################## -class KeyZoneException(Exception): - pass - -######################################################################## -# class keyzone -######################################################################## -class keyzone: - """reads a zone file to find data relevant to keys""" - - def __init__(self, name, filename, czpath): - self.maxttl = None - self.keyttl = None - - if not name: - return - - if not czpath or not os.path.isfile(czpath) \ - or not os.access(czpath, os.X_OK): - raise KeyZoneException('"named-compilezone" not found') - return - - maxttl = keyttl = None - - fp, _ = Popen([czpath, "-o", "-", name, filename], - stdout=PIPE, stderr=PIPE).communicate() - for line in fp.splitlines(): - if type(line) is not str: - line = line.decode('ascii') - if re.search('^[:space:]*;', line): - continue - fields = line.split() - if not maxttl or int(fields[1]) > maxttl: - maxttl = int(fields[1]) - if fields[3] == "DNSKEY": - keyttl = int(fields[1]) - - self.keyttl = keyttl - self.maxttl = maxttl diff --git a/bin/python/isc/policy.py.in b/bin/python/isc/policy.py.in deleted file mode 100644 index f2f0354267..0000000000 --- a/bin/python/isc/policy.py.in +++ /dev/null @@ -1,692 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import re -import ply.lex as lex -import ply.yacc as yacc -from string import * -from copy import copy - - -############################################################################ -# PolicyLex: a lexer for the policy file syntax. -############################################################################ -class PolicyLex: - reserved = ('POLICY', - 'ALGORITHM_POLICY', - 'ZONE', - 'ALGORITHM', - 'DIRECTORY', - 'KEYTTL', - 'KEY_SIZE', - 'ROLL_PERIOD', - 'PRE_PUBLISH', - 'POST_PUBLISH', - 'COVERAGE', - 'STANDBY', - 'NONE') - - tokens = reserved + ('DATESUFFIX', - 'KEYTYPE', - 'ALGNAME', - 'STR', - 'QSTRING', - 'NUMBER', - 'LBRACE', - 'RBRACE', - 'SEMI') - reserved_map = {} - - t_ignore = ' \t' - t_ignore_olcomment = r'(//|\#).*' - - t_LBRACE = r'\{' - t_RBRACE = r'\}' - t_SEMI = r';'; - - def t_newline(self, t): - r'\n+' - t.lexer.lineno += t.value.count("\n") - - def t_comment(self, t): - r'/\*(.|\n)*?\*/' - t.lexer.lineno += t.value.count('\n') - - def t_DATESUFFIX(self, t): - r'(?i)(?<=[0-9 \t])(y(?:ears|ear|ea|e)?|mo(?:nths|nth|nt|n)?|w(?:eeks|eek|ee|e)?|d(?:ays|ay|a)?|h(?:ours|our|ou|o)?|mi(?:nutes|nute|nut|nu|n)?|s(?:econds|econd|econ|eco|ec|e)?)\b' - t.value = re.match(r'(?i)(y|mo|w|d|h|mi|s)([a-z]*)', t.value).group(1).lower() - return t - - def t_KEYTYPE(self, t): - r'(?i)\b(KSK|ZSK)\b' - t.value = t.value.upper() - return t - - def t_ALGNAME(self, t): - r'(?i)\b(DH|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECDSAP256SHA256|ECDSAP384SHA384|ED25519|ED448)\b' - t.value = t.value.upper() - return t - - def t_STR(self, t): - r'[A-Za-z._-][\w._-]*' - t.type = self.reserved_map.get(t.value, "STR") - return t - - def t_QSTRING(self, t): - r'"([^"\n]|(\\"))*"' - t.type = self.reserved_map.get(t.value, "QSTRING") - t.value = t.value[1:-1] - return t - - def t_NUMBER(self, t): - r'\d+' - t.value = int(t.value) - return t - - def t_error(self, t): - print("Illegal character '%s'" % t.value[0]) - t.lexer.skip(1) - - def __init__(self, **kwargs): - if 'maketrans' in dir(str): - trans = str.maketrans('_', '-') - else: - trans = maketrans('_', '-') - for r in self.reserved: - self.reserved_map[r.lower().translate(trans)] = r - self.lexer = lex.lex(object=self, **kwargs) - - def test(self, text): - self.lexer.input(text) - while True: - t = self.lexer.token() - if not t: - break - print(t) - -############################################################################ -# Policy: this object holds a set of DNSSEC policy settings. -############################################################################ -class Policy: - is_zone = False - is_alg = False - is_constructed = False - ksk_rollperiod = None - zsk_rollperiod = None - ksk_prepublish = None - zsk_prepublish = None - ksk_postpublish = None - zsk_postpublish = None - ksk_keysize = None - zsk_keysize = None - ksk_standby = None - zsk_standby = None - keyttl = None - coverage = None - directory = None - valid_key_sz_per_algo = {'RSASHA1': [1024, 4096], - 'NSEC3RSASHA1': [512, 4096], - 'RSASHA256': [1024, 4096], - 'RSASHA512': [1024, 4096], - 'ECDSAP256SHA256': None, - 'ECDSAP384SHA384': None, - 'ED25519': None, - 'ED448': None} - - def __init__(self, name=None, algorithm=None, parent=None): - self.name = name - self.algorithm = algorithm - self.parent = parent - pass - - def __repr__(self): - return ("%spolicy %s:\n" - "\tinherits %s\n" - "\tdirectory %s\n" - "\talgorithm %s\n" - "\tcoverage %s\n" - "\tksk_keysize %s\n" - "\tzsk_keysize %s\n" - "\tksk_rollperiod %s\n" - "\tzsk_rollperiod %s\n" - "\tksk_prepublish %s\n" - "\tksk_postpublish %s\n" - "\tzsk_prepublish %s\n" - "\tzsk_postpublish %s\n" - "\tksk_standby %s\n" - "\tzsk_standby %s\n" - "\tkeyttl %s\n" - % - ((self.is_constructed and 'constructed ' or \ - self.is_zone and 'zone ' or \ - self.is_alg and 'algorithm ' or ''), - self.name or 'UNKNOWN', - self.parent and self.parent.name or 'None', - self.directory and ('"' + str(self.directory) + '"') or 'None', - self.algorithm or 'None', - self.coverage and str(self.coverage) or 'None', - self.ksk_keysize and str(self.ksk_keysize) or 'None', - self.zsk_keysize and str(self.zsk_keysize) or 'None', - self.ksk_rollperiod and str(self.ksk_rollperiod) or 'None', - self.zsk_rollperiod and str(self.zsk_rollperiod) or 'None', - self.ksk_prepublish and str(self.ksk_prepublish) or 'None', - self.ksk_postpublish and str(self.ksk_postpublish) or 'None', - self.zsk_prepublish and str(self.zsk_prepublish) or 'None', - self.zsk_postpublish and str(self.zsk_postpublish) or 'None', - self.ksk_standby and str(self.ksk_standby) or 'None', - self.zsk_standby and str(self.zsk_standby) or 'None', - self.keyttl and str(self.keyttl) or 'None')) - - def __verify_size(self, key_size, size_range): - return (size_range[0] <= key_size <= size_range[1]) - - def get_name(self): - return self.name - - def constructed(self): - return self.is_constructed - - def validate(self): - """ Check if the values in the policy make sense - :return: True/False if the policy passes validation - """ - if self.ksk_rollperiod and \ - self.ksk_prepublish is not None and \ - self.ksk_prepublish > self.ksk_rollperiod: - print(self.ksk_rollperiod) - return (False, - ('KSK pre-publish period (%d) exceeds rollover period %d' - % (self.ksk_prepublish, self.ksk_rollperiod))) - - if self.ksk_rollperiod and \ - self.ksk_postpublish is not None and \ - self.ksk_postpublish > self.ksk_rollperiod: - return (False, - ('KSK post-publish period (%d) exceeds rollover period %d' - % (self.ksk_postpublish, self.ksk_rollperiod))) - - if self.zsk_rollperiod and \ - self.zsk_prepublish is not None and \ - self.zsk_prepublish >= self.zsk_rollperiod: - return (False, - ('ZSK pre-publish period (%d) exceeds rollover period %d' - % (self.zsk_prepublish, self.zsk_rollperiod))) - - if self.zsk_rollperiod and \ - self.zsk_postpublish is not None and \ - self.zsk_postpublish >= self.zsk_rollperiod: - return (False, - ('ZSK post-publish period (%d) exceeds rollover period %d' - % (self.zsk_postpublish, self.zsk_rollperiod))) - - if self.ksk_rollperiod and \ - self.ksk_prepublish and self.ksk_postpublish and \ - self.ksk_prepublish + self.ksk_postpublish >= self.ksk_rollperiod: - return (False, - (('KSK pre/post-publish periods (%d/%d) ' + - 'combined exceed rollover period %d') % - (self.ksk_prepublish, - self.ksk_postpublish, - self.ksk_rollperiod))) - - if self.zsk_rollperiod and \ - self.zsk_prepublish and self.zsk_postpublish and \ - self.zsk_prepublish + self.zsk_postpublish >= self.zsk_rollperiod: - return (False, - (('ZSK pre/post-publish periods (%d/%d) ' + - 'combined exceed rollover period %d') % - (self.zsk_prepublish, - self.zsk_postpublish, - self.zsk_rollperiod))) - - if self.algorithm is not None: - # Validate the key size - key_sz_range = self.valid_key_sz_per_algo.get(self.algorithm) - if key_sz_range is not None: - # Verify KSK - if not self.__verify_size(self.ksk_keysize, key_sz_range): - return False, 'KSK key size %d outside valid range %s' \ - % (self.ksk_keysize, key_sz_range) - - # Verify ZSK - if not self.__verify_size(self.zsk_keysize, key_sz_range): - return False, 'ZSK key size %d outside valid range %s' \ - % (self.zsk_keysize, key_sz_range) - - if self.algorithm in ['ECDSAP256SHA256', \ - 'ECDSAP384SHA384', \ - 'ED25519', \ - 'ED448']: - self.ksk_keysize = None - self.zsk_keysize = None - - return True, '' - -############################################################################ -# dnssec_policy: -# This class reads a dnssec.policy file and creates a dictionary of -# DNSSEC policy rules from which a policy for a specific zone can -# be generated. -############################################################################ -class PolicyException(Exception): - pass - -class dnssec_policy: - alg_policy = {} - named_policy = {} - zone_policy = {} - current = None - filename = None - initial = True - - def __init__(self, filename=None, **kwargs): - self.plex = PolicyLex() - self.tokens = self.plex.tokens - if 'debug' not in kwargs: - kwargs['debug'] = False - if 'write_tables' not in kwargs: - kwargs['write_tables'] = False - self.parser = yacc.yacc(module=self, **kwargs) - - # set defaults - self.setup('''policy global { algorithm rsasha256; - key-size ksk 2048; - key-size zsk 2048; - roll-period ksk 0; - roll-period zsk 1y; - pre-publish ksk 1mo; - pre-publish zsk 1mo; - post-publish ksk 1mo; - post-publish zsk 1mo; - standby ksk 0; - standby zsk 0; - keyttl 1h; - coverage 6mo; }; - policy default { policy global; };''') - - p = Policy() - p.algorithm = None - p.is_alg = True - p.ksk_keysize = 2048; - p.zsk_keysize = 2048; - - # set default algorithm policies - - # these can use default settings - self.alg_policy['RSASHA1'] = copy(p) - self.alg_policy['RSASHA1'].algorithm = "RSASHA1" - self.alg_policy['RSASHA1'].name = "RSASHA1" - - self.alg_policy['NSEC3RSASHA1'] = copy(p) - self.alg_policy['NSEC3RSASHA1'].algorithm = "NSEC3RSASHA1" - self.alg_policy['NSEC3RSASHA1'].name = "NSEC3RSASHA1" - - self.alg_policy['RSASHA256'] = copy(p) - self.alg_policy['RSASHA256'].algorithm = "RSASHA256" - self.alg_policy['RSASHA256'].name = "RSASHA256" - - self.alg_policy['RSASHA512'] = copy(p) - self.alg_policy['RSASHA512'].algorithm = "RSASHA512" - self.alg_policy['RSASHA512'].name = "RSASHA512" - - self.alg_policy['ECDSAP256SHA256'] = copy(p) - self.alg_policy['ECDSAP256SHA256'].algorithm = "ECDSAP256SHA256" - self.alg_policy['ECDSAP256SHA256'].name = "ECDSAP256SHA256" - self.alg_policy['ECDSAP256SHA256'].ksk_keysize = None; - self.alg_policy['ECDSAP256SHA256'].zsk_keysize = None; - - self.alg_policy['ECDSAP384SHA384'] = copy(p) - self.alg_policy['ECDSAP384SHA384'].algorithm = "ECDSAP384SHA384" - self.alg_policy['ECDSAP384SHA384'].name = "ECDSAP384SHA384" - self.alg_policy['ECDSAP384SHA384'].ksk_keysize = None; - self.alg_policy['ECDSAP384SHA384'].zsk_keysize = None; - - self.alg_policy['ED25519'] = copy(p) - self.alg_policy['ED25519'].algorithm = "ED25519" - self.alg_policy['ED25519'].name = "ED25519" - self.alg_policy['ED25519'].ksk_keysize = None; - self.alg_policy['ED25519'].zsk_keysize = None; - - self.alg_policy['ED448'] = copy(p) - self.alg_policy['ED448'].algorithm = "ED448" - self.alg_policy['ED448'].name = "ED448" - self.alg_policy['ED448'].ksk_keysize = None; - self.alg_policy['ED448'].zsk_keysize = None; - - if filename: - self.load(filename) - - def load(self, filename): - self.filename = filename - self.initial = True - with open(filename) as f: - text = f.read() - self.plex.lexer.lineno = 0 - self.parser.parse(text) - - self.filename = None - - def setup(self, text): - self.initial = True - self.plex.lexer.lineno = 0 - self.parser.parse(text) - - def policy(self, zone, **kwargs): - z = zone.lower() - p = None - - if z in self.zone_policy: - p = self.zone_policy[z] - - if p is None: - p = copy(self.named_policy['default']) - p.name = zone - p.is_constructed = True - - if p.algorithm is None: - parent = p.parent or self.named_policy['default'] - while parent and not parent.algorithm: - parent = parent.parent - p.algorithm = parent and parent.algorithm or None - - if p.algorithm in self.alg_policy: - ap = self.alg_policy[p.algorithm] - else: - raise PolicyException('algorithm not found') - - if p.directory is None: - parent = p.parent or self.named_policy['default'] - while parent is not None and not parent.directory: - parent = parent.parent - p.directory = parent and parent.directory - - if p.coverage is None: - parent = p.parent or self.named_policy['default'] - while parent and not parent.coverage: - parent = parent.parent - p.coverage = parent and parent.coverage or ap.coverage - - if p.ksk_keysize is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_keysize: - parent = parent.parent - p.ksk_keysize = parent and parent.ksk_keysize or ap.ksk_keysize - - if p.zsk_keysize is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_keysize: - parent = parent.parent - p.zsk_keysize = parent and parent.zsk_keysize or ap.zsk_keysize - - if p.ksk_rollperiod is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_rollperiod: - parent = parent.parent - p.ksk_rollperiod = parent and \ - parent.ksk_rollperiod or ap.ksk_rollperiod - - if p.zsk_rollperiod is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_rollperiod: - parent = parent.parent - p.zsk_rollperiod = parent and \ - parent.zsk_rollperiod or ap.zsk_rollperiod - - if p.ksk_prepublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_prepublish: - parent = parent.parent - p.ksk_prepublish = parent and \ - parent.ksk_prepublish or ap.ksk_prepublish - - if p.zsk_prepublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_prepublish: - parent = parent.parent - p.zsk_prepublish = parent and \ - parent.zsk_prepublish or ap.zsk_prepublish - - if p.ksk_postpublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.ksk_postpublish: - parent = parent.parent - p.ksk_postpublish = parent and \ - parent.ksk_postpublish or ap.ksk_postpublish - - if p.zsk_postpublish is None: - parent = p.parent or self.named_policy['default'] - while parent.parent and not parent.zsk_postpublish: - parent = parent.parent - p.zsk_postpublish = parent and \ - parent.zsk_postpublish or ap.zsk_postpublish - - if p.keyttl is None: - parent = p.parent or self.named_policy['default'] - while parent is not None and not parent.keyttl: - parent = parent.parent - p.keyttl = parent and parent.keyttl - - if 'novalidate' not in kwargs or not kwargs['novalidate']: - (valid, msg) = p.validate() - if not valid: - raise PolicyException(msg) - return None - - return p - - - def p_policylist(self, p): - '''policylist : init policy - | policylist policy''' - pass - - def p_init(self, p): - "init :" - self.initial = False - - def p_policy(self, p): - '''policy : alg_policy - | zone_policy - | named_policy''' - pass - - def p_name(self, p): - '''name : STR - | KEYTYPE - | DATESUFFIX''' - p[0] = p[1] - pass - - def p_domain(self, p): - '''domain : STR - | QSTRING - | KEYTYPE - | DATESUFFIX''' - p[0] = p[1].strip() - if not re.match(r'^[\w.-][\w.-]*$', p[0]): - raise PolicyException('invalid domain') - pass - - def p_new_policy(self, p): - "new_policy :" - self.current = Policy() - - def p_alg_policy(self, p): - "alg_policy : ALGORITHM_POLICY ALGNAME new_policy alg_option_group SEMI" - self.current.name = p[2] - self.current.is_alg = True - self.alg_policy[p[2]] = self.current - pass - - def p_zone_policy(self, p): - "zone_policy : ZONE domain new_policy policy_option_group SEMI" - self.current.name = p[2].rstrip('.') - self.current.is_zone = True - self.zone_policy[p[2].rstrip('.').lower()] = self.current - pass - - def p_named_policy(self, p): - "named_policy : POLICY name new_policy policy_option_group SEMI" - self.current.name = p[2] - self.named_policy[p[2].lower()] = self.current - pass - - def p_duration_1(self, p): - "duration : NUMBER" - p[0] = p[1] - pass - - def p_duration_2(self, p): - "duration : NONE" - p[0] = None - pass - - def p_duration_3(self, p): - "duration : NUMBER DATESUFFIX" - if p[2] == "y": - p[0] = p[1] * 31536000 # year - elif p[2] == "mo": - p[0] = p[1] * 2592000 # month - elif p[2] == "w": - p[0] = p[1] * 604800 # week - elif p[2] == "d": - p[0] = p[1] * 86400 # day - elif p[2] == "h": - p[0] = p[1] * 3600 # hour - elif p[2] == "mi": - p[0] = p[1] * 60 # minute - elif p[2] == "s": - p[0] = p[1] # second - else: - raise PolicyException('invalid duration') - - def p_policy_option_group(self, p): - "policy_option_group : LBRACE policy_option_list RBRACE" - pass - - def p_policy_option_list(self, p): - '''policy_option_list : policy_option SEMI - | policy_option_list policy_option SEMI''' - pass - - def p_policy_option(self, p): - '''policy_option : parent_option - | directory_option - | coverage_option - | rollperiod_option - | prepublish_option - | postpublish_option - | keysize_option - | algorithm_option - | keyttl_option - | standby_option''' - pass - - def p_alg_option_group(self, p): - "alg_option_group : LBRACE alg_option_list RBRACE" - pass - - def p_alg_option_list(self, p): - '''alg_option_list : alg_option SEMI - | alg_option_list alg_option SEMI''' - pass - - def p_alg_option(self, p): - '''alg_option : coverage_option - | rollperiod_option - | prepublish_option - | postpublish_option - | keyttl_option - | keysize_option - | standby_option''' - pass - - def p_parent_option(self, p): - "parent_option : POLICY name" - self.current.parent = self.named_policy[p[2].lower()] - - def p_directory_option(self, p): - "directory_option : DIRECTORY QSTRING" - self.current.directory = p[2] - - def p_coverage_option(self, p): - "coverage_option : COVERAGE duration" - self.current.coverage = p[2] - - def p_rollperiod_option(self, p): - "rollperiod_option : ROLL_PERIOD KEYTYPE duration" - if p[2] == "KSK": - self.current.ksk_rollperiod = p[3] - else: - self.current.zsk_rollperiod = p[3] - - def p_prepublish_option(self, p): - "prepublish_option : PRE_PUBLISH KEYTYPE duration" - if p[2] == "KSK": - self.current.ksk_prepublish = p[3] - else: - self.current.zsk_prepublish = p[3] - - def p_postpublish_option(self, p): - "postpublish_option : POST_PUBLISH KEYTYPE duration" - if p[2] == "KSK": - self.current.ksk_postpublish = p[3] - else: - self.current.zsk_postpublish = p[3] - - def p_keysize_option(self, p): - "keysize_option : KEY_SIZE KEYTYPE NUMBER" - if p[2] == "KSK": - self.current.ksk_keysize = p[3] - else: - self.current.zsk_keysize = p[3] - - def p_standby_option(self, p): - "standby_option : STANDBY KEYTYPE NUMBER" - if p[2] == "KSK": - self.current.ksk_standby = p[3] - else: - self.current.zsk_standby = p[3] - - def p_keyttl_option(self, p): - "keyttl_option : KEYTTL duration" - self.current.keyttl = p[2] - - def p_algorithm_option(self, p): - "algorithm_option : ALGORITHM ALGNAME" - self.current.algorithm = p[2] - - def p_error(self, p): - if p: - print("%s%s%d:syntax error near '%s'" % - (self.filename or "", ":" if self.filename else "", - p.lineno, p.value)) - else: - if not self.initial: - raise PolicyException("%s%s%d:unexpected end of input" % - (self.filename or "", ":" if self.filename else "", - p and p.lineno or 0)) - -if __name__ == "__main__": - import sys - if sys.argv[1] == "lex": - file = open(sys.argv[2]) - text = file.read() - file.close() - plex = PolicyLex(debug=1) - plex.test(text) - elif sys.argv[1] == "parse": - try: - pp = dnssec_policy(sys.argv[2], write_tables=True, debug=True) - print(pp.named_policy['default']) - print(pp.policy("nonexistent.zone")) - except Exception as e: - print(e.args[0]) diff --git a/bin/python/isc/rndc.py.in b/bin/python/isc/rndc.py.in deleted file mode 100644 index e1a3e77761..0000000000 --- a/bin/python/isc/rndc.py.in +++ /dev/null @@ -1,188 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -############################################################################ -# rndc.py -# This module implements the RNDC control protocol. -############################################################################ - -from collections import OrderedDict -import time -import struct -import hashlib -import hmac -import base64 -import random -import socket - - -class rndc(object): - """RNDC protocol client library""" - __algos = {'md5': 157, - 'sha1': 161, - 'sha224': 162, - 'sha256': 163, - 'sha384': 164, - 'sha512': 165} - - def __init__(self, host, algo, secret): - """Creates a persistent connection to RNDC and logs in - host - (ip, port) tuple - algo - HMAC algorithm: one of md5, sha1, sha224, sha256, sha384, sha512 - (with optional prefix 'hmac-') - secret - HMAC secret, base64 encoded""" - self.host = host - algo = algo.lower() - if algo.startswith('hmac-'): - algo = algo[5:] - self.algo = algo - self.hlalgo = getattr(hashlib, algo) - self.secret = base64.b64decode(secret) - self.ser = random.randint(0, 1 << 24) - self.nonce = None - self.__connect_login() - - def call(self, cmd): - """Call a RNDC command, all parsing is done on the server side - cmd - a complete string with a command (eg 'reload zone example.com') - """ - return dict(self.__command(type=cmd)['_data']) - - def __serialize_dict(self, data, ignore_auth=False): - rv = bytearray() - for k, v in data.items(): - if ignore_auth and k == '_auth': - continue - rv += struct.pack('B', len(k)) + k.encode('ascii') - if type(v) == str: - rv += struct.pack('>BI', 1, len(v)) + v.encode('ascii') - elif type(v) == bytes: - rv += struct.pack('>BI', 1, len(v)) + v - elif type(v) == bytearray: - rv += struct.pack('>BI', 1, len(v)) + v - elif type(v) == OrderedDict: - sd = self.__serialize_dict(v) - rv += struct.pack('>BI', 2, len(sd)) + sd - else: - raise NotImplementedError('Cannot serialize element of type %s' - % type(v)) - return rv - - def __prep_message(self, *args, **kwargs): - self.ser += 1 - now = int(time.time()) - data = OrderedDict(*args, **kwargs) - - d = OrderedDict() - d['_auth'] = OrderedDict() - d['_ctrl'] = OrderedDict() - d['_ctrl']['_ser'] = str(self.ser) - d['_ctrl']['_tim'] = str(now) - d['_ctrl']['_exp'] = str(now+60) - if self.nonce is not None: - d['_ctrl']['_nonce'] = self.nonce - d['_data'] = data - - msg = self.__serialize_dict(d, ignore_auth=True) - hash = hmac.new(self.secret, msg, self.hlalgo).digest() - bhash = base64.b64encode(hash) - if self.algo == 'md5': - d['_auth']['hmd5'] = struct.pack('22s', bhash) - else: - d['_auth']['hsha'] = bytearray(struct.pack('B88s', - self.__algos[self.algo], bhash)) - msg = self.__serialize_dict(d) - msg = struct.pack('>II', len(msg) + 4, 1) + msg - return msg - - def __verify_msg(self, msg): - if self.nonce is not None and msg['_ctrl']['_nonce'] != self.nonce: - return False - if self.algo == 'md5': - bhash = msg['_auth']['hmd5'] - else: - bhash = msg['_auth']['hsha'][1:] - if type(bhash) == bytes: - bhash = bhash.decode('ascii') - bhash += '=' * (4 - (len(bhash) % 4)) - remote_hash = base64.b64decode(bhash) - my_msg = self.__serialize_dict(msg, ignore_auth=True) - my_hash = hmac.new(self.secret, my_msg, self.hlalgo).digest() - return (my_hash == remote_hash) - - def __command(self, *args, **kwargs): - msg = self.__prep_message(*args, **kwargs) - sent = self.socket.send(msg) - if sent != len(msg): - raise IOError("Cannot send the message") - - header = self.socket.recv(8) - if len(header) != 8: - # What should we throw here? Bad auth can cause this... - raise IOError("Can't read response header") - - length, version = struct.unpack('>II', header) - if version != 1: - raise NotImplementedError('Wrong message version %d' % version) - - # it includes the header - length -= 4 - data = self.socket.recv(length, socket.MSG_WAITALL) - if len(data) != length: - raise IOError("Can't read response data") - - if type(data) == str: - data = bytearray(data) - msg = self.__parse_message(data) - if not self.__verify_msg(msg): - raise IOError("Authentication failure") - - return msg - - def __connect_login(self): - self.socket = socket.create_connection(self.host) - self.nonce = None - msg = self.__command(type='null') - self.nonce = msg['_ctrl']['_nonce'] - - def __parse_element(self, input): - pos = 0 - labellen = input[pos] - pos += 1 - label = input[pos:pos+labellen].decode('ascii') - pos += labellen - type = input[pos] - pos += 1 - datalen = struct.unpack('>I', input[pos:pos+4])[0] - pos += 4 - data = input[pos:pos+datalen] - pos += datalen - rest = input[pos:] - - if type == 1: # raw binary value - return label, data, rest - elif type == 2: # dictionary - d = OrderedDict() - while len(data) > 0: - ilabel, value, data = self.__parse_element(data) - d[ilabel] = value - return label, d, rest - # TODO type 3 - list - else: - raise NotImplementedError('Unknown element type %d' % type) - - def __parse_message(self, input): - rv = OrderedDict() - hdata = None - while len(input) > 0: - label, value, input = self.__parse_element(input) - rv[label] = value - return rv diff --git a/bin/python/isc/tests/.gitignore b/bin/python/isc/tests/.gitignore deleted file mode 100644 index c38ff90a33..0000000000 --- a/bin/python/isc/tests/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dnskey_test.py -policy_test.py diff --git a/bin/python/isc/tests/Makefile.in b/bin/python/isc/tests/Makefile.in deleted file mode 100644 index 60b9bd77c8..0000000000 --- a/bin/python/isc/tests/Makefile.in +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -PYTHON = @PYTHON@ - -PYTESTS = dnskey_test.py policy_test.py - -@BIND9_MAKE_RULES@ - -check test: - for test in $(PYTESTS); do \ - PYTHONPATH=${srcdir}/../.. $(PYTHON) ${srcdir}/$$test; \ - done - -clean distclean:: - rm -rf *.pyc __pycache__ - -distclean:: - rm -f ${PYTESTS} diff --git a/bin/python/isc/tests/dnskey_test.py.in b/bin/python/isc/tests/dnskey_test.py.in deleted file mode 100644 index 91d52452a0..0000000000 --- a/bin/python/isc/tests/dnskey_test.py.in +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import sys -import unittest -sys.path.append('../..') -from isc import * - -kdict = None - - -def getkey(): - global kdict - if not kdict: - kd = keydict(path='testdata') - for key in kd: - return key - - -class DnskeyTest(unittest.TestCase): - def test_metdata(self): - key = getkey() - self.assertEqual(key.created(), 1448055647) - self.assertEqual(key.publish(), 1445463714) - self.assertEqual(key.activate(), 1448055714) - self.assertEqual(key.revoke(), 1479591714) - self.assertEqual(key.inactive(), 1511127714) - self.assertEqual(key.delete(), 1542663714) - self.assertEqual(key.syncpublish(), 1442871714) - self.assertEqual(key.syncdelete(), 1448919714) - - def test_fmttime(self): - key = getkey() - self.assertEqual(key.getfmttime('Created'), '20151120214047') - self.assertEqual(key.getfmttime('Publish'), '20151021214154') - self.assertEqual(key.getfmttime('Activate'), '20151120214154') - self.assertEqual(key.getfmttime('Revoke'), '20161119214154') - self.assertEqual(key.getfmttime('Inactive'), '20171119214154') - self.assertEqual(key.getfmttime('Delete'), '20181119214154') - self.assertEqual(key.getfmttime('SyncPublish'), '20150921214154') - self.assertEqual(key.getfmttime('SyncDelete'), '20151130214154') - -if __name__ == "__main__": - unittest.main() diff --git a/bin/python/isc/tests/policy_test.py.in b/bin/python/isc/tests/policy_test.py.in deleted file mode 100644 index 51d008d057..0000000000 --- a/bin/python/isc/tests/policy_test.py.in +++ /dev/null @@ -1,83 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import sys -import unittest -sys.path.append('../..') -from isc import * - - -class PolicyTest(unittest.TestCase): - def test_keysize(self): - pol = policy.dnssec_policy() - pol.load('test-policies/01-keysize.pol') - - p = pol.policy('good_rsa.test', novalidate=True) - self.assertEqual(p.get_name(), "good_rsa.test") - self.assertEqual(p.constructed(), False) - self.assertEqual(p.validate(), (True, "")) - - def test_prepublish(self): - pol = policy.dnssec_policy() - pol.load('test-policies/02-prepublish.pol') - p = pol.policy('good_prepublish.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - - p = pol.policy('bad_prepublish.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'KSK pre/post-publish periods ' - '(10368000/5184000) combined exceed ' - 'rollover period 10368000')) - - def test_postpublish(self): - pol = policy.dnssec_policy() - pol.load('test-policies/03-postpublish.pol') - - p = pol.policy('good_postpublish.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - - p = pol.policy('bad_postpublish.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'KSK pre/post-publish periods ' - '(10368000/5184000) combined exceed ' - 'rollover period 10368000')) - - def test_combined_pre_post(self): - pol = policy.dnssec_policy() - pol.load('test-policies/04-combined-pre-post.pol') - - p = pol.policy('good_combined_pre_post_ksk.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - - p = pol.policy('bad_combined_pre_post_ksk.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'KSK pre/post-publish periods ' - '(5184000/5184000) combined exceed ' - 'rollover period 10368000')) - - p = pol.policy('good_combined_pre_post_zsk.test', novalidate=True) - self.assertEqual(p.validate(), - (True, "")) - p = pol.policy('bad_combined_pre_post_zsk.test', novalidate=True) - self.assertEqual(p.validate(), - (False, 'ZSK pre/post-publish periods ' - '(5184000/5184000) combined exceed ' - 'rollover period 7776000')) - - def test_numeric_zone(self): - pol = policy.dnssec_policy() - pol.load('test-policies/05-numeric-zone.pol') - - p = pol.policy('99example.test', novalidate=True) - self.assertEqual(p.validate(), (True, "")) - -if __name__ == "__main__": - unittest.main() diff --git a/bin/python/isc/tests/test-policies/01-keysize.pol b/bin/python/isc/tests/test-policies/01-keysize.pol deleted file mode 100644 index 8b62c5fd44..0000000000 --- a/bin/python/isc/tests/test-policies/01-keysize.pol +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -policy keysize_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -policy keysize_dsa { - algorithm dsa; - coverage 1y; - key-size ksk 2048; - key-size zsk 1024; -}; - -zone good_rsa.test { - policy keysize_rsa; -}; - -zone bad_rsa.test { - policy keysize_rsa; - key-size ksk 511; -}; - -zone good_dsa.test { - policy keysize_dsa; - key-size ksk 1024; - key-size zsk 768; -}; - -zone bad_dsa.test { - policy keysize_dsa; - key-size ksk 1024; - key-size zsk 769; -}; diff --git a/bin/python/isc/tests/test-policies/02-prepublish.pol b/bin/python/isc/tests/test-policies/02-prepublish.pol deleted file mode 100644 index bd3538660f..0000000000 --- a/bin/python/isc/tests/test-policies/02-prepublish.pol +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -policy prepublish_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -// Policy that defines a pre-publish period lower than the rollover period -zone good_prepublish.test { - policy prepublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 1mo; -}; - -// Policy that defines a pre-publish period equal to the rollover period -zone bad_prepublish.test { - policy prepublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 4mo; -}; - - diff --git a/bin/python/isc/tests/test-policies/03-postpublish.pol b/bin/python/isc/tests/test-policies/03-postpublish.pol deleted file mode 100644 index 4d4a8efa3e..0000000000 --- a/bin/python/isc/tests/test-policies/03-postpublish.pol +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -policy postpublish_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -// Policy that defines a post-publish period lower than the rollover period -zone good_postpublish.test { - policy postpublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 1mo; -}; - -// Policy that defines a post-publish period equal to the rollover period -zone bad_postpublish.test { - policy postpublish_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 4mo; -}; - - diff --git a/bin/python/isc/tests/test-policies/04-combined-pre-post.pol b/bin/python/isc/tests/test-policies/04-combined-pre-post.pol deleted file mode 100644 index d612d816f4..0000000000 --- a/bin/python/isc/tests/test-policies/04-combined-pre-post.pol +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -policy combined_pre_post_rsa { - algorithm rsasha1; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2w; - post-publish zsk 2w; - roll-period ksk 1y; - pre-publish ksk 1mo; - post-publish ksk 2mo; - keyttl 1h; - key-size ksk 2048; - key-size zsk 1024; -}; - -// Policy that defines a combined pre-publish and post-publish period lower -// than the rollover period -zone good_combined_pre_post_ksk.test { - policy combined_pre_post_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 1mo; - post-publish ksk 1mo; -}; - -// Policy that defines a combined pre-publish and post-publish period higher -// than the rollover period -zone bad_combined_pre_post_ksk.test { - policy combined_pre_post_rsa; - coverage 6mo; - roll-period ksk 4mo; - pre-publish ksk 2mo; - post-publish ksk 2mo; -}; - -// Policy that defines a combined pre-publish and post-publish period lower -// than the rollover period -zone good_combined_pre_post_zsk.test { - policy combined_pre_post_rsa; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 1mo; - post-publish zsk 1mo; -}; - -// Policy that defines a combined pre-publish and post-publish period higher -// than the rollover period -zone bad_combined_pre_post_zsk.test { - policy combined_pre_post_rsa; - coverage 1y; - roll-period zsk 3mo; - pre-publish zsk 2mo; - post-publish zsk 2mo; -}; - - diff --git a/bin/python/isc/tests/test-policies/05-numeric-zone.pol b/bin/python/isc/tests/test-policies/05-numeric-zone.pol deleted file mode 100644 index 1db8c08a1b..0000000000 --- a/bin/python/isc/tests/test-policies/05-numeric-zone.pol +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -// Zone policy that uses a numeric name -zone "99example.test" { - coverage 6mo; -}; diff --git a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.key b/bin/python/isc/tests/testdata/Kexample.com.+007+35529.key deleted file mode 100644 index c5afbe27ed..0000000000 --- a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.key +++ /dev/null @@ -1,8 +0,0 @@ -; This is a key-signing key, keyid 35529, for example.com. -; Created: 20151120214047 (Fri Nov 20 13:40:47 2015) -; Publish: 20151021214154 (Wed Oct 21 14:41:54 2015) -; Activate: 20151120214154 (Fri Nov 20 13:41:54 2015) -; Revoke: 20161119214154 (Sat Nov 19 13:41:54 2016) -; Inactive: 20171119214154 (Sun Nov 19 13:41:54 2017) -; Delete: 20181119214154 (Mon Nov 19 13:41:54 2018) -example.com. IN DNSKEY 257 3 7 AwEAAbbJK96tY8d4sF6RLxh9SVIhho5s2ZhrcijT5j1SNLECen7QLutj VJPEiG8UgBLaJSGkxPDxOygYv4hwh4JXBSj89o9rNabAJtCa9XzIXSpt /cfiCfvqmcOZb9nepmDCXsC7gn/gbae/4Y5ym9XOiCp8lu+tlFWgRiJ+ kxDGN48rRPrGfpq+SfwM9NUtftVa7B0EFVzDkADKedRj0SSGYOqH+WYH CnWjhPFmgJoAw3/m4slTHW1l+mDwFvsCMjXopg4JV0CNnTybnOmyuIwO LWRhB3q8ze24sYBU1fpE9VAMxZ++4Kqh/2MZFeDAs7iPPKSmI3wkRCW5 pkwDLO5lJ9c= diff --git a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.private b/bin/python/isc/tests/testdata/Kexample.com.+007+35529.private deleted file mode 100644 index af22c6ad52..0000000000 --- a/bin/python/isc/tests/testdata/Kexample.com.+007+35529.private +++ /dev/null @@ -1,18 +0,0 @@ -Private-key-format: v1.3 -Algorithm: 7 (NSEC3RSASHA1) -Modulus: tskr3q1jx3iwXpEvGH1JUiGGjmzZmGtyKNPmPVI0sQJ6ftAu62NUk8SIbxSAEtolIaTE8PE7KBi/iHCHglcFKPz2j2s1psAm0Jr1fMhdKm39x+IJ++qZw5lv2d6mYMJewLuCf+Btp7/hjnKb1c6IKnyW762UVaBGIn6TEMY3jytE+sZ+mr5J/Az01S1+1VrsHQQVXMOQAMp51GPRJIZg6of5ZgcKdaOE8WaAmgDDf+biyVMdbWX6YPAW+wIyNeimDglXQI2dPJuc6bK4jA4tZGEHerzN7bixgFTV+kT1UAzFn77gqqH/YxkV4MCzuI88pKYjfCREJbmmTAMs7mUn1w== -PublicExponent: AQAB -PrivateExponent: jfiM6YU1Rd6Y5qrPsK7HP1Ko54DmNbvmzI1hfGmYYZAyQsNCXjQloix5aAW9QGdNhecrzJUhxJAMXFZC+lrKuD5a56R25JDE1Sw21nft3SHXhuQrqw5Z5hIMTWXhRrBR1lMOFnLj2PJxqCmenp+vJYjl1z20RBmbv/keE15SExFRJIJ3G0lI4V0KxprY5rgsT/vID0pS32f7rmXhgEzyWDyuxceTMidBooD5BSeEmSTYa4rvCVZ2vgnzIGSxjYDPJE2rGve2dpvdXQuujRFaf4+/FzjaOgg35rTtUmC9klfB4D6KJIfc1PNUwcH7V0VJ2fFlgZgMYi4W331QORl9sQ== -Prime1: 479rW3EeoBwHhUKDy5YeyfnMKjhaosrcYhW4resevLzatFrvS/n2KxJnsHoEzmGr2A13naI61RndgVBBOwNDWI3/tQ+aKvcr+V9m4omROV3xYa8s1FsDbEW0Z6G0UheaqRFir8WK98/Lj6Zht1uBXHSPPf91OW0qj+b5gbX7TK8= -Prime2: zXXlxgIq+Ih6kxsUw4Ith0nd/d2P3d42QYPjxYjsg4xYicPAjva9HltnbBQ2lr4JEG9Yyb8KalSnJUSuvXtn7bGfBzLu8W6omCeVWXQVH4NIu9AjpO16NpMKWGRfiHHbbSYJs1daTZKHC2FEmi18MKX/RauHGGOakFQ/3A/GMVk= -Exponent1: 0o9UQ1uHNAIWFedUEHJ/jr7LOrGVYnLpZCmu7+S0K0zzatGz8ets44+FnAyDywdUKFDzKSMm/4SFXRwE4vl2VzYZlp2RLG4PEuRYK9OCF6a6F1UsvjxTItQjIbjIDSnTjMINGnMps0lDa1EpgKsyI3eEQ46eI3TBZ//k6D6G0vM= -Exponent2: d+CYJgXRyJzo17fvT3s+0TbaHWsOq+chROyNEw4m4UIbzpW2XjO8eF/gYgERMLbEVyCAb4XVr+CgfXArfEbqhpciMHMZUyi7mbtOupiuUmqpH1v70Bj3O6xjVtuJmfTEkFSnSEppV+VsgclI26Q6V7Ai1yWTdzl2T0u4zs8tVlE= -Coefficient: E4EYw76gIChdQDn6+Uh44/xH9Uwmvq3OETR8w/kEZ0xQ8AkTdKFKUp84nlR6gN+ljb2mUxERKrVLwnBsU8EbUlo9UccMbBGkkZ/8MyfGCBb9nUyOFtOxdHY2M0MQadesRptXHt/m30XjdohwmT7qfSIENwtgUOHbwFnn7WPMc/k= -Created: 20151120214047 -Publish: 20151021214154 -Activate: 20151120214154 -Revoke: 20161119214154 -Inactive: 20171119214154 -Delete: 20181119214154 -SyncPublish: 20150921214154 -SyncDelete: 20151130214154 diff --git a/bin/python/isc/utils.py.in b/bin/python/isc/utils.py.in deleted file mode 100644 index 0241871960..0000000000 --- a/bin/python/isc/utils.py.in +++ /dev/null @@ -1,71 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import os - -# These routines permit platform-independent location of BIND 9 tools -if os.name == 'nt': - import win32con - import win32api - - -def prefix(bindir=''): - if os.name != 'nt': - return os.path.join('@prefix@', bindir) - - hklm = win32con.HKEY_LOCAL_MACHINE - bind_subkey = "Software\\ISC\\BIND" - sam = win32con.KEY_READ - h_key = None - key_found = True - # can fail if the registry redirected for 32/64 bits - try: - h_key = win32api.RegOpenKeyEx(hklm, bind_subkey, 0, sam) - except: - key_found = False - # retry for 32 bit python with 64 bit bind9 - if not key_found: - key_found = True - sam64 = sam | win32con.KEY_WOW64_64KEY - try: - h_key = win32api.RegOpenKeyEx(hklm, bind_subkey, 0, sam64) - except: - key_found = False - # retry 64 bit python with 32 bit bind9 - if not key_found: - key_found = True - sam32 = sam | win32con.KEY_WOW64_32KEY - try: - h_key = win32api.RegOpenKeyEx(hklm, bind_subkey, 0, sam32) - except: - key_found = False - if key_found: - try: - (named_base, _) = win32api.RegQueryValueEx(h_key, "InstallDir") - except: - key_found = False - win32api.RegCloseKey(h_key) - if key_found: - return os.path.join(named_base, bindir) - return os.path.join(win32api.GetSystemDirectory(), bindir) - - -def shellquote(s): - if os.name == 'nt': - return '"' + s.replace('"', '"\\"') + '"' - return "'" + s.replace("'", "'\\''") + "'" - - -version = '@BIND9_VERSION@' -if os.name != 'nt': - sysconfdir = '@expanded_sysconfdir@' -else: - sysconfdir = prefix('etc') diff --git a/bin/python/setup.py b/bin/python/setup.py deleted file mode 100644 index c50f6d1aa3..0000000000 --- a/bin/python/setup.py +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -from distutils.core import setup -setup(name='isc', - version='2.0', - description='Python functions to support BIND utilities', - url='https://www.isc.org/bind', - author='Internet Systems Consortium, Inc', - author_email='info@isc.org', - license='MPL', - requires=['ply'], - packages=['isc']) diff --git a/bin/tests/system/checkds/clean.sh b/bin/tests/system/checkds/clean.sh deleted file mode 100644 index e4ad79edd2..0000000000 --- a/bin/tests/system/checkds/clean.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -rm -f checkds.* -rm -f ns*/named.lock diff --git a/bin/tests/system/checkds/dig.bat b/bin/tests/system/checkds/dig.bat deleted file mode 100755 index 9465a46025..0000000000 --- a/bin/tests/system/checkds/dig.bat +++ /dev/null @@ -1,32 +0,0 @@ -@echo off -set ext= -set file= - -:loop -@set arg=%1 -if "%arg%" == "" goto end -if "%arg:~0,1%" == "+" goto next -if "%arg%" == "-t" goto next -if "%arg%" == "ds" goto ds -if "%arg%" == "DS" goto ds -if "%arg%" == "dnskey" goto dnskey -if "%arg%" == "DNSKEY" goto dnskey -set file=%arg% -goto next - -:ds -set ext=ds -goto next - -:dnskey -set ext=dnskey -goto next - -:next -shift -goto loop - -:end - -set name=%file%.%ext%.db -type %name% diff --git a/bin/tests/system/checkds/dig.pl b/bin/tests/system/checkds/dig.pl deleted file mode 100644 index 7312f02421..0000000000 --- a/bin/tests/system/checkds/dig.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/perl -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -my $arg; -my $ext; -my $file; - -foreach $arg (@ARGV) { - if ($arg =~ /^\+/) { - next; - } - if ($arg =~ /^-t/) { - next; - } - if ($arg =~ /^ds$/i) { - $ext = "ds"; - next; - } - if ($arg =~ /^dnskey$/i) { - $ext = "dnskey"; - next; - } - $file = $arg; - next; -} - -open F, $file . "." . $ext . ".db" || die $!; -while () { - print; -} -close F; diff --git a/bin/tests/system/checkds/dig.sh b/bin/tests/system/checkds/dig.sh deleted file mode 100755 index e6fd84e2f0..0000000000 --- a/bin/tests/system/checkds/dig.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -while [ "$#" != 0 ]; do - case $1 in - +*) shift ;; - -t) shift ;; - DS|ds) ext=ds ; shift ;; - DNSKEY|dnskey) ext=dnskey ; shift ;; - *) file=$1 ; shift ;; - esac -done - -cat ${file}.${ext}.db diff --git a/bin/tests/system/checkds/missing.example.dnskey.db b/bin/tests/system/checkds/missing.example.dnskey.db deleted file mode 100644 index e372130f1d..0000000000 --- a/bin/tests/system/checkds/missing.example.dnskey.db +++ /dev/null @@ -1,3 +0,0 @@ -missing.example. 3600 IN DNSKEY 257 3 5 AwEAAc6Cz10GXEh5lxA9ujTY/QarTajcUOBwwBYIeldjRsgoouK/UioY FYgxEFL0O5JK6YCRUoGzl3EgLr5GvNyhIp1PZpOpHf7o/4MVOZTGJzm/ sHWP5B+KcYjQOxJiDb433iCmRM4DpHPUUoxw0QbZglzAzl5MfKBoyZud lH59DdT/50bkBg8iVu35EzuW0SYt31k70hxHBSb2wAGWeqxEPKJ1nQiI UcrWNDeem7byrqjPN9wyZhq0XkQ9qbcYxAkRNd8Y7P0FyR1YKJMc6SWZ Ru7muvxqTHgCtJVgxVz4qndCFKdYidiDeKe2/X/z5gf7pyYl3549O8JR tWdNKqutppk= -missing.example. 3600 IN DNSKEY 257 3 5 BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjG rhhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA +u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy 347cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQ zBkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysy LKOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/b ByBNsO70aEFTd -missing.example. 3600 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/missing.example.ds.db b/bin/tests/system/checkds/missing.example.ds.db deleted file mode 100644 index 540ec0bdcb..0000000000 --- a/bin/tests/system/checkds/missing.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -missing.example. 3600 IN DS 12892 5 2 EF59E5C70BC4153B7DB4C11F9C36B729577DA71474E0A5C9B8875173 6E583200 -missing.example. 3600 IN DS 12892 5 1 9D4CD60491D372207FA584D2EE460CC51D7FF8A7 diff --git a/bin/tests/system/checkds/none.example.dnskey.db b/bin/tests/system/checkds/none.example.dnskey.db deleted file mode 100644 index 76ae905ffd..0000000000 --- a/bin/tests/system/checkds/none.example.dnskey.db +++ /dev/null @@ -1,3 +0,0 @@ -none.example. 3600 IN DNSKEY 257 3 5 AwEAAc6Cz10GXEh5lxA9ujTY/QarTajcUOBwwBYIeldjRsgoouK/UioY FYgxEFL0O5JK6YCRUoGzl3EgLr5GvNyhIp1PZpOpHf7o/4MVOZTGJzm/ sHWP5B+KcYjQOxJiDb433iCmRM4DpHPUUoxw0QbZglzAzl5MfKBoyZud lH59DdT/50bkBg8iVu35EzuW0SYt31k70hxHBSb2wAGWeqxEPKJ1nQiI UcrWNDeem7byrqjPN9wyZhq0XkQ9qbcYxAkRNd8Y7P0FyR1YKJMc6SWZ Ru7muvxqTHgCtJVgxVz4qndCFKdYidiDeKe2/X/z5gf7pyYl3549O8JR tWdNKqutppk= -none.example. 3600 IN DNSKEY 257 3 5 BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjG rhhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA +u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy 347cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQ zBkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysy LKOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/b ByBNsO70aEFTd -none.example. 3600 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/none.example.ds.db b/bin/tests/system/checkds/none.example.ds.db deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/bin/tests/system/checkds/ok.example.dnskey.db b/bin/tests/system/checkds/ok.example.dnskey.db deleted file mode 100644 index c767c8fc78..0000000000 --- a/bin/tests/system/checkds/ok.example.dnskey.db +++ /dev/null @@ -1,2 +0,0 @@ -ok.example. 625 IN DNSKEY 257 3 5 BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjGr hhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA+ u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy3 47cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQz Bkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysyL KOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/bB yBNsO70aEFTd -ok.example. 625 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/ok.example.ds.db b/bin/tests/system/checkds/ok.example.ds.db deleted file mode 100644 index 96b159bc9b..0000000000 --- a/bin/tests/system/checkds/ok.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -ok.example. 3600 IN DS 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13 -ok.example. 3600 IN DS 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390 diff --git a/bin/tests/system/checkds/prep.example.db b/bin/tests/system/checkds/prep.example.db deleted file mode 100644 index 5ba5987cab..0000000000 --- a/bin/tests/system/checkds/prep.example.db +++ /dev/null @@ -1,121 +0,0 @@ -; File written on Thu Oct 5 23:44:34 2017 -; dnssec_signzone version 9.12.0a1 -prep.example. 300 IN SOA ns1.prep.example. hostmaster.prep.example. ( - 1 ; serial - 2000 ; refresh (33 minutes 20 seconds) - 2000 ; retry (33 minutes 20 seconds) - 1814400 ; expire (3 weeks) - 3600 ; minimum (1 hour) - ) - 300 RRSIG SOA 8 2 300 ( - 20171105054434 20171006054434 19260 prep.example. - 1fX0z7Swu4gMPews/ZE8bzNg+JXNedFBDGIH - PTSfVQtVLIvRWpME+PylX7MdVMZE/PST+x4/ - mWyveyjetEOo7/7aQL236FfI0y6TxQFy7HwC - FMieqoQCUluuKOvToxg4vUp4GOdlUGbqC63h - DbX5Z37VptJXLkt4niF4Kl2iD+U9/bk7HAEU - 4zDiKroYnusGKfVB9xAWddzoHdLxhVuPi7ut - 328suPdgX0bfs7uB+y4cikhGzAmPpNMlGHju - qYG74NcFGQNutLB7ayx/m87t7mTty7jbNKm3 - QWJSPf5IR8/kmzAi8HMnapY5vUmm+hX8JOfU - UtH7i0iEsUqRbEwu5A== ) - 300 NS ns1.prep.example. - 300 RRSIG NS 8 2 300 ( - 20171105054434 20171006054434 19260 prep.example. - u5sU2cfqNqIyCLw18ZNnFw28/GyRt0EOiPYS - dygmpfMDrvDaxjiiai8zWYjnl/E3qzVH9Zku - 07lEDORZdVb0uCDe1NynjAyw4AHps85cAwVc - 8HTSbzdVZsQTELpunYFJffh24PDr9unw7KOY - jzTP6qNedJ1uM54TOr177zfmBh7N2fkAoGyV - NjvTKrlgDYGNIn8/YMgHb4sNgyfe54MYY00f - kehVxfKnRCgDsbJ0Pk6jhBMCQWvOh8jG8WyV - ElAa/eMqlxUC1idF8ydWefjsI/7lPcjSalw9 - qZw4CDCLHHZy0TOSmCYRRZuIeVXzBfDPJyi4 - 2A3iLntKFJ4AOLFMJg== ) - 3600 NSEC ns1.prep.example. NS SOA RRSIG NSEC DNSKEY - 3600 RRSIG NSEC 8 2 3600 ( - 20171105054434 20171006054434 19260 prep.example. - Aed99/jdG82YAkKVWjoKOsAGtB3JnyKkCaAq - zgMrYkXU41y3KDCAmGzooGPQY7NN+WxX7FJ2 - 1nXkgljma/azgpsbi9ssneFtv7PPFClVmN+u - j+mM4MK/ZR7eJOsMqETg4PAO5VAh6c/GVmyA - RD/m6EhJVZEjPfLWbDoC4hVAgem7DP/NMjyI - GfztpDjMmyLQyv6tL+UEXSJHGp3ZEa5Z5i7X - Nl/bRTUlZs7L4rTgoqHv6LEmsXKAf9rZYq4b - eP6GF9I1Ry41MfHLc7lPUmtR38ErEsM5uGzw - trCQYEFhuRWUBxZ8OSL2EZK9rUBXZX+cwK/8 - ZP7mIfDfljkXPQcmow== ) - 3600 DNSKEY 256 3 8 ( - AwEAAfMzj6aZIgZDVcpH1pKOtq998E85+nEY - YJa0lLS8+QTCC1Efke8GLwsXT0IPTuwnOuXM - RjySirab0NuEr69T8KP/43YxcRdmCg89mjjN - szoVPPstC9xBKVOc0pRMDF7sfsTrSye3RY7+ - Z6uZEH5FOAkz2hNbJJHOn4HpNUhLPJGRauhf - 0evamwUmQ/mlhkVW5q4WmqPCDMNY3K6XtkEm - cvm8n9ZCXC9Z5AX6KpynujzLdKyxpdGqUk6r - lavp9ILPpRKoTZDX+2q1pDgP5cDndwtgNSvU - DBQZoD0psS2cyB3PHo+dPwwpEyM//ZSKsH9m - e85Ti0413TOWFyFd/jUOUA8= - ) ; ZSK; alg = RSASHA256 ; key id = 19260 - 3600 DNSKEY 257 3 8 ( - AwEAAbV8X06Qvk350aZ6eZ1d7WbT1H/Y0Sv7 - qAdbk5fbYIKpMvZ8D9xqoTHgD0z0uCgWWIcm - /xyKBfmax76oLwMBpR/kdtuJz0irgFITnJCH - pEfR9AJ/Mfm7NyMglq+/39I03E1/LXvpXQLG - tg+Mo/2CUE5sbG31jmPNK/2J8RMESkIi87fW - azZU/oyUEtECE5PGbdyw+4PacAsXNjnwl30T - aatL277wX4pt+IUPdE6EIph3t+dxXJ7OpHgW - 8g+YSHLlCImLVapdg3oD/cs6ncaBq9z7la5Y - dHNw2QAIAvQ11EsonrkonPqO6zNVZAVdT2VB - X5YzGAoCFUvbCvlnl2a7SxM= - ) ; KSK; alg = RSASHA256 ; key id = 65482 - 3600 RRSIG DNSKEY 8 2 3600 ( - 20171105054434 20171006054434 19260 prep.example. - pPw81pJ3PeF+tqEswTul9N8Qsl9JKgK4v8SV - lPfP0pnlMBMbtMFFkx5ZmhQg3Z3U8SdE64Bt - C5St3qItyyKdTQ0Rbm9mfV6twxDB8lVry8F7 - Pv7gJmmcWzBcbLGcrXIrVNSZhigkemQXTElj - P8y1j7kaNFWBWbDMn7KesiZ9BiC6sqvuKa3R - wSofjwXTESspWZP0NtXr5ymaBIMR9UtNj5Wh - jm1+tg6BxNBKxhCHlSC0ltPS/qq9J1ZUmtJz - sj/EAFfPVJVuEveebMvi1oDWPTgajO9+EHl4 - ELrgnQHCgaybMzbpd/A5+Tr1hQkv48I8Mb0/ - 8LJ2/6xrvJm64yRteg== ) - 3600 RRSIG DNSKEY 8 2 3600 ( - 20171105054434 20171006054434 65482 prep.example. - WeIWiC9SnBe2+UocVjpap62O8Rz+iljwJiu9 - VlGUwct3Vydq4/4FVAKdPklXV5cYbBLhO2MB - 3R4toX8RNU/0Ny8DnugQzLKvVfg0xoyU/UAJ - k4aWa/vPivSLGouLQPiNp71bdXN4LB/2xmzu - cPYXzS9ePpwCOp/9JLoNjBSMQkfjfWAcaNtj - 1DKDmHHL1sPMizninxSJLQOAKb+JwUAjAkOM - O1JqwkB12/IZuzxN5hly+uNsbFFxPzQkcnJ4 - 5bhzxuh5D/JRXW0nF5aO4aR+9X+lSUpDJQZ1 - 5fOt1cybZCn/ag68RA92zrnisdbrggJGS003 - wn/VKbLVfFj3eQrfNA== ) -ns1.prep.example. 300 IN A 1.1.1.1 - 300 RRSIG A 8 3 300 ( - 20171105054434 20171006054434 19260 prep.example. - QUyDyJVk3JGEq+VTZtY3firzsRqOA0LUm3Tf - /fnemQBeOlMda2ErA7DqYVriIGfM8jph416E - YX8SKAZXGEAlsEbC9cWBVyc5TYH6tZ43sV51 - 55kGTiUY92NnrH10Q+m2SLAEEaKCA/cgBwOR - tN2Wb1meHgiLbGYN2LbANfDQzoEk4AYAgT6r - wDKVVg/V9Ed7JnCnBQc9MN9+LQ3h4NBGUiEY - mr7HX2w+yzqcGFNLI1aFPe2IwFt120QPLyyl - cZgc6FUBX4YCnWoCb0aFyyOT76AQkKF5YBRn - gAv6S8q1pZ/0B5w4gjaLEGlts3LG0bxZ1GJd - gCQMEhgYgyXUchTtZA== ) - 3600 NSEC prep.example. A RRSIG NSEC - 3600 RRSIG NSEC 8 3 3600 ( - 20171105054434 20171006054434 19260 prep.example. - rDWN40u1a3DSzWOrS+4YR2XOxaem0BAQ/glN - QkXNDew1WsZo3fe0IHIhDKlJ/5MJAfAHq8Xs - A5UGUw2efoNAN/0LuWsI/9IPm4dwQOXiTCly - uxugXf5islPYyvn1Z14ay/7/2P3W6HZknXzo - lZFpwqfFZQCxz7c/1aH+2ntAMeqx8LHuewSr - Rz/sLsSiCcZQ6NMWnZdoC5SGy4CTcIIPPS8z - 9dQ6QYTC5iq4MKRfyJUyvODyU9be4e6jbo5b - mjRcov4ttbImhD5jrLAZIfjO6DSazGNVFf/x - 6rjxjrc8SISPkt2xYwcOlYch9OZuoH86wcZu - 3Don6yAnLDYDrZylAA== ) diff --git a/bin/tests/system/checkds/prep.example.ds.db b/bin/tests/system/checkds/prep.example.ds.db deleted file mode 100644 index dddcad6468..0000000000 --- a/bin/tests/system/checkds/prep.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -prep.example. IN DS 65482 8 1 F3673708FBADDEC3EB55933E2E393ACE85EAC2BB -prep.example. IN DS 65482 8 2 51A7C97AAC42803DA515D1CAFEE28031A5018F6345F12F4B6C1B6D20 02B59820 diff --git a/bin/tests/system/checkds/tests.sh b/bin/tests/system/checkds/tests.sh deleted file mode 100644 index b205d25cde..0000000000 --- a/bin/tests/system/checkds/tests.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if [ "$CYGWIN" ]; then - DIG=".\dig.bat" - WINDSFROMKEY=`cygpath -w $DSFROMKEY` - CHECKDS="$CHECKDS -a sha1 -a sha256 -d $DIG -D $WINDSFROMKEY" -else - DIG="./dig.sh" - CHECKDS="$CHECKDS -a sha1 -a sha256 -d $DIG -D $DSFROMKEY" -fi -chmod +x $DIG - -status=0 -n=1 - -echo_i "checking for correct DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS ok.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for correct DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f ok.example.dnskey.db ok.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for incorrect DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS wrong.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for incorrect DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f wrong.example.dnskey.db wrong.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for partially missing DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS missing.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for partially missing DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f missing.example.dnskey.db missing.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for entirely missing DS, looking up key via 'dig' ($n)" -ret=0 -$CHECKDS none.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking for entirely missing DS, obtaining key from file ($n)" -ret=0 -$CHECKDS -f none.example.dnskey.db none.example > checkds.out.$n 2>&1 && ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 && ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -echo_i "checking with prepared dsset file ($n)" -ret=0 -$CHECKDS -f prep.example.db -s prep.example.ds.db prep.example > checkds.out.$n 2>&1 || ret=1 -grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -if [ $status = 0 ]; then $SHELL clean.sh; fi -echo_i "exit status: $status" -[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/checkds/wrong.example.dnskey.db b/bin/tests/system/checkds/wrong.example.dnskey.db deleted file mode 100644 index cc5bfd6fa1..0000000000 --- a/bin/tests/system/checkds/wrong.example.dnskey.db +++ /dev/null @@ -1,2 +0,0 @@ -wrong.example. 3600 IN DNSKEY 257 3 5 AwEAAc6Cz10GXEh5lxA9ujTY/QarTajcUOBwwBYIeldjRsgoouK/UioY FYgxEFL0O5JK6YCRUoGzl3EgLr5GvNyhIp1PZpOpHf7o/4MVOZTGJzm/ sHWP5B+KcYjQOxJiDb433iCmRM4DpHPUUoxw0QbZglzAzl5MfKBoyZud lH59DdT/50bkBg8iVu35EzuW0SYt31k70hxHBSb2wAGWeqxEPKJ1nQiI UcrWNDeem7byrqjPN9wyZhq0XkQ9qbcYxAkRNd8Y7P0FyR1YKJMc6SWZ Ru7muvxqTHgCtJVgxVz4qndCFKdYidiDeKe2/X/z5gf7pyYl3549O8JR tWdNKqutppk= -wrong.example. 3600 IN DNSKEY 256 3 5 BQEAAAAB2F1v2HWzCCE9vNsKfk0K8vd4EBwizNT9KO6WYXj0oxEL4eOJ aXbax/BzPFx+3qO8B8pu8E/JjkWH0oaYz4guUyTVmT5Eelg44Vb1kssy q8W27oQ+9qNiP8Jv6zdOj0uCB/N0fxfVL3371xbednFqoECfSFDZa6Hw jU1qzveSsW0= diff --git a/bin/tests/system/checkds/wrong.example.ds.db b/bin/tests/system/checkds/wrong.example.ds.db deleted file mode 100644 index d7df6104a2..0000000000 --- a/bin/tests/system/checkds/wrong.example.ds.db +++ /dev/null @@ -1,2 +0,0 @@ -wrong.example. 3600 IN DS 1192 5 1 684BB5119673C9272A0A7582AF8576561B5D80EC -wrong.example. 3600 IN DS 1192 5 2 14E4A873360E512CD2E8C2C331C4472F5EDAB0736669901F4D42E976 3D7B1F5C diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 1ea6a273c5..5bd08cc8d6 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -29,9 +29,7 @@ CYGWIN="" ARPANAME=$TOP/bin/tools/arpaname CDS=$TOP/bin/dnssec/dnssec-cds CHECKCONF=$TOP/bin/check/named-checkconf -CHECKDS=$TOP/bin/python/dnssec-checkds CHECKZONE=$TOP/bin/check/named-checkzone -COVERAGE=$TOP/bin/python/dnssec-coverage DDNSCONFGEN=$TOP/bin/confgen/ddns-confgen DELV=$TOP/bin/delv/delv DIG=$TOP/bin/dig/dig @@ -44,7 +42,6 @@ IMPORTKEY=$TOP/bin/dnssec/dnssec-importkey JOURNALPRINT=$TOP/bin/tools/named-journalprint KEYFRLAB=$TOP/bin/dnssec/dnssec-keyfromlabel KEYGEN=$TOP/bin/dnssec/dnssec-keygen -KEYMGR=$TOP/bin/python/dnssec-keymgr MDIG=$TOP/bin/tools/mdig NAMED=$TOP/bin/named/named NSEC3HASH=$TOP/bin/tools/nsec3hash @@ -82,7 +79,7 @@ KRB5_CONFIG=/dev/null SEQUENTIAL_UNIX="@PKCS11_TEST@" SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_UNIX" -PARALLEL_UNIX="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@ logfileconfig" +PARALLEL_UNIX="@DNSTAP@ logfileconfig" PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_UNIX" SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS" diff --git a/bin/tests/system/conf.sh.win32 b/bin/tests/system/conf.sh.win32 index be55dd8eda..0b66f72b15 100644 --- a/bin/tests/system/conf.sh.win32 +++ b/bin/tests/system/conf.sh.win32 @@ -33,9 +33,7 @@ VSCONF=${VSCONF:-Debug} ARPANAME=$TOP/Build/$VSCONF/arpaname@EXEEXT@ CDS=$TOP/Build/$VSCONF/dnssec-cds@EXEEXT@ CHECKCONF=$TOP/Build/$VSCONF/named-checkconf@EXEEXT@ -CHECKDS="$PYTHON `cygpath -w $TOP/bin/python/dnssec-checkds.py`" CHECKZONE=$TOP/Build/$VSCONF/named-checkzone@EXEEXT@ -COVERAGE="$PYTHON `cygpath -w $TOP/bin/python/dnssec-coverage.py`" DDNSCONFGEN=$TOP/Build/$VSCONF/ddns-confgen@EXEEXT@ DELV=$TOP/Build/$VSCONF/delv@EXEEXT@ DIG=$TOP/Build/$VSCONF/dig@EXEEXT@ @@ -47,7 +45,6 @@ IMPORTKEY=$TOP/Build/$VSCONF/dnssec-importkey@EXEEXT@ JOURNALPRINT=$TOP/Build/$VSCONF/named-journalprint@EXEEXT@ KEYFRLAB=$TOP/Build/$VSCONF/dnssec-keyfromlabel@EXEEXT@ KEYGEN=$TOP/Build/$VSCONF/dnssec-keygen@EXEEXT@ -KEYMGR="$PYTHON `cygpath -w $TOP/bin/python/dnssec-keymgr.py`" MDIG=$TOP/Build/$VSCONF/mdig@EXEEXT@ NAMED=$TOP/Build/$VSCONF/named@EXEEXT@ NSEC3HASH=$TOP/Build/$VSCONF/nsec3hash@EXEEXT@ @@ -88,7 +85,7 @@ KRB5_CONFIG=NUL SEQUENTIAL_WINDOWS="" SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_WINDOWS" -PARALLEL_WINDOWS="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@" +PARALLEL_WINDOWS="@DNSTAP@" PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_WINDOWS" SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS" diff --git a/bin/tests/system/coverage/01-ksk-inactive/README b/bin/tests/system/coverage/01-ksk-inactive/README deleted file mode 100644 index 81025936f9..0000000000 --- a/bin/tests/system/coverage/01-ksk-inactive/README +++ /dev/null @@ -1,10 +0,0 @@ -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-31-Jul (20:59:14): - Inactive: example.com/007/45435 (KSK) -No KSK's are active - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/01-ksk-inactive/expect b/bin/tests/system/coverage/01-ksk-inactive/expect deleted file mode 100644 index 3d342b1a2b..0000000000 --- a/bin/tests/system/coverage/01-ksk-inactive/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-d 1h -m 2h" -warn=0 -error=1 -ok=1 -retcode=1 -match="No KSK's are active" diff --git a/bin/tests/system/coverage/02-zsk-inactive/README b/bin/tests/system/coverage/02-zsk-inactive/README deleted file mode 100644 index 5d3fed1245..0000000000 --- a/bin/tests/system/coverage/02-zsk-inactive/README +++ /dev/null @@ -1,10 +0,0 @@ -This set includes one ZSK rollover. The first ZSK is deactivated -prior to its replacement being activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK - -Checking ZSK events for zone example.com, algorithm 7: -ERROR: After 2012-05-Dec (20:39:32): - Inactive: example.com/005/08376 (ZSK) -No ZSK's are active diff --git a/bin/tests/system/coverage/02-zsk-inactive/expect b/bin/tests/system/coverage/02-zsk-inactive/expect deleted file mode 100644 index a905b585d4..0000000000 --- a/bin/tests/system/coverage/02-zsk-inactive/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-d 1h -m 2h" -warn=0 -error=1 -ok=1 -retcode=1 -match="No ZSK's are active" diff --git a/bin/tests/system/coverage/03-ksk-unpublished/README b/bin/tests/system/coverage/03-ksk-unpublished/README deleted file mode 100644 index 7d8a3015a5..0000000000 --- a/bin/tests/system/coverage/03-ksk-unpublished/README +++ /dev/null @@ -1,10 +0,0 @@ -This set contains one KSK rollover. The KSK is unpublished before its -successor is published. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-06-Oct (21:07:57): - Delete: example.com/007/23040 (KSK) -No KSK's are published - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/03-ksk-unpublished/expect b/bin/tests/system/coverage/03-ksk-unpublished/expect deleted file mode 100644 index 07bbff11d9..0000000000 --- a/bin/tests/system/coverage/03-ksk-unpublished/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (KSK) is scheduled for -deletion before inactivation -No KSK's are published" diff --git a/bin/tests/system/coverage/04-zsk-unpublished/README b/bin/tests/system/coverage/04-zsk-unpublished/README deleted file mode 100644 index 5077abfd45..0000000000 --- a/bin/tests/system/coverage/04-zsk-unpublished/README +++ /dev/null @@ -1,10 +0,0 @@ -This set contains one ZSK rollover. The ZSK is unpublished before its -successor is published. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK - -Checking ZSK events for zone example.com, algorithm 7: -ERROR: After 2012-06-Oct (21:13:45): - Delete: example.com/007/25967 (ZSK) -No ZSK's are published diff --git a/bin/tests/system/coverage/04-zsk-unpublished/expect b/bin/tests/system/coverage/04-zsk-unpublished/expect deleted file mode 100644 index 450ec24bff..0000000000 --- a/bin/tests/system/coverage/04-zsk-unpublished/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (ZSK) is scheduled for -deletion before inactivation -No ZSK's are published" diff --git a/bin/tests/system/coverage/05-ksk-unpub-active/README b/bin/tests/system/coverage/05-ksk-unpub-active/README deleted file mode 100644 index 119c1b2dac..0000000000 --- a/bin/tests/system/coverage/05-ksk-unpub-active/README +++ /dev/null @@ -1,12 +0,0 @@ -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-05-Dec (21:22:19): - Delete: example.com/007/06219 (KSK) - Publish: example.com/007/20559 (KSK) -No KSK's are both active and published - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/05-ksk-unpub-active/expect b/bin/tests/system/coverage/05-ksk-unpub-active/expect deleted file mode 100644 index 2edfa0e76e..0000000000 --- a/bin/tests/system/coverage/05-ksk-unpub-active/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (KSK) is scheduled for -deletion before inactivation -No KSK's are both active and published" diff --git a/bin/tests/system/coverage/06-zsk-unpub-active/README b/bin/tests/system/coverage/06-zsk-unpub-active/README deleted file mode 100644 index 84833f8431..0000000000 --- a/bin/tests/system/coverage/06-zsk-unpub-active/README +++ /dev/null @@ -1,12 +0,0 @@ -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK - -Checking ZSK events for zone example.com, algorithm 7: -ERROR: After 2012-05-Dec (20:44:18): - Delete: example.com/007/26369 (ZSK) - Publish: example.com/007/21029 (ZSK) -No ZSK's are both active and published diff --git a/bin/tests/system/coverage/06-zsk-unpub-active/expect b/bin/tests/system/coverage/06-zsk-unpub-active/expect deleted file mode 100644 index 0ef5b151e6..0000000000 --- a/bin/tests/system/coverage/06-zsk-unpub-active/expect +++ /dev/null @@ -1,8 +0,0 @@ -args="-d 1h -m 2h" -warn=1 -error=1 -ok=1 -retcode=1 -match="WARNING: Key .* (ZSK) is scheduled for -deletion before inactivation -No ZSK's are both active and published" diff --git a/bin/tests/system/coverage/07-ksk-ttl/README b/bin/tests/system/coverage/07-ksk-ttl/README deleted file mode 100644 index 265909921b..0000000000 --- a/bin/tests/system/coverage/07-ksk-ttl/README +++ /dev/null @@ -1,4 +0,0 @@ -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. - -Expected tool output TBD. diff --git a/bin/tests/system/coverage/07-ksk-ttl/expect b/bin/tests/system/coverage/07-ksk-ttl/expect deleted file mode 100644 index eade21a75f..0000000000 --- a/bin/tests/system/coverage/07-ksk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -args="-d 1w -m 2w" -warn=1 -error=0 -ok=2 -retcode=0 -match="WARNING: Key .* (KSK) is activated too soon -after publication -Activation should be at least 7 days after -publication." diff --git a/bin/tests/system/coverage/08-zsk-ttl/README b/bin/tests/system/coverage/08-zsk-ttl/README deleted file mode 100644 index 265909921b..0000000000 --- a/bin/tests/system/coverage/08-zsk-ttl/README +++ /dev/null @@ -1,4 +0,0 @@ -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. - -Expected tool output TBD. diff --git a/bin/tests/system/coverage/08-zsk-ttl/expect b/bin/tests/system/coverage/08-zsk-ttl/expect deleted file mode 100644 index 150c9cdc8f..0000000000 --- a/bin/tests/system/coverage/08-zsk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -args="-d 1w -m 2w" -warn=1 -error=0 -ok=2 -retcode=0 -match="WARNING: Key .* (ZSK) is activated too soon -after publication -Activation should be at least 7 days after -publication." diff --git a/bin/tests/system/coverage/09-check-zsk/README b/bin/tests/system/coverage/09-check-zsk/README deleted file mode 100644 index bc5edc813c..0000000000 --- a/bin/tests/system/coverage/09-check-zsk/README +++ /dev/null @@ -1,6 +0,0 @@ -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated; however, as we are only checking ZSK's, -we should not detect the error. Tool output should resemble: - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/09-check-zsk/expect b/bin/tests/system/coverage/09-check-zsk/expect deleted file mode 100644 index d56c4bfb98..0000000000 --- a/bin/tests/system/coverage/09-check-zsk/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-z -d 1h -m 2h" -warn=0 -error=0 -ok=1 -retcode=0 -match="" diff --git a/bin/tests/system/coverage/10-check-ksk/README b/bin/tests/system/coverage/10-check-ksk/README deleted file mode 100644 index 948364d997..0000000000 --- a/bin/tests/system/coverage/10-check-ksk/README +++ /dev/null @@ -1,7 +0,0 @@ -This set includes one ZSK rollover. The first ZSK is deactivated -prior to its replacement being activated; however, as we are only -checking KSKs, we should not detect the error. Tool output should -resemble: - -Checking KSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/10-check-ksk/expect b/bin/tests/system/coverage/10-check-ksk/expect deleted file mode 100644 index a03d2aa2e9..0000000000 --- a/bin/tests/system/coverage/10-check-ksk/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-k -d 1h -m 2h" -warn=0 -error=0 -ok=1 -retcode=0 -match="" diff --git a/bin/tests/system/coverage/11-cutoff/README b/bin/tests/system/coverage/11-cutoff/README deleted file mode 100644 index 81025936f9..0000000000 --- a/bin/tests/system/coverage/11-cutoff/README +++ /dev/null @@ -1,10 +0,0 @@ -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated. Tool output should resemble: - -Checking KSK events for zone example.com, algorithm 7: -ERROR: After 2012-31-Jul (20:59:14): - Inactive: example.com/007/45435 (KSK) -No KSK's are active - -Checking ZSK events for zone example.com, algorithm 7: -OK diff --git a/bin/tests/system/coverage/11-cutoff/expect b/bin/tests/system/coverage/11-cutoff/expect deleted file mode 100644 index bdf29d026d..0000000000 --- a/bin/tests/system/coverage/11-cutoff/expect +++ /dev/null @@ -1,6 +0,0 @@ -args="-l 1y -d 1h -m 2h" -warn=0 -error=0 -ok=2 -retcode=0 -match="" diff --git a/bin/tests/system/coverage/12-ksk-deletion/expect b/bin/tests/system/coverage/12-ksk-deletion/expect deleted file mode 100644 index 898c0bf0ba..0000000000 --- a/bin/tests/system/coverage/12-ksk-deletion/expect +++ /dev/null @@ -1,6 +0,0 @@ -args= -warn=4 -error=1 -ok=1 -retcode=1 -match=0 diff --git a/bin/tests/system/coverage/13-dotted-dotless/expect b/bin/tests/system/coverage/13-dotted-dotless/expect deleted file mode 100644 index 5760d298df..0000000000 --- a/bin/tests/system/coverage/13-dotted-dotless/expect +++ /dev/null @@ -1,7 +0,0 @@ -args="-z -m2h" -warn=0 -error=0 -ok=2 -retcode=0 -match= -zones="one.example. two.example" diff --git a/bin/tests/system/coverage/clean.sh b/bin/tests/system/coverage/clean.sh deleted file mode 100644 index 9917e2e24f..0000000000 --- a/bin/tests/system/coverage/clean.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -rm -f named-compilezone -rm -f */K*.key -rm -f */K*.private -rm -rf coverage.* -rm -rf dotted-dotless -rm -f ns*/named.lock diff --git a/bin/tests/system/coverage/setup.sh b/bin/tests/system/coverage/setup.sh deleted file mode 100644 index bfb63c8c28..0000000000 --- a/bin/tests/system/coverage/setup.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -$SHELL clean.sh - -ln -s $CHECKZONE named-compilezone - -# Test 1: KSK goes inactive before successor is active -dir=01-ksk-inactive -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -$SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 2: ZSK goes inactive before successor is active -dir=02-zsk-inactive -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 3: KSK is unpublished before its successor is published -dir=03-ksk-unpublished -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -$SETTIME -K $dir -D +6mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 4: ZSK is unpublished before its successor is published -dir=04-zsk-unpublished -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -D +6mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 5: KSK deleted and successor published before KSK is deactivated -# and successor activated. -dir=05-ksk-unpub-active -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 6: ZSK deleted and successor published before ZSK is deactivated -# and successor activated. -dir=06-zsk-unpub-active -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 7: KSK rolled with insufficient delay after prepublication. -dir=07-ksk-ttl -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -# allow only 1 day between publication and activation -$SETTIME -K $dir -P +269d $ksk2 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 8: ZSK rolled with insufficient delay after prepublication. -dir=08-zsk-ttl -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -# allow only 1 day between publication and activation -$SETTIME -K $dir -P +269d $zsk2 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 9: KSK goes inactive before successor is active, but checking ZSKs -dir=09-check-zsk -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -q -K $dir -S $ksk1` -$SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` - -# Test 10: ZSK goes inactive before successor is active, but checking KSKs -dir=10-check-ksk -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 11: ZSK goes inactive before successor is active, but after cutoff -dir=11-cutoff -zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -q -K $dir -S $zsk1` -$SETTIME -K $dir -I +16mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` - -# Test 12: Too early KSK deletion -dir=12-ksk-deletion -ksk1=`$KEYGEN -q -K $dir -f KSK -a 8 -b 2048 -I +40d -D +40d example.com` -ksk2=`$KEYGEN -q -K $dir -S $ksk1.key example.com` - -# Test 13: check names with/without dots at the end -dir=13-dotted-dotless -zsk1=`$KEYGEN -q -K $dir -a rsasha256 one.example` -zsk2=`$KEYGEN -q -K $dir -a rsasha256 two.example` diff --git a/bin/tests/system/coverage/tests.sh b/bin/tests/system/coverage/tests.sh deleted file mode 100644 index 7434358558..0000000000 --- a/bin/tests/system/coverage/tests.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -COVERAGE="$COVERAGE -c ./named-compilezone" - -status=0 -n=1 - -matchall () { - file=$1 - echo "$2" | while read matchline; do - grep "$matchline" $file > /dev/null 2>&1 || { - echo "FAIL" - return - } - done -} - -echo_i "checking for DNSSEC key coverage issues" -ret=0 -for dir in [0-9][0-9]-*; do - ret=0 - echo_i "$dir" - args= warn= error= ok= retcode= match= zones= - . $dir/expect - $COVERAGE $args -K $dir ${zones:-example.com} > coverage.$n 2>&1 - - # check that return code matches expectations - found=$? - if [ $found -ne $retcode ]; then - echo "retcode was $found expected $retcode" - ret=1 - fi - - # check for correct number of errors - found=`grep ERROR coverage.$n | wc -l` - if [ $found -ne $error ]; then - echo "error count was $found expected $error" - ret=1 - fi - - # check for correct number of warnings - found=`grep WARNING coverage.$n | wc -l` - if [ $found -ne $warn ]; then - echo "warning count was $found expected $warn" - ret=1 - fi - - # check for correct number of OKs - found=`grep "No errors found" coverage.$n | wc -l` - if [ $found -ne $ok ]; then - echo "good count was $found expected $ok" - ret=1 - fi - - found=`matchall coverage.$n "$match"` - if [ "$found" = "FAIL" ]; then - echo "no match on '$match'" - ret=1 - fi - - found=`grep Traceback coverage.$n | wc -l` - if [ $found -ne 0 ]; then - echo "python exception detected" - ret=1 - fi - - n=`expr $n + 1` - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` -done - -echo_i "exit status: $status" -[ $status -eq 0 ] || exit 1 diff --git a/bin/tests/system/keymgr/01-ksk-inactive/README b/bin/tests/system/keymgr/01-ksk-inactive/README deleted file mode 100644 index b91a675763..0000000000 --- a/bin/tests/system/keymgr/01-ksk-inactive/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one KSK rollover. The KSK is deactivated prior to -its replacement being activated. diff --git a/bin/tests/system/keymgr/01-ksk-inactive/expect b/bin/tests/system/keymgr/01-ksk-inactive/expect deleted file mode 100644 index bf908e7c21..0000000000 --- a/bin/tests/system/keymgr/01-ksk-inactive/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/02-zsk-inactive/README b/bin/tests/system/keymgr/02-zsk-inactive/README deleted file mode 100644 index 9d1e17f554..0000000000 --- a/bin/tests/system/keymgr/02-zsk-inactive/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one ZSK rollover. The first ZSK is deactivated -prior to its replacement being activated. diff --git a/bin/tests/system/keymgr/02-zsk-inactive/expect b/bin/tests/system/keymgr/02-zsk-inactive/expect deleted file mode 100644 index bf908e7c21..0000000000 --- a/bin/tests/system/keymgr/02-zsk-inactive/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/03-ksk-unpublished/README b/bin/tests/system/keymgr/03-ksk-unpublished/README deleted file mode 100644 index 513e9bda0a..0000000000 --- a/bin/tests/system/keymgr/03-ksk-unpublished/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set contains one KSK rollover. The KSK is unpublished before its -successor is published. diff --git a/bin/tests/system/keymgr/03-ksk-unpublished/expect b/bin/tests/system/keymgr/03-ksk-unpublished/expect deleted file mode 100644 index bf908e7c21..0000000000 --- a/bin/tests/system/keymgr/03-ksk-unpublished/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/04-zsk-unpublished/README b/bin/tests/system/keymgr/04-zsk-unpublished/README deleted file mode 100644 index a518556385..0000000000 --- a/bin/tests/system/keymgr/04-zsk-unpublished/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set contains one ZSK rollover. The ZSK is unpublished before its -successor is published. diff --git a/bin/tests/system/keymgr/04-zsk-unpublished/expect b/bin/tests/system/keymgr/04-zsk-unpublished/expect deleted file mode 100644 index bf908e7c21..0000000000 --- a/bin/tests/system/keymgr/04-zsk-unpublished/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/05-ksk-unpub-active/README b/bin/tests/system/keymgr/05-ksk-unpub-active/README deleted file mode 100644 index e6a194b6fb..0000000000 --- a/bin/tests/system/keymgr/05-ksk-unpub-active/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. diff --git a/bin/tests/system/keymgr/05-ksk-unpub-active/expect b/bin/tests/system/keymgr/05-ksk-unpub-active/expect deleted file mode 100644 index bf908e7c21..0000000000 --- a/bin/tests/system/keymgr/05-ksk-unpub-active/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/06-zsk-unpub-active/README b/bin/tests/system/keymgr/06-zsk-unpub-active/README deleted file mode 100644 index e6a194b6fb..0000000000 --- a/bin/tests/system/keymgr/06-zsk-unpub-active/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes one KSK rollover. The first KSK is deleted -and its successor published prior to the first KSK being deactivated -and its successor activated. diff --git a/bin/tests/system/keymgr/06-zsk-unpub-active/expect b/bin/tests/system/keymgr/06-zsk-unpub-active/expect deleted file mode 100644 index bf908e7c21..0000000000 --- a/bin/tests/system/keymgr/06-zsk-unpub-active/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 2h example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/07-ksk-ttl/README b/bin/tests/system/keymgr/07-ksk-ttl/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/07-ksk-ttl/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/07-ksk-ttl/expect b/bin/tests/system/keymgr/07-ksk-ttl/expect deleted file mode 100644 index 03d719c3f4..0000000000 --- a/bin/tests/system/keymgr/07-ksk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/08-zsk-ttl/README b/bin/tests/system/keymgr/08-zsk-ttl/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/08-zsk-ttl/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/08-zsk-ttl/expect b/bin/tests/system/keymgr/08-zsk-ttl/expect deleted file mode 100644 index 03d719c3f4..0000000000 --- a/bin/tests/system/keymgr/08-zsk-ttl/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/09-no-keys/README b/bin/tests/system/keymgr/09-no-keys/README deleted file mode 100644 index 5f4d53ab49..0000000000 --- a/bin/tests/system/keymgr/09-no-keys/README +++ /dev/null @@ -1,5 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has no key set, but one will be initialized by dnssec-keymgr. diff --git a/bin/tests/system/keymgr/09-no-keys/expect b/bin/tests/system/keymgr/09-no-keys/expect deleted file mode 100644 index 03d719c3f4..0000000000 --- a/bin/tests/system/keymgr/09-no-keys/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/10-change-roll/README b/bin/tests/system/keymgr/10-change-roll/README deleted file mode 100644 index 8cf6f4e6a6..0000000000 --- a/bin/tests/system/keymgr/10-change-roll/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has a key set which is valid, but has a ZSK rollover period -of only three months. It will be updated to have a ZSK rollover period of -one year. diff --git a/bin/tests/system/keymgr/10-change-roll/expect b/bin/tests/system/keymgr/10-change-roll/expect deleted file mode 100644 index 03d719c3f4..0000000000 --- a/bin/tests/system/keymgr/10-change-roll/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/11-many-simul/README b/bin/tests/system/keymgr/11-many-simul/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/11-many-simul/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/11-many-simul/expect b/bin/tests/system/keymgr/11-many-simul/expect deleted file mode 100644 index 03d719c3f4..0000000000 --- a/bin/tests/system/keymgr/11-many-simul/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/12-many-active/README b/bin/tests/system/keymgr/12-many-active/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/12-many-active/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/12-many-active/expect b/bin/tests/system/keymgr/12-many-active/expect deleted file mode 100644 index 67fc4e912c..0000000000 --- a/bin/tests/system/keymgr/12-many-active/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="-f example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/13-noroll/README b/bin/tests/system/keymgr/13-noroll/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/13-noroll/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/13-noroll/expect b/bin/tests/system/keymgr/13-noroll/expect deleted file mode 100644 index 67fc4e912c..0000000000 --- a/bin/tests/system/keymgr/13-noroll/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="-f example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/14-wrongalg/README b/bin/tests/system/keymgr/14-wrongalg/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/14-wrongalg/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/14-wrongalg/expect b/bin/tests/system/keymgr/14-wrongalg/expect deleted file mode 100644 index bd5eadbf7a..0000000000 --- a/bin/tests/system/keymgr/14-wrongalg/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=4 diff --git a/bin/tests/system/keymgr/15-unspec/README b/bin/tests/system/keymgr/15-unspec/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/15-unspec/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/15-unspec/expect b/bin/tests/system/keymgr/15-unspec/expect deleted file mode 100644 index ad300c498c..0000000000 --- a/bin/tests/system/keymgr/15-unspec/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/16-wrongalg-unspec/README b/bin/tests/system/keymgr/16-wrongalg-unspec/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/16-wrongalg-unspec/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/16-wrongalg-unspec/expect b/bin/tests/system/keymgr/16-wrongalg-unspec/expect deleted file mode 100644 index c836535ce8..0000000000 --- a/bin/tests/system/keymgr/16-wrongalg-unspec/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="" -kmatch="" -kret=0 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=4 diff --git a/bin/tests/system/keymgr/17-noforce/README b/bin/tests/system/keymgr/17-noforce/README deleted file mode 100644 index 791b6d3848..0000000000 --- a/bin/tests/system/keymgr/17-noforce/README +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This set includes a KSK rollover, with insufficient delay between -prepublication and rollover. diff --git a/bin/tests/system/keymgr/17-noforce/expect b/bin/tests/system/keymgr/17-noforce/expect deleted file mode 100644 index 029a4e903a..0000000000 --- a/bin/tests/system/keymgr/17-noforce/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=1 -cargs="-d 1w -m 2w example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/18-nonstd-prepub/README b/bin/tests/system/keymgr/18-nonstd-prepub/README deleted file mode 100644 index fc1aacae93..0000000000 --- a/bin/tests/system/keymgr/18-nonstd-prepub/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has a key set which is valid, but will expire within -the rollover period. The prepublication interval in policy.conf is a -nonstandard value. diff --git a/bin/tests/system/keymgr/18-nonstd-prepub/expect b/bin/tests/system/keymgr/18-nonstd-prepub/expect deleted file mode 100644 index e8518d8c3a..0000000000 --- a/bin/tests/system/keymgr/18-nonstd-prepub/expect +++ /dev/null @@ -1,9 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 1d example.com" -cmatch="" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/18-nonstd-prepub/policy.conf b/bin/tests/system/keymgr/18-nonstd-prepub/policy.conf deleted file mode 100644 index 91817ff41b..0000000000 --- a/bin/tests/system/keymgr/18-nonstd-prepub/policy.conf +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -policy default { - policy global; - algorithm nsec3rsasha1; - pre-publish zsk 2w; - roll-period zsk 6mo; - coverage 364d; -}; diff --git a/bin/tests/system/keymgr/19-old-keys/README b/bin/tests/system/keymgr/19-old-keys/README deleted file mode 100644 index 424b70c4f5..0000000000 --- a/bin/tests/system/keymgr/19-old-keys/README +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - -This directory has a key set which is valid, but which was published -and activated more than one rollover period ago. dnssec-keymgr should -not mark the keys as already being inactive and deleted. diff --git a/bin/tests/system/keymgr/19-old-keys/expect b/bin/tests/system/keymgr/19-old-keys/expect deleted file mode 100644 index ad73b536c9..0000000000 --- a/bin/tests/system/keymgr/19-old-keys/expect +++ /dev/null @@ -1,12 +0,0 @@ -kargs="example.com" -kmatch="" -kret=0 -cargs="-d 1h -m 1w example.com" -cmatch="4,Publish -4,Activate -2,Inactive -2,Delete" -cret=0 -warn=0 -error=0 -ok=2 diff --git a/bin/tests/system/keymgr/19-old-keys/extra.sh b/bin/tests/system/keymgr/19-old-keys/extra.sh deleted file mode 100644 index 8da6aa1329..0000000000 --- a/bin/tests/system/keymgr/19-old-keys/extra.sh +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -now=`$PERL -e 'print time()."\n";'` -for keyfile in K*.key; do - inactive=`$SETTIME -upI $keyfile | awk '{print $2}'` - if [ "$inactive" = UNSET ]; then - continue - elif [ "$inactive" -lt "$now" ]; then - echo_d "inactive date is in the past" - ret=1 - fi -done diff --git a/bin/tests/system/keymgr/19-old-keys/policy.conf b/bin/tests/system/keymgr/19-old-keys/policy.conf deleted file mode 100644 index 91817ff41b..0000000000 --- a/bin/tests/system/keymgr/19-old-keys/policy.conf +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -policy default { - policy global; - algorithm nsec3rsasha1; - pre-publish zsk 2w; - roll-period zsk 6mo; - coverage 364d; -}; diff --git a/bin/tests/system/keymgr/clean.sh b/bin/tests/system/keymgr/clean.sh deleted file mode 100644 index 3f7f658f70..0000000000 --- a/bin/tests/system/keymgr/clean.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -rm -f K*.key */K*.key -rm -f K*.private */K*.private -rm -f coverage.* keymgr.* settime.* -rm -f ns*/managed-keys.bind* -rm -f policy.out diff --git a/bin/tests/system/keymgr/policy.conf b/bin/tests/system/keymgr/policy.conf deleted file mode 100644 index 4da487a61d..0000000000 --- a/bin/tests/system/keymgr/policy.conf +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -policy default { - policy global; - algorithm nsec3rsasha1; - key-size zsk 1024; - pre-publish zsk 6w; - post-publish zsk 6w; - roll-period zsk 6mo; - roll-period ksk 0; - coverage 364d; -}; diff --git a/bin/tests/system/keymgr/policy.good b/bin/tests/system/keymgr/policy.good deleted file mode 100644 index eb23246214..0000000000 --- a/bin/tests/system/keymgr/policy.good +++ /dev/null @@ -1,187 +0,0 @@ -policy default: - inherits global - directory None - algorithm None - coverage None - ksk_keysize None - zsk_keysize None - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -policy global: - inherits None - directory None - algorithm RSASHA256 - coverage 15552000 - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod None - zsk_rollperiod 31536000 - ksk_prepublish 2592000 - ksk_postpublish 2592000 - zsk_prepublish 2592000 - zsk_postpublish 2592000 - ksk_standby None - zsk_standby None - keyttl 3600 - -constructed policy example.com: - inherits global - directory None - algorithm RSASHA256 - coverage 15552000 - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod None - zsk_rollperiod 31536000 - ksk_prepublish 2592000 - ksk_postpublish 2592000 - zsk_prepublish 2592000 - zsk_postpublish 2592000 - ksk_standby None - zsk_standby None - keyttl 3600 - -policy default: - inherits None - directory "keydir" - algorithm RSASHA1 - coverage 31536000 - ksk_keysize None - zsk_keysize None - ksk_rollperiod None - zsk_rollperiod 15552000 - ksk_prepublish None - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 3628800 - ksk_standby None - zsk_standby None - keyttl 3600 - -zone policy example.com: - inherits extra - directory "keydir" - algorithm NSEC3RSASHA1 - coverage 12960000 - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod 31536000 - zsk_rollperiod 7776000 - ksk_prepublish 7776000 - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 604800 - ksk_standby None - zsk_standby None - keyttl 7200 - -constructed policy example.org: - inherits None - directory "keydir" - algorithm RSASHA1 - coverage 31536000 - ksk_keysize 2048 - zsk_keysize 1024 - ksk_rollperiod None - zsk_rollperiod 15552000 - ksk_prepublish None - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 3628800 - ksk_standby None - zsk_standby None - keyttl 3600 - -constructed policy example.net: - inherits None - directory "keydir" - algorithm RSASHA1 - coverage 31536000 - ksk_keysize 2048 - zsk_keysize 1024 - ksk_rollperiod None - zsk_rollperiod 15552000 - ksk_prepublish None - ksk_postpublish None - zsk_prepublish 3628800 - zsk_postpublish 3628800 - ksk_standby None - zsk_standby None - keyttl 3600 - -algorithm policy RSASHA1: - inherits None - directory None - algorithm None - coverage None - ksk_keysize 2048 - zsk_keysize 1024 - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -algorithm policy RSASHA256: - inherits None - directory None - algorithm RSASHA256 - coverage None - ksk_keysize 2048 - zsk_keysize 2048 - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -algorithm policy ECDSAP256SHA256: - inherits None - directory None - algorithm ECDSAP256SHA256 - coverage None - ksk_keysize None - zsk_keysize None - ksk_rollperiod None - zsk_rollperiod None - ksk_prepublish None - ksk_postpublish None - zsk_prepublish None - zsk_postpublish None - ksk_standby None - zsk_standby None - keyttl None - -policy extra: - inherits default - directory None - algorithm None - coverage 157680000 - ksk_keysize None - zsk_keysize None - ksk_rollperiod 31536000 - zsk_rollperiod 7776000 - ksk_prepublish 7776000 - ksk_postpublish None - zsk_prepublish None - zsk_postpublish 604800 - ksk_standby None - zsk_standby None - keyttl 7200 - diff --git a/bin/tests/system/keymgr/policy.sample b/bin/tests/system/keymgr/policy.sample deleted file mode 100644 index 4594091fa8..0000000000 --- a/bin/tests/system/keymgr/policy.sample +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -# a comment which should be skipped - -algorithm-policy rsasha1 { - key-size ksk 2048; - key-size zsk 1024; // this too -}; - -// and this - -policy default { - directory "keydir"; - algorithm rsasha1; - coverage 1y; # another comment - roll-period zsk 6mo; // and yet another - pre-publish zsk 6w; - post-publish zsk 6w; - keyttl 1h; -}; - -policy extra { - policy default; - coverage 5y; - roll-period KSK 1 year; - roll-period zsk 3mo; - pre-publish ksk 3mo; - post-publish zsk 1w; - keyttl 2h; -}; - -/* - * and this is also a comment, - * and it should be ignored like - * the others. - */ - -zone example.com { - policy extra; - coverage 5 mon; - algorithm nsec3rsasha1; -}; - -/* - * This confirms that zones starting with digits are accepted. - */ -zone "99example.com" { - policy global; -}; diff --git a/bin/tests/system/keymgr/setup.sh b/bin/tests/system/keymgr/setup.sh deleted file mode 100644 index bd6a6f0afe..0000000000 --- a/bin/tests/system/keymgr/setup.sh +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -KEYGEN="$KEYGEN -q" - -# Test 1: KSK goes inactive before successor is active -dir=01-ksk-inactive -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -$SETTIME -K $dir -I +7mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 2: ZSK goes inactive before successor is active -dir=02-zsk-inactive -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -$SETTIME -K $dir -I +7mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 3: KSK is unpublished before its successor is published -dir=03-ksk-unpublished -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -$SETTIME -K $dir -D +6mo $ksk1 > /dev/null 2>&1 -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 4: ZSK is unpublished before its successor is published -dir=04-zsk-unpublished -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -$SETTIME -K $dir -D +6mo $zsk1 > /dev/null 2>&1 -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 5: KSK deleted and successor published before KSK is deactivated -# and successor activated. -dir=05-ksk-unpub-active -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 6: ZSK deleted and successor published before ZSK is deactivated -# and successor activated. -dir=06-zsk-unpub-active -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 7: KSK rolled with insufficient delay after prepublication. -dir=07-ksk-ttl -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 -ksk2=`$KEYGEN -K $dir -S $ksk1` -$SETTIME -K $dir -P +269d $ksk2 > /dev/null 2>&1 -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` - -# Test 8: ZSK rolled with insufficient delay after prepublication. -dir=08-zsk-ttl -echo_i "set up $dir" -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` -# allow only 1 day between publication and activation -$SETTIME -K $dir -P +269d $zsk2 > /dev/null 2>&1 -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` - -# Test 9: No special preparation needed - -# Test 10: Valid key set, but rollover period has changed -dir=10-change-roll -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I +3mo -D +4mo $zsk1 > /dev/null 2>&1 -zsk2=`$KEYGEN -K $dir -S $zsk1` - -# Test 11: Many keys all simultaneously scheduled to be active in the future -dir=11-many-simul -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk -P now+1mo -A now+1mo example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` -z2=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` -z3=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` -z4=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` - -# Test 12: Many keys all simultaneously scheduled to be active in the past -dir=12-many-active -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z3=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` - -# Test 13: Multiple simultaneous keys with no configured roll period -dir=13-noroll -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -k2=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -k3=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` - -# Test 14: Keys exist but have the wrong algorithm -dir=14-wrongalg -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q example.com` -$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null -z2=`$KEYGEN -K $dir -q -S ${z1}.key` -$SETTIME -K $dir -I now+1y -D now+14mo $z2 > /dev/null -z3=`$KEYGEN -K $dir -q -S ${z2}.key` -$SETTIME -K $dir -I now+18mo -D now+20mo $z3 > /dev/null -z4=`$KEYGEN -K $dir -q -S ${z3}.key` - -# Test 15: No zones specified; just search the directory for keys -dir=15-unspec -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null -z2=`$KEYGEN -K $dir -q -S ${z1}.key` -$SETTIME -K $dir -I now+1y -D now+14mo $z2 > /dev/null -z3=`$KEYGEN -K $dir -q -S ${z2}.key` -$SETTIME -K $dir -I now+18mo -D now+20mo $z3 > /dev/null -z4=`$KEYGEN -K $dir -q -S ${z3}.key` - -# Test 16: No zones specified; search the directory for keys; -# keys have the wrong algorithm for their policies -dir=16-wrongalg-unspec -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q example.com` -$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null -z2=`$KEYGEN -K $dir -q -S ${z1}.key` -$SETTIME -K $dir -I now+1y -D now+14mo $z2 > /dev/null -z3=`$KEYGEN -K $dir -q -S ${z2}.key` -$SETTIME -K $dir -I now+18mo -D now+20mo $z3 > /dev/null -z4=`$KEYGEN -K $dir -q -S ${z3}.key` - -# Test 17: Keys are simultaneously active but we run with no force -# flag (this should fail) -dir=17-noforce -echo_i "set up $dir" -k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` -z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z3=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` -z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` - -# Test 18: Prepublication interval is set to a nonstandard value -dir=18-nonstd-prepub -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -I now+2mo -D now+3mo $zsk1 > /dev/null - -# Test 19: Key has been published/active a long time -dir=19-old-keys -echo_i "set up $dir" -ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` -zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` -$SETTIME -K $dir -P now-2y -A now-2y $ksk1 > /dev/null -$SETTIME -K $dir -P now-2y -A now-2y $zsk1 > /dev/null diff --git a/bin/tests/system/keymgr/testpolicy.py b/bin/tests/system/keymgr/testpolicy.py deleted file mode 100644 index 81b2ff068c..0000000000 --- a/bin/tests/system/keymgr/testpolicy.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. -############################################################################ - -import sys -from isc import policy - -PP = policy.dnssec_policy() -# print the unmodified default and a generated zone policy -print(PP.named_policy['default']) -print(PP.named_policy['global']) -print(PP.policy('example.com')) - -if len(sys.argv) > 0: - for policy_file in sys.argv[1:]: - PP.load(policy_file) - - # now print the modified default and generated zone policies - print(PP.named_policy['default']) - print(PP.policy('example.com')) - print(PP.policy('example.org')) - print(PP.policy('example.net')) - - # print algorithm policies - print(PP.alg_policy['RSASHA1']) - print(PP.alg_policy['RSASHA256']) - print(PP.alg_policy['ECDSAP256SHA256']) - - # print another named policy - print(PP.named_policy['extra']) -else: - print("ERROR: Please provide an input file") diff --git a/bin/tests/system/keymgr/tests.sh b/bin/tests/system/keymgr/tests.sh deleted file mode 100644 index 8c4b20a3ab..0000000000 --- a/bin/tests/system/keymgr/tests.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -status=0 -n=1 - -matchall () { - match_result=ok - file=$1 - while IFS="," read expect matchline; do - [ -z "$matchline" ] && continue - matches=`grep "$matchline" $file | wc -l` - [ "$matches" -ne "$expect" ] && { - echo "'$matchline': expected $expect found $matches" - return 1 - } - done << EOF - $2 -EOF - return 0 -} - -echo_i "checking for DNSSEC key coverage issues" -ret=0 -for dir in [0-9][0-9]-*; do - ret=0 - echo_i "$dir ($n)" - kargs= cargs= kmatch= cmatch= kret= cret=0 warn= error= ok= - . $dir/expect - - # use policy.conf if available - policy="" - if [ -e "$dir/policy.conf" ]; then - policy="-c $dir/policy.conf" - if grep -e "-c policy.conf" $dir/expect > /dev/null - then - echo_i "fix $dir/expect: multiple policy files" - ret=1 - fi - else - policy="-c policy.conf" - fi - - # run keymgr to update keys - if [ "$CYGWIN" ]; then - $KEYMGR $policy -K $dir -g `cygpath -w $KEYGEN` \ - -s `cygpath -w $SETTIME` $kargs > keymgr.$n 2>&1 - else - $KEYMGR $policy -K $dir -g $KEYGEN \ - -s $SETTIME $kargs > keymgr.$n 2>&1 - fi - # check that return code matches expectations - found=$? - if [ $found -ne $kret ]; then - echo "keymgr retcode was $found expected $kret" - ret=1 - fi - - # check for matches in keymgr output - matchall keymgr.$n "$kmatch" || ret=1 - - # now check coverage - $COVERAGE -K $dir $cargs > coverage.$n 2>&1 - # check that return code matches expectations - found=$? - if [ $found -ne $cret ]; then - echo "coverage retcode was $found expected $cret" - ret=1 - fi - - # check for correct number of errors - found=`grep ERROR coverage.$n | wc -l` - if [ $found -ne $error ]; then - echo "error count was $found expected $error" - ret=1 - fi - - # check for correct number of warnings - found=`grep WARNING coverage.$n | wc -l` - if [ $found -ne $warn ]; then - echo "warning count was $found expected $warn" - ret=1 - fi - - # check for correct number of OKs - found=`grep "No errors found" coverage.$n | wc -l` - if [ $found -ne $ok ]; then - echo "good count was $found expected $ok" - ret=1 - fi - - # check for matches in coverage output - matchall coverage.$n "$cmatch" || ret=1 - - if [ -f $dir/extra.sh ]; then - cd $dir - . ./extra.sh - cd .. - fi - - n=`expr $n + 1` - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` -done - -echo_i "checking domains ending in . ($n)" -ret=0 -$KEYMGR -g $KEYGEN -s $SETTIME . > keymgr.1.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.1.$n | wc -l` -[ "$nkeys" -eq 2 ] || ret=1 -$KEYMGR -g $KEYGEN -s $SETTIME . > keymgr.2.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.2.$n | wc -l` -[ "$nkeys" -eq 0 ] || ret=1 -$KEYMGR -g $KEYGEN -s $SETTIME example.com. > keymgr.3.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.3.$n | wc -l` -[ "$nkeys" -eq 2 ] || ret=1 -$KEYMGR -g $KEYGEN -s $SETTIME example.com. > keymgr.4.$n 2>&1 -nkeys=`grep dnssec-keygen keymgr.4.$n | wc -l` -[ "$nkeys" -eq 0 ] || ret=1 -status=`expr $status + $ret` -n=`expr $n + 1` - -echo_i "checking policy.conf parser ($n)" -ret=0 -PYTHONPATH="../../../python:$PYTHONPATH" ${PYTHON} testpolicy.py policy.sample > policy.out -$DOS2UNIX policy.out > /dev/null 2>&1 -cmp -s policy.good policy.out || ret=1 -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` -n=`expr $n + 1` - -echo_i "exit status: $status" -[ $status -eq 0 ] || exit 1 diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp index fb7f86368c..7172de39e9 100644 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp @@ -190,10 +190,6 @@ const FileData installFiles[] = {"pkcs11-keygen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, {"pkcs11-list.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, {"pkcs11-tokens.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, -#endif -#ifdef USE_PYTHON - {"dnssec-checkds.py", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-coverage.py", FileData::BinDir, FileData::Normal, FALSE, FALSE}, #endif {"readme1st.txt", FileData::BinDir, FileData::Trivial, FALSE, TRUE}, {NULL, -1, -1} diff --git a/configure b/configure index 6858766454..79c05b87de 100755 --- a/configure +++ b/configure @@ -764,13 +764,6 @@ MAXMINDDB_LIBS MAXMINDDB_CFLAGS ISC_PLATFORM_NORETURN_POST ISC_PLATFORM_NORETURN_PRE -expanded_sysconfdir -PYTHON_INSTALL_LIB -PYTHON_INSTALL_DIR -PYTHON_TOOLS -KEYMGR -COVERAGE -CHECKDS PYTHON PERL LN @@ -902,7 +895,6 @@ enable_developer enable_fuzzing enable_mutex_atomics with_python -with_python_install_dir enable_kqueue enable_epoll enable_devpoll @@ -1655,9 +1647,7 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). - --with-python=PATH specify path to Python interpreter - --with-python-install-dir=PATH - installation directory for Python modules + --with-python=PATH specify path to Python 3 interpreter --with-geoip2 deprecated, use --with-maxminddb --with-maxminddb=PATH Build with MaxMind GeoIP2 support (auto|yes|no|path) [default=auto] @@ -12477,23 +12467,13 @@ done # -# Python is also optional but required by default so that dnssec-keymgr gets -# installed unless explicitly prevented by the user using --without-python. +# Python 3 is optional; it is used by the system test scripts. # testminvers='import sys -if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): +if (sys.version_info < (3,5)): exit(1)' -testargparse='try: import argparse -except: exit(1)' - -testply='try: import ply -except: exit(1)' - -testsetup='try: from distutils.core import setup -except: exit(1)' - -default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" +default_with_python="python python3 python3.8 python3.7 python3.6 python3.5" @@ -12506,14 +12486,6 @@ else fi -# Check whether --with-python-install-dir was given. -if test "${with_python_install_dir+set}" = set; then : - withval=$with_python_install_dir; -else - with_python_install_dir="" -fi - - if test "$with_python" = "yes"; then : with_python=$default_with_python fi @@ -12585,8 +12557,8 @@ fi continue fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PYTHON is python2 version >= 2.7 or python3 version >= 3.2" >&5 -$as_echo_n "checking if $PYTHON is python2 version >= 2.7 or python3 version >= 3.2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PYTHON is Python version >= 3.5" >&5 +$as_echo_n "checking if $PYTHON is Python version >= 3.5... " >&6; } if "$PYTHON" -c "$testminvers" 2>/dev/null; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -12597,82 +12569,11 @@ $as_echo "no" >&6; } continue fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python module 'argparse'" >&5 -$as_echo_n "checking Python module 'argparse'... " >&6; } - if "$PYTHON" -c "$testargparse" 2>/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - unset PYTHON - continue -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python module 'ply'" >&5 -$as_echo_n "checking Python module 'ply'... " >&6; } - if "$PYTHON" -c "$testply" 2>/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - unset PYTHON - continue -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python module 'distutils.core setup'" >&5 -$as_echo_n "checking Python module 'distutils.core setup'... " >&6; } - if "$PYTHON" -c "$testsetup" 2>/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - unset PYTHON - continue -fi - - # Stop looking any further once we find a Python interpreter + # Stop looking any further once we find a Python 3 interpreter # satisfying all requirements. break done - - if test "X$PYTHON" = "X"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python support" >&5 -$as_echo_n "checking for Python support... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Python >= 2.7 or >= 3.2 and the PLY package are required for dnssec-keymgr and other Python-based tools. PLY may be available from your OS package manager as python-ply or python3-ply; it can also be installed via pip. To build without Python/PLY, use --without-python." "$LINENO" 5 fi -fi - -PYTHON_TOOLS='' -CHECKDS='' -COVERAGE='' -KEYMGR='' -if test "X$PYTHON" != "X"; then : - PYTHON_TOOLS=python - CHECKDS=checkds - COVERAGE=coverage - KEYMGR=keymgr - PYTHON_INSTALL_DIR="$with_python_install_dir" - if test -n "$with_python_install_dir"; then : - PYTHON_INSTALL_LIB="--install-lib=$with_python_install_dir" -fi -fi - - - - - - - -# -# expanded_sysconfdir is needed for replacement in the python utilities -# -expanded_sysconfdir=`eval echo $sysconfdir` - # # Make sure INSTALL uses an absolute path, else it will be wrong in all @@ -23870,7 +23771,7 @@ ac_config_commands="$ac_config_commands chmod" # elsewhere if there's a good reason for doing so. # -ac_config_files="$ac_config_files Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/python/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/Makefile bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/Makefile bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/python/isc/utils.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl fuzz/Makefile lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/netmgr/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/tests/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall make/Makefile make/mkdep unit/unittest.sh util/check-make-install" +ac_config_files="$ac_config_files Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl fuzz/Makefile lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/netmgr/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/tests/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall make/Makefile make/mkdep unit/unittest.sh util/check-make-install" # @@ -24887,27 +24788,6 @@ do "bin/nsupdate/Makefile") CONFIG_FILES="$CONFIG_FILES bin/nsupdate/Makefile" ;; "bin/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES bin/pkcs11/Makefile" ;; "bin/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES bin/plugins/Makefile" ;; - "bin/python/Makefile") CONFIG_FILES="$CONFIG_FILES bin/python/Makefile" ;; - "bin/python/dnssec-checkds.py") CONFIG_FILES="$CONFIG_FILES bin/python/dnssec-checkds.py" ;; - "bin/python/dnssec-coverage.py") CONFIG_FILES="$CONFIG_FILES bin/python/dnssec-coverage.py" ;; - "bin/python/dnssec-keymgr.py") CONFIG_FILES="$CONFIG_FILES bin/python/dnssec-keymgr.py" ;; - "bin/python/isc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/python/isc/Makefile" ;; - "bin/python/isc/__init__.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/__init__.py" ;; - "bin/python/isc/checkds.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/checkds.py" ;; - "bin/python/isc/coverage.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/coverage.py" ;; - "bin/python/isc/dnskey.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/dnskey.py" ;; - "bin/python/isc/eventlist.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/eventlist.py" ;; - "bin/python/isc/keydict.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keydict.py" ;; - "bin/python/isc/keyevent.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keyevent.py" ;; - "bin/python/isc/keymgr.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keymgr.py" ;; - "bin/python/isc/keyseries.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keyseries.py" ;; - "bin/python/isc/keyzone.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/keyzone.py" ;; - "bin/python/isc/policy.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/policy.py" ;; - "bin/python/isc/rndc.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/rndc.py" ;; - "bin/python/isc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bin/python/isc/tests/Makefile" ;; - "bin/python/isc/tests/dnskey_test.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/tests/dnskey_test.py" ;; - "bin/python/isc/tests/policy_test.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/tests/policy_test.py" ;; - "bin/python/isc/utils.py") CONFIG_FILES="$CONFIG_FILES bin/python/isc/utils.py" ;; "bin/rndc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/rndc/Makefile" ;; "bin/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/Makefile" ;; "bin/tests/headerdep_test.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/headerdep_test.sh" ;; diff --git a/configure.ac b/configure.ac index 215d054c92..2526738c98 100644 --- a/configure.ac +++ b/configure.ac @@ -191,34 +191,20 @@ AC_PATH_PROGS(PERL, perl5 perl) AC_SUBST(PERL) # -# Python is also optional but required by default so that dnssec-keymgr gets -# installed unless explicitly prevented by the user using --without-python. +# Python 3 is optional; it is used by the system test scripts. # testminvers='import sys -if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): +if (sys.version_info < (3,5)): exit(1)' -testargparse='try: import argparse -except: exit(1)' - -testply='try: import ply -except: exit(1)' - -testsetup='try: from distutils.core import setup -except: exit(1)' - -default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" +default_with_python="python python3 python3.8 python3.7 python3.6 python3.5" AC_ARG_VAR([PYTHON], [path to python executable]) AC_ARG_WITH([python], AS_HELP_STRING([--with-python=PATH], - [specify path to Python interpreter]), + [specify path to Python 3 interpreter]), [], [with_python=$default_with_python]) -AC_ARG_WITH([python-install-dir], - AS_HELP_STRING([--with-python-install-dir=PATH], - [installation directory for Python modules]), - [], with_python_install_dir="") AS_IF([test "$with_python" = "yes"], [with_python=$default_with_python]) @@ -242,76 +228,17 @@ AS_IF([test "$with_python" = "no"], AS_IF([test -z "$PYTHON"], [continue]) - AC_MSG_CHECKING([if $PYTHON is python2 version >= 2.7 or python3 version >= 3.2]) + AC_MSG_CHECKING([if $PYTHON is Python version >= 3.5]) AS_IF(["$PYTHON" -c "$testminvers" 2>/dev/null], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) unset PYTHON continue]) - AC_MSG_CHECKING([Python module 'argparse']) - AS_IF(["$PYTHON" -c "$testargparse" 2>/dev/null], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - unset PYTHON - continue]) - - AC_MSG_CHECKING([Python module 'ply']) - AS_IF(["$PYTHON" -c "$testply" 2>/dev/null], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - unset PYTHON - continue]) - - AC_MSG_CHECKING([Python module 'distutils.core setup']) - AS_IF(["$PYTHON" -c "$testsetup" 2>/dev/null], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - unset PYTHON - continue]) - - # Stop looking any further once we find a Python interpreter + # Stop looking any further once we find a Python 3 interpreter # satisfying all requirements. break - done - - AS_IF([test "X$PYTHON" = "X"], - [AC_MSG_CHECKING([for Python support]) - AC_MSG_RESULT([no]) - AC_MSG_ERROR([m4_normalize( - [Python >= 2.7 or >= 3.2 and the PLY package - are required for dnssec-keymgr and other - Python-based tools. PLY may be - available from your OS package manager - as python-ply or python3-ply; it can also - be installed via pip. To build without - Python/PLY, use --without-python.] - )])])]) - -PYTHON_TOOLS='' -CHECKDS='' -COVERAGE='' -KEYMGR='' -AS_IF([test "X$PYTHON" != "X"], - [PYTHON_TOOLS=python - CHECKDS=checkds - COVERAGE=coverage - KEYMGR=keymgr - PYTHON_INSTALL_DIR="$with_python_install_dir" - AS_IF([test -n "$with_python_install_dir"], - [PYTHON_INSTALL_LIB="--install-lib=$with_python_install_dir"])]) -AC_SUBST(CHECKDS) -AC_SUBST(COVERAGE) -AC_SUBST(KEYMGR) -AC_SUBST(PYTHON_TOOLS) -AC_SUBST(PYTHON_INSTALL_DIR) -AC_SUBST(PYTHON_INSTALL_LIB) - -# -# expanded_sysconfdir is needed for replacement in the python utilities -# -expanded_sysconfdir=`eval echo $sysconfdir` -AC_SUBST(expanded_sysconfdir) + done]) # # Make sure INSTALL uses an absolute path, else it will be wrong in all @@ -2662,27 +2589,6 @@ AC_CONFIG_FILES([ bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile - bin/python/Makefile - bin/python/dnssec-checkds.py - bin/python/dnssec-coverage.py - bin/python/dnssec-keymgr.py - bin/python/isc/Makefile - bin/python/isc/__init__.py - bin/python/isc/checkds.py - bin/python/isc/coverage.py - bin/python/isc/dnskey.py - bin/python/isc/eventlist.py - bin/python/isc/keydict.py - bin/python/isc/keyevent.py - bin/python/isc/keymgr.py - bin/python/isc/keyseries.py - bin/python/isc/keyzone.py - bin/python/isc/policy.py - bin/python/isc/rndc.py - bin/python/isc/tests/Makefile - bin/python/isc/tests/dnskey_test.py - bin/python/isc/tests/policy_test.py - bin/python/isc/utils.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh diff --git a/contrib/README b/contrib/README index 466e11d1c7..15db70fe0a 100644 --- a/contrib/README +++ b/contrib/README @@ -18,11 +18,6 @@ be fixed as time permits. Sample configuration for setting up a DNS-over-TLS server using BIND with Nginx as a TLS proxy. - - kasp/ - - Scripts for converting key and signature policies from OpenDNSSEC - KASP format to the policy.conf format used by dnssec-keymgr. - - dlz/modules Dynamically linkable DLZ modules that can be configured into diff --git a/contrib/kasp/README b/contrib/kasp/README deleted file mode 100644 index fb897f1073..0000000000 --- a/contrib/kasp/README +++ /dev/null @@ -1,11 +0,0 @@ -This directory is for tools and scripts related to the OpenDNSSEC KASP -("key and signature policy") format. Currently it only contains -"kasp2policy.py", a python script for converting KASP key policy -to the "dnssec.policy" format that is used by dnssec-keymgr. - -This depends on PLY (python lex/yacc) and on the "isc.dnskey" module in -bin/python/isc. - -Basic test: -$ python kasp2policy.py kasp.xml > policy.out -$ diff policy.out policy.good diff --git a/contrib/kasp/kasp.xml b/contrib/kasp/kasp.xml deleted file mode 100644 index d94b0843ec..0000000000 --- a/contrib/kasp/kasp.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - A default policy that will - amaze you and your friends - - PT5M - PT5M - - PT15M - PT15M - - PT2M - PT1M - - - - - - - - - - PT1M - PT0S - PT0S - - - - 5 - PT40M - softHSM - 1 - - - - - 5 - PT25M - softHSM - 1 - - - - - PT0S - - PT0S - PT0S - unixtime - - - - - PT8M - - PT0S - - - PT0S - PT0S - - - - - A default policy that will amaze you and your friends - - PT7M - PT7M - - PT15M - PT16M - - PT2M - PT1M - - - - - P120D - - 1 - 5 - - - - - - - - PT15M - PT0S - PT0S - - - - 7 - PT45M - softHSM - 1 - - - - - 7 - PT25M - softHSM - 1 - - - - - PT0S - - PT0S - PT0S - unixtime - - - - - PT12M - - PT0S - - - PT0S - PT0S - - - - diff --git a/contrib/kasp/kasp2policy.py b/contrib/kasp/kasp2policy.py deleted file mode 100644 index 0b54d8ab51..0000000000 --- a/contrib/kasp/kasp2policy.py +++ /dev/null @@ -1,230 +0,0 @@ -#!/usr/bin/python -############################################################################ -# Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -# PERFORMANCE OF THIS SOFTWARE. -############################################################################ -# kasp2policy.py -# This translates the Keys section of a KASP XML file into a dnssec.policy -# file that can be used by dnssec-keymgr. -############################################################################ - -from xml.etree import cElementTree as ET -from collections import defaultdict -import re -import ply.yacc as yacc -import ply.lex as lex -from isc import dnskey - - -############################################################################ -# Translate KASP duration values into seconds -############################################################################ -class KaspTime: - # pylint: disable=invalid-name - class KTLex: - # pylint: disable=invalid-name - - tokens = ('P', 'T', 'Y', 'M', 'D', 'H', 'S', 'NUM') - - t_P = r'(?i)P' - t_T = r'(?i)T' - t_Y = r'(?i)Y' - t_M = r'(?i)M' - t_D = r'(?i)D' - t_H = r'(?i)H' - t_S = r'(?i)S' - - @staticmethod - def t_NUM(t): - r'\d+' - t.value = int(t.value) - return t - - @staticmethod - def t_error(t): - print("Illegal character '%s'" % t.value[0]) - t.lexer.skip(1) - - def __init__(self): - self.lexer = lex.lex(object=self) - - def __init__(self): - self.lexer = self.KTLex() - self.tokens = self.lexer.tokens - self.parser = yacc.yacc(debug=False, write_tables=False, module=self) - - def parse(self, text): - self.lexer.lexer.lineno = 0 - return self.parser.parse(text) - - @staticmethod - def p_ktime_4(p): - "ktime : P periods T times" - p[0] = p[2] + p[4] - - @staticmethod - def p_ktime_3(p): - "ktime : P T times" - p[0] = p[3] - - @staticmethod - def p_ktime_2(p): - "ktime : P periods" - p[0] = p[2] - - @staticmethod - def p_periods_1(p): - "periods : period" - p[0] = p[1] - - @staticmethod - def p_periods_2(p): - "periods : periods period" - p[0] = p[1] + p[2] - - @staticmethod - def p_times_1(p): - "times : time" - p[0] = p[1] - - @staticmethod - def p_times_2(p): - "times : times time" - p[0] = p[1] + p[2] - - @staticmethod - def p_period(p): - '''period : NUM Y - | NUM M - | NUM D''' - if p[2].lower() == 'y': - p[0] = int(p[1]) * 31536000 - elif p[2].lower() == 'm': - p[0] = int(p[1]) * 2592000 - elif p[2].lower() == 'd': - p[0] += int(p[1]) * 86400 - - @staticmethod - def p_time(p): - '''time : NUM H - | NUM M - | NUM S''' - if p[2].lower() == 'h': - p[0] = int(p[1]) * 3600 - elif p[2].lower() == 'm': - p[0] = int(p[1]) * 60 - elif p[2].lower() == 's': - p[0] = int(p[1]) - - @staticmethod - def p_error(): - print("Syntax error") - - -############################################################################ -# Load the contents of a KASP XML file as a python dictionary -############################################################################ -class Kasp(): - # pylint: disable=invalid-name - - @staticmethod - def _todict(t): - d = {t.tag: {} if t.attrib else None} - children = list(t) - if children: - dd = defaultdict(list) - for dc in map(Kasp._todict, children): - for k, v in dc.iteritems(): - dd[k].append(v) - k = {k: v[0] if len(v) == 1 else v for k, v in dd.items()} - d = {t.tag: k} - if t.attrib: - d[t.tag].update(('@' + k, v) for k, v in t.attrib.iteritems()) - if t.text: - text = t.text.strip() - if children or t.attrib: - if text: - d[t.tag]['#text'] = text - else: - d[t.tag] = text - return d - - def __init__(self, filename): - self._dict = Kasp._todict(ET.parse(filename).getroot()) - - def __getitem__(self, key): - return self._dict[key] - - def __len__(self): - return len(self._dict) - - def __iter__(self): - return self._dict.__iter__() - - def __repr__(self): - return repr(self._dict) - - -############################################################################ -# Load the contents of a KASP XML file as a python dictionary -############################################################################ -if __name__ == "__main__": - import sys - - if len(sys.argv) < 2: - print("Usage: kasp2policy ") - sys.exit(1) - - KINFO = Kasp(sys.argv[1]) - try: - KINFO = Kasp(sys.argv[1]) - except FileNotFoundError: - print("%s: unable to load KASP file '%s'" % (sys.argv[0], sys.argv[1])) - sys.exit(1) - - KT = KaspTime() - FIRST = True - - for policy in KINFO['KASP']['Policy']: - if not policy['@name'] or not policy['Keys']: - continue - if not FIRST: - print("") - FIRST = False - if policy['Description']: - desc = policy['Description'].strip() - print("# %s" % re.sub(r"\n\s*", "\n# ", desc)) - print("policy %s {" % policy['@name']) - ksk = policy['Keys']['KSK'] - zsk = policy['Keys']['ZSK'] - kalg = ksk['Algorithm'] - zalg = zsk['Algorithm'] - algnum = kalg['#text'] or zalg['#text'] - if algnum: - print("\talgorithm %s;" % dnskey.algstr(int(algnum))) - if policy['Keys']['TTL']: - print("\tkeyttl %d;" % KT.parse(policy['Keys']['TTL'])) - if kalg['@length']: - print("\tkey-size ksk %d;" % int(kalg['@length'])) - if zalg['@length']: - print("\tkey-size zsk %d;" % int(zalg['@length'])) - if ksk['Lifetime']: - print("\troll-period ksk %d;" % KT.parse(ksk['Lifetime'])) - if zsk['Lifetime']: - print("\troll-period zsk %d;" % KT.parse(zsk['Lifetime'])) - if ksk['Standby']: - print("\tstandby ksk %d;" % int(ksk['Standby'])) - if zsk['Standby']: - print("\tstandby zsk %d;" % int(zsk['Standby'])) - print("};") diff --git a/contrib/kasp/policy.good b/contrib/kasp/policy.good deleted file mode 100644 index 18c636083c..0000000000 --- a/contrib/kasp/policy.good +++ /dev/null @@ -1,24 +0,0 @@ -# A default policy that will -# amaze you and your friends -policy Policy1 { - algorithm RSASHA1; - keyttl 60; - key-size ksk 2048; - key-size zsk 2048; - roll-period ksk 2400; - roll-period zsk 1500; - standby ksk 1; - standby zsk 1; -}; - -# A default policy that will amaze you and your friends -policy Policy2 { - algorithm NSEC3RSASHA1; - keyttl 900; - key-size ksk 2048; - key-size zsk 2048; - roll-period ksk 2700; - roll-period zsk 1500; - standby ksk 1; - standby zsk 1; -}; diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index e291dc88d0..8af38b586c 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -18553,13 +18553,10 @@ allow-query { !{ !10/8; any; }; key example; }; - - - diff --git a/doc/arm/man.dnssec-checkds.html b/doc/arm/man.dnssec-checkds.html deleted file mode 100644 index cbb152cfea..0000000000 --- a/doc/arm/man.dnssec-checkds.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - -dnssec-checkds - - - - - - - - -
-
- - - - - -
-

Name

-

- dnssec-checkds - — DNSSEC delegation consistency checking tool -

-
- - - -
-

Synopsis

-

- dnssec-checkds - [-d dig path] - [-D dsfromkey path] - [-f file] - [-l domain] - [-s file] - {zone} -

-
- -
-

DESCRIPTION

- -

dnssec-checkds - verifies the correctness of Delegation Signer (DS) - resource records for keys in a specified zone. -

-
- -
-

OPTIONS

- -
-
-a algorithm
-
-

- Specify a digest algorithm to use when converting the - zone's DNSKEY records to expected DS records. This - option can be repeated, so that multiple records are - checked for each DNSKEY record. -

-

- The algorithm must be one of - SHA-1, SHA-256, or SHA-384. These values are case insensitive, - and the hyphen may be omitted. If no algorithm is specified, - the default is SHA-256. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file to find the DNSKEY records. If not, - then the DNSKEY records for the zone are looked up in the DNS. -

-
-
-s file
-
-

- Specifies a prepared dsset file, such as would be generated - by dnssec-signzone, to use as a source for - the DS RRset instead of querying the parent. -

-
-
-d dig path
-
-

- Specifies a path to a dig binary. Used - for testing. -

-
-
-D dsfromkey path
-
-

- Specifies a path to a dnssec-dsfromkey binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - , -

-
- -
- -

BIND 9.17.1 (Development Release)

- - diff --git a/doc/arm/man.dnssec-coverage.html b/doc/arm/man.dnssec-coverage.html deleted file mode 100644 index 3c4f351897..0000000000 --- a/doc/arm/man.dnssec-coverage.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - -dnssec-coverage - - - - - - - - -
-
- - - - - -
-

Name

-

- dnssec-coverage - — checks future DNSKEY coverage for a zone -

-
- - - -
-

Synopsis

-

- dnssec-coverage - [-K directory] - [-l length] - [-f file] - [-d DNSKEY TTL] - [-m max TTL] - [-r interval] - [-c compilezone path] - [-k] - [-z] - [zone...] -

-
- -
-

DESCRIPTION

- -

dnssec-coverage - verifies that the DNSSEC keys for a given zone or a set of zones - have timing metadata set properly to ensure no future lapses in DNSSEC - coverage. -

-

- If zone is specified, then keys found in - the key repository matching that zone are scanned, and an ordered - list is generated of the events scheduled for that key (i.e., - publication, activation, inactivation, deletion). The list of - events is walked in order of occurrence. Warnings are generated - if any event is scheduled which could cause the zone to enter a - state in which validation failures might occur: for example, if - the number of published or active keys for a given algorithm drops - to zero, or if a key is deleted from the zone too soon after a new - key is rolled, and cached data signed by the prior key has not had - time to expire from resolver caches. -

-

- If zone is not specified, then all keys in the - key repository will be scanned, and all zones for which there are - keys will be analyzed. (Note: This method of reporting is only - accurate if all the zones that have keys in a given repository - share the same TTL parameters.) -

-
- -
-

OPTIONS

- - -
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-f file
-
-

- If a file is specified, then the zone is - read from that file; the largest TTL and the DNSKEY TTL are - determined directly from the zone data, and the - -m and -d options do - not need to be specified on the command line. -

-
-
-l duration
-
-

- The length of time to check for DNSSEC coverage. Key events - scheduled further into the future than duration - will be ignored, and assumed to be correct. -

-

- The value of duration can be set in seconds, - or in larger units of time by adding a suffix: 'mi' for minutes, - 'h' for hours, 'd' for days, 'w' for weeks, 'mo' for months, - 'y' for years. -

-
-
-m maximum TTL
-
-

- Sets the value to be used as the maximum TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a zone-signing key is - deactivated, there must be enough time for the record in the - zone with the longest TTL to have expired from resolver caches - before that key can be purged from the DNSKEY RRset. If that - condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if the -f has - been used to specify a zone file. If -f has - been specified, this option may still be used; it will override - the value found in the file. -

-

- If this option is not used and the maximum TTL cannot be retrieved - from a zone file, a warning is generated and a default value of - 1 week is used. -

-
-
-d DNSKEY TTL
-
-

- Sets the value to be used as the DNSKEY TTL for the zone or - zones being analyzed when determining whether there is a - possibility of validation failure. When a key is rolled (that - is, replaced with a new key), there must be enough time for the - old DNSKEY RRset to have expired from resolver caches before - the new key is activated and begins generating signatures. If - that condition does not apply, a warning will be generated. -

-

- The length of the TTL can be set in seconds, or in larger units - of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-

- This option is not necessary if -f has - been used to specify a zone file from which the TTL - of the DNSKEY RRset can be read, or if a default key TTL was - set using ith the -L to - dnssec-keygen. If either of those is true, - this option may still be used; it will override the values - found in the zone file or the key file. -

-

- If this option is not used and the key TTL cannot be retrieved - from the zone file or the key file, then a warning is generated - and a default value of 1 day is used. -

-
-
-r resign interval
-
-

- Sets the value to be used as the resign interval for the zone - or zones being analyzed when determining whether there is a - possibility of validation failure. This value defaults to - 22.5 days, which is also the default in - named. However, if it has been changed - by the sig-validity-interval option in - named.conf, then it should also be - changed here. -

-

- The length of the interval can be set in seconds, or in larger - units of time by adding a suffix: 'mi' for minutes, 'h' for hours, - 'd' for days, 'w' for weeks, 'mo' for months, 'y' for years. -

-
-
-k
-
-

- Only check KSK coverage; ignore ZSK events. Cannot be - used with -z. -

-
-
-z
-
-

- Only check ZSK coverage; ignore KSK events. Cannot be - used with -k. -

-
-
-c compilezone path
-
-

- Specifies a path to a named-compilezone binary. - Used for testing. -

-
-
-
- -
-

SEE ALSO

- -

- - dnssec-checkds(8) - , - - dnssec-dsfromkey(8) - , - - dnssec-keygen(8) - , - - dnssec-signzone(8) - -

-
- -
- -

BIND 9.17.1 (Development Release)

- - diff --git a/doc/arm/man.dnssec-keymgr.html b/doc/arm/man.dnssec-keymgr.html deleted file mode 100644 index 8b3b952ac8..0000000000 --- a/doc/arm/man.dnssec-keymgr.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - -dnssec-keymgr - - - - - - - - -
-
- - - - - -
-

Name

-

- dnssec-keymgr - — Ensures correct DNSKEY coverage for a zone based on a defined policy -

-
- - - -
-

Synopsis

-

- dnssec-keymgr - [-K directory] - [-c file] - [-f] - [-k] - [-q] - [-v] - [-z] - [-g path] - [-s path] - [zone...] -

-
- -
-

DESCRIPTION

-

- dnssec-keymgr is a high level Python wrapper - to facilitate the key rollover process for zones handled by - BIND. It uses the BIND commands for manipulating DNSSEC key - metadata: dnssec-keygen and - dnssec-settime. -

-

- DNSSEC policy can be read from a configuration file (default - /etc/dnssec-policy.conf), from which the - key parameters, publication and rollover schedule, and desired - coverage duration for any given zone can be determined. This - file may be used to define individual DNSSEC policies on a - per-zone basis, or to set a "default" policy - used for all zones. -

-

- When dnssec-keymgr runs, it examines the DNSSEC - keys for one or more zones, comparing their timing metadata against - the policies for those zones. If key settings do not conform to the - DNSSEC policy (for example, because the policy has been changed), - they are automatically corrected. -

-

- A zone policy can specify a duration for which we want to - ensure the key correctness (coverage). It can - also specify a rollover period (roll-period). - If policy indicates that a key should roll over before the - coverage period ends, then a successor key will automatically be - created and added to the end of the key series. -

-

- If zones are specified on the command line, - dnssec-keymgr will examine only those zones. - If a specified zone does not already have keys in place, then - keys will be generated for it according to policy. -

-

- If zones are not specified on the command - line, then dnssec-keymgr will search the - key directory (either the current working directory or the directory - set by the -K option), and check the keys for - all the zones represented in the directory. -

-

- Key times that are in the past will not be updated unless - the -f is used (see below). Key inactivation - and deletion times that are less than five minutes in the future - will be delayed by five minutes. -

-

- It is expected that this tool will be run automatically and - unattended (for example, by cron). -

-
- -
-

OPTIONS

-
-
-c file
-
-

- If -c is specified, then the DNSSEC - policy is read from file. (If not - specified, then the policy is read from - /etc/dnssec-policy.conf; if that file - doesn't exist, a built-in global default policy is used.) -

-
-
-f
-
-

- Force: allow updating of key events even if they are - already in the past. This is not recommended for use with - zones in which keys have already been published. However, - if a set of keys has been generated all of which have - publication and activation dates in the past, but the - keys have not been published in a zone as yet, then this - option can be used to clean them up and turn them into a - proper series of keys with appropriate rollover intervals. -

-
-
-g keygen-path
-
-

- Specifies a path to a dnssec-keygen binary. - Used for testing. - See also the -s option. -

-
-
-h
-
-

- Print the dnssec-keymgr help summary - and exit. -

-
-
-K directory
-
-

- Sets the directory in which keys can be found. Defaults to the - current working directory. -

-
-
-k
-
-

- Only apply policies to KSK keys. - See also the -z option. -

-
-
-q
-
-

- Quiet: suppress printing of dnssec-keygen - and dnssec-settime. -

-
-
-s settime-path
-
-

- Specifies a path to a dnssec-settime binary. - Used for testing. - See also the -g option. -

-
-
-v
-
-

- Print the dnssec-keymgr version and exit. -

-
-
-z
-
-

- Only apply policies to ZSK keys. - See also the -k option. -

-
-
-
- -
-

POLICY CONFIGURATION

-

- The dnssec-policy.conf file can specify three kinds - of policies: -

-
    -
  • -

    - Policy classes - (policy name { ... };) - can be inherited by zone policies or other policy classes; these - can be used to create sets of different security profiles. For - example, a policy class normal might specify - 1024-bit key sizes, but a class extra might - specify 2048 bits instead; extra would be - used for zones that had unusually high security needs. -

    -
  • -
  • -

    - Algorithm policies: - (algorithm-policy algorithm { ... }; ) - override default per-algorithm settings. For example, by default, - RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This - can be modified using algorithm-policy, and the - new key sizes would then be used for any key of type RSASHA256. -

    -
  • -
  • -

    - Zone policies: - (zone name { ... }; ) - set policy for a single zone by name. A zone policy can inherit - a policy class by including a policy option. - Zone names beginning with digits (i.e., 0-9) must be quoted. - If a zone does not have its own policy then the - "default" policy applies. -

    -
  • -
-

- Options that can be specified in policies: -

-
-
algorithm - name;
-
-

- The key algorithm. If no policy is defined, the default is - RSASHA256. -

-
-
coverage - duration;
-
-

- The length of time to ensure that keys will be correct; no action - will be taken to create new keys to be activated after this time. - This can be represented as a number of seconds, or as a duration - using human-readable units (examples: "1y" or "6 months"). - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. - If no policy is configured, the default is six months. -

-
-
directory - path;
-
-

- Specifies the directory in which keys should be stored. -

-
-
key-size keytype - size;
-
-

- Specifies the number of bits to use in creating keys. - The keytype is either "zsk" or "ksk". - A default value for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is 2048 bits for RSA keys. -

-
-
keyttl - duration;
-
-

- The key TTL. If no policy is defined, the default is one hour. -

-
-
post-publish keytype - duration;
-
-

- How long after inactivation a key should be deleted from the zone. - Note: If roll-period is not set, this value is - ignored. The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm - policies as well as in policy classes or zone policies. The default - is one month. -

-
-
pre-publish keytype - duration;
-
-

- How long before activation a key should be published. Note: If - roll-period is not set, this value is ignored. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. The default is - one month. -

-
-
roll-period keytype - duration;
-
-

- How frequently keys should be rolled over. - The keytype is either "zsk" or "ksk". - A default duration for this option can be set in algorithm policies - as well as in policy classes or zone policies. If no policy is - configured, the default is one year for ZSKs. KSKs do not - roll over by default. -

-
-
standby keytype - number;
-
-

- Not yet implemented. -

-
-
-
- -
-

REMAINING WORK

-
    -
  • -

    - Enable scheduling of KSK rollovers using the -P sync - and -D sync options to - dnssec-keygen and - dnssec-settime. Check the parent zone - (as in dnssec-checkds) to determine when it's - safe for the key to roll. -

    -
  • -
  • -

    - Allow configuration of standby keys and use of the REVOKE bit, - for keys that use RFC 5011 semantics. -

    -
  • -
-
- -
-

SEE ALSO

-

- - dnssec-coverage(8) - , - - dnssec-keygen(8) - , - - dnssec-settime(8) - , - - dnssec-checkds(8) - -

-
- -
- -

BIND 9.17.1 (Development Release)

- - diff --git a/doc/design/dnssec-policy b/doc/design/dnssec-policy index d36060efe3..376019b5ba 100644 --- a/doc/design/dnssec-policy +++ b/doc/design/dnssec-policy @@ -168,18 +168,6 @@ dnssec-policy "nsec3" { # KASP design -## dnssec-policy versus dnssec-keymgr - -Key management in BIND 9 is currently implemented with a Python script -called `dnssec-keymgr`. It uses the DNSSEC tools for manipulating DNSSEC key -metadata. - -With `dnssec-policy` configured in `named.conf` you no longer need to manually -call `dnssec-keymgr` or the tools it wraps around, `dnssec-keygen` and -`dnssec-settime` (although it is still possible to use them). The policy in -`named.conf` will make `named` create keys when necessary and set the key -timings accordingly. - ## Key roles BIND 9.14 allows sign your zones with a Zone Signing Key (ZSK) and a diff --git a/doc/dev/dev.md b/doc/dev/dev.md index 955805d0df..ba4f530721 100644 --- a/doc/dev/dev.md +++ b/doc/dev/dev.md @@ -248,8 +248,6 @@ libraries. `dnssec-keygen`, `dnssec-signzone`, `dnssec-settime`, `dnssec-revoke`, `dnssec-keyfromlabel`, `dnssec-dsfromkey`, `dnssec-verify` (BIND 9.9+) - * `bind9/bin/python` (BIND 9.9+): tools written in python. Currently - has `dnssec-checkds` and `dnssec-coverage` * `bind9/bin/rndc`: `rndc` binary * `bind9/bin/dig`: `dig`, `host`, and `nslookup` * `bind9/bin/delv`: `delv` diff --git a/lib/isc/win32/libisc.vcxproj.in b/lib/isc/win32/libisc.vcxproj.in index 0aa9733b27..b9c09da842 100644 --- a/lib/isc/win32/libisc.vcxproj.in +++ b/lib/isc/win32/libisc.vcxproj.in @@ -219,11 +219,6 @@ copy ..\bin\dnssec\dnssec-settime.html ..\Build\Release copy ..\bin\dnssec\dnssec-revoke.html ..\Build\Release copy ..\bin\dnssec\dnssec-verify.html ..\Build\Release copy ..\bin\dnssec\dnssec-importkey.html ..\Build\Release -@IF PYTHON -copy ..\bin\python\dnssec-checkds.html ..\Build\Release -copy ..\bin\python\dnssec-coverage.html ..\Build\Release -copy ..\bin\python\dnssec-keymgr.html ..\Build\Release -@END PYTHON @IF PKCS11 copy ..\bin\pkcs11\pkcs11-keygen.html ..\Build\Release copy ..\bin\pkcs11\pkcs11-list.html ..\Build\Release diff --git a/util/copyrights b/util/copyrights index 503b1d8b59..52f9588a67 100644 --- a/util/copyrights +++ b/util/copyrights @@ -134,7 +134,6 @@ ./bin/dnssec/win32/dnssectool.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dnssec/win32/dnssectool.vcxproj.user X 2013,2018,2019,2020 ./bin/dnssec/win32/dsfromkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/dsfromkey.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dnssec/win32/dsfromkey.vcxproj.user X 2013,2018,2019,2020 ./bin/dnssec/win32/importkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/dnssec/win32/importkey.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 @@ -248,41 +247,6 @@ ./bin/plugins/filter-aaaa.c C 2018,2019,2020 ./bin/plugins/filter-aaaa.docbook SGML 2018,2019,2020 ./bin/plugins/filter-aaaa.html HTML DOCBOOK -./bin/python/dnssec-checkds.8 MAN DOCBOOK -./bin/python/dnssec-checkds.docbook SGML 2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/dnssec-checkds.html HTML DOCBOOK -./bin/python/dnssec-checkds.py.in PYTHON-BIN 2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/dnssec-coverage.8 MAN DOCBOOK -./bin/python/dnssec-coverage.docbook SGML 2013,2014,2015,2016,2018,2019,2020 -./bin/python/dnssec-coverage.html HTML DOCBOOK -./bin/python/dnssec-coverage.py.in PYTHON-BIN 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/dnssec-keymgr.8 MAN DOCBOOK -./bin/python/dnssec-keymgr.docbook SGML 2016,2017,2018,2019,2020 -./bin/python/dnssec-keymgr.html HTML DOCBOOK -./bin/python/dnssec-keymgr.py.in PYTHON-BIN 2016,2017,2018,2019,2020 -./bin/python/isc/__init__.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/checkds.py.in PYTHON 2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/isc/coverage.py.in PYTHON 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/isc/dnskey.py.in PYTHON 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/python/isc/eventlist.py.in PYTHON 2015,2016,2018,2019,2020 -./bin/python/isc/keydict.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/keyevent.py.in PYTHON 2013,2014,2015,2016,2018,2019,2020 -./bin/python/isc/keymgr.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/keyseries.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/keyzone.py.in PYTHON 2013,2014,2015,2016,2018,2019,2020 -./bin/python/isc/policy.py.in PYTHON 2016,2017,2018,2019,2020 -./bin/python/isc/rndc.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/tests/dnskey_test.py.in PYTHON 2016,2018,2019,2020 -./bin/python/isc/tests/policy_test.py.in PYTHON 2016,2017,2018,2019,2020 -./bin/python/isc/tests/test-policies/01-keysize.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/02-prepublish.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/03-postpublish.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/04-combined-pre-post.pol X 2016,2018,2019,2020 -./bin/python/isc/tests/test-policies/05-numeric-zone.pol X 2017,2018,2019,2020 -./bin/python/isc/tests/testdata/Kexample.com.+007+35529.key X 2016,2018,2019,2020 -./bin/python/isc/tests/testdata/Kexample.com.+007+35529.private X 2016,2018,2019,2020 -./bin/python/isc/utils.py.in PYTHON 2016,2018,2019,2020 -./bin/python/setup.py PYTHON 2016,2018,2019,2020 ./bin/rndc/include/rndc/os.h C 2001,2004,2005,2007,2009,2016,2018,2019,2020 ./bin/rndc/rndc.8 MAN DOCBOOK ./bin/rndc/rndc.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -423,21 +387,6 @@ ./bin/tests/system/checkconf/dnssec.3 X 2011,2016,2017,2018,2019,2020 ./bin/tests/system/checkconf/good.zonelist X 2016,2017,2018,2019,2020 ./bin/tests/system/checkconf/tests.sh SH 2005,2007,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/clean.sh SH 2012,2013,2014,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/dig.bat BAT 2016,2018,2019,2020 -./bin/tests/system/checkds/dig.pl PERL 2014,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/dig.sh SH 2012,2013,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/missing.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/missing.example.ds.db X 2012,2018,2019 -./bin/tests/system/checkds/none.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/none.example.ds.db X 2012,2018,2019 -./bin/tests/system/checkds/ok.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/ok.example.ds.db X 2012,2018,2019 -./bin/tests/system/checkds/prep.example.db X 2017,2018,2019 -./bin/tests/system/checkds/prep.example.ds.db X 2017,2018,2019 -./bin/tests/system/checkds/tests.sh SH 2012,2013,2014,2016,2017,2018,2019,2020 -./bin/tests/system/checkds/wrong.example.dnskey.db X 2012,2018,2019 -./bin/tests/system/checkds/wrong.example.ds.db X 2012,2018,2019 ./bin/tests/system/checknames/clean.sh SH 2004,2007,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/checknames/setup.sh SH 2004,2007,2012,2014,2016,2018,2019,2020 ./bin/tests/system/checknames/tests.sh SH 2004,2007,2012,2013,2014,2015,2016,2018,2019,2020 @@ -454,33 +403,6 @@ ./bin/tests/system/cookie/clean.sh SH 2014,2015,2016,2018,2019,2020 ./bin/tests/system/cookie/setup.sh SH 2018,2019,2020 ./bin/tests/system/cookie/tests.sh SH 2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/coverage/01-ksk-inactive/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/01-ksk-inactive/expect X 2013,2018,2019,2020 -./bin/tests/system/coverage/02-zsk-inactive/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/02-zsk-inactive/expect X 2013,2018,2019,2020 -./bin/tests/system/coverage/03-ksk-unpublished/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/03-ksk-unpublished/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/04-zsk-unpublished/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/04-zsk-unpublished/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/05-ksk-unpub-active/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/05-ksk-unpub-active/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/06-zsk-unpub-active/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/06-zsk-unpub-active/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/07-ksk-ttl/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/07-ksk-ttl/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/08-zsk-ttl/README X 2013,2018,2019,2020 -./bin/tests/system/coverage/08-zsk-ttl/expect X 2013,2016,2018,2019,2020 -./bin/tests/system/coverage/09-check-zsk/README X 2014,2018,2019,2020 -./bin/tests/system/coverage/09-check-zsk/expect X 2014,2018,2019,2020 -./bin/tests/system/coverage/10-check-ksk/README X 2014,2018,2019,2020 -./bin/tests/system/coverage/10-check-ksk/expect X 2014,2018,2019,2020 -./bin/tests/system/coverage/11-cutoff/README X 2014,2018,2019,2020 -./bin/tests/system/coverage/11-cutoff/expect X 2014,2018,2019,2020 -./bin/tests/system/coverage/12-ksk-deletion/expect X 2018,2019,2020 -./bin/tests/system/coverage/13-dotted-dotless/expect X 2019,2020 -./bin/tests/system/coverage/clean.sh SH 2013,2014,2016,2018,2019,2020 -./bin/tests/system/coverage/setup.sh SH 2013,2014,2016,2017,2018,2019,2020 -./bin/tests/system/coverage/tests.sh SH 2013,2014,2016,2018,2019,2020 ./bin/tests/system/database/clean.sh SH 2011,2012,2014,2016,2018,2019,2020 ./bin/tests/system/database/setup.sh SH 2011,2012,2016,2018,2019,2020 ./bin/tests/system/database/tests.sh SH 2011,2012,2016,2018,2019,2020 @@ -706,51 +628,6 @@ ./bin/tests/system/keepalive/expected X 2017,2018,2019,2020 ./bin/tests/system/keepalive/setup.sh SH 2017,2018,2019,2020 ./bin/tests/system/keepalive/tests.sh SH 2017,2018,2019,2020 -./bin/tests/system/keymgr/01-ksk-inactive/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/01-ksk-inactive/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/02-zsk-inactive/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/02-zsk-inactive/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/03-ksk-unpublished/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/03-ksk-unpublished/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/04-zsk-unpublished/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/04-zsk-unpublished/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/05-ksk-unpub-active/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/05-ksk-unpub-active/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/06-zsk-unpub-active/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/06-zsk-unpub-active/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/07-ksk-ttl/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/07-ksk-ttl/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/08-zsk-ttl/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/08-zsk-ttl/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/09-no-keys/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/09-no-keys/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/10-change-roll/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/10-change-roll/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/11-many-simul/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/11-many-simul/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/12-many-active/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/12-many-active/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/13-noroll/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/13-noroll/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/14-wrongalg/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/14-wrongalg/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/15-unspec/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/15-unspec/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/16-wrongalg-unspec/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/16-wrongalg-unspec/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/17-noforce/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/17-noforce/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/18-nonstd-prepub/README TXT.BRIEF 2016,2018,2019,2020 -./bin/tests/system/keymgr/18-nonstd-prepub/expect X 2016,2018,2019,2020 -./bin/tests/system/keymgr/19-old-keys/README TXT.BRIEF 2019,2020 -./bin/tests/system/keymgr/19-old-keys/expect X 2019,2020 -./bin/tests/system/keymgr/19-old-keys/extra.sh SH 2019,2020 -./bin/tests/system/keymgr/clean.sh SH 2016,2018,2019,2020 -./bin/tests/system/keymgr/policy.good X 2016,2018,2019,2020 -./bin/tests/system/keymgr/policy.sample X 2016,2017,2018,2019,2020 -./bin/tests/system/keymgr/setup.sh SH 2016,2017,2018,2019,2020 -./bin/tests/system/keymgr/testpolicy.py PYTHON 2016,2018,2019,2020 -./bin/tests/system/keymgr/tests.sh SH 2016,2018,2019,2020 ./bin/tests/system/legacy/build.sh SH 2014,2016,2017,2018,2019,2020 ./bin/tests/system/legacy/clean.sh SH 2014,2016,2018,2019,2020 ./bin/tests/system/legacy/ns1/trusted.conf X 2014,2018,2019 @@ -1385,10 +1262,6 @@ ./contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c X 2013,2015,2016,2018,2019,2020 ./contrib/dlz/modules/wildcard/testing/named.conf X 2013,2018,2019 ./contrib/dnspriv/nginx.conf SH 2017,2018,2019 -./contrib/kasp/README X 2016,2018,2019,2020 -./contrib/kasp/kasp.xml X 2016,2018,2019,2020 -./contrib/kasp/kasp2policy.py X 2016,2018,2019,2020 -./contrib/kasp/policy.good X 2016,2018,2019,2020 ./contrib/scripts/catzhash.py X 2020 ./contrib/scripts/check-secure-delegation.pl.in PERL 2010,2012,2014,2016,2018,2019,2020 ./contrib/scripts/check5011.pl X 2013,2014,2017,2018,2019,2020 @@ -1434,13 +1307,10 @@ ./doc/arm/man.delv.html X 2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dig.html X 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-cds.html X 2017,2018,2019,2020 -./doc/arm/man.dnssec-checkds.html X 2013,2014,2015,2016,2017,2018,2019,2020 -./doc/arm/man.dnssec-coverage.html X 2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-dsfromkey.html X 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-importkey.html X 2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-keyfromlabel.html X 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-keygen.html X 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./doc/arm/man.dnssec-keymgr.html X 2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-revoke.html X 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-settime.html X 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./doc/arm/man.dnssec-signzone.html X 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 diff --git a/win32utils/Configure b/win32utils/Configure index dc403e32e9..d3c839540c 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -25,25 +25,7 @@ my $configfile = "..\\config.h"; my $platformfile = "..\\lib\\isc\\win32\\include\\isc\\platform.h"; my $confshfile = "..\\bin\\tests\\system\\conf.sh"; -my @filelist = ("..\\bin\\python\\dnssec-checkds.py", - "..\\bin\\python\\dnssec-coverage.py", - "..\\bin\\python\\dnssec-keymgr.py", - "..\\bin\\python\\isc\\__init__.py", - "..\\bin\\python\\isc\\checkds.py", - "..\\bin\\python\\isc\\coverage.py", - "..\\bin\\python\\isc\\dnskey.py", - "..\\bin\\python\\isc\\eventlist.py", - "..\\bin\\python\\isc\\keydict.py", - "..\\bin\\python\\isc\\keyevent.py", - "..\\bin\\python\\isc\\keymgr.py", - "..\\bin\\python\\isc\\keyseries.py", - "..\\bin\\python\\isc\\keyzone.py", - "..\\bin\\python\\isc\\policy.py", - "..\\bin\\python\\isc\\rndc.py", - "..\\bin\\python\\isc\\tests\\dnskey_test.py", - "..\\bin\\python\\isc\\tests\\policy_test.py", - "..\\bin\\python\\isc\\utils.py", - "..\\lib\\dns\\win32\\libdns.def", +my @filelist = ("..\\lib\\dns\\win32\\libdns.def", "..\\lib\\isc\\win32\\libisc.def"); my @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj", @@ -236,13 +218,10 @@ my @substdefp = (); my %configtest; -my @substtest = ("CHECKDS", - "COVERAGE", - "CRYPTO", +my @substtest = ("CRYPTO", "DNSTAP", "FSTRM_CAPTURE", "JSONSTATS", - "KEYMGR", "NZD_TOOLS", "XMLSTATS", "ZLIB"), @@ -307,7 +286,6 @@ my @substvar = ("BIND9_VERSION", "COPTY", "DLZ_SYSTEM_TEST", "EXEEXT", - "expanded_sysconfdir", "INTRINSIC", "MACHINE", "OPENSSL_PATH", @@ -317,7 +295,6 @@ my @substvar = ("BIND9_VERSION", "prefix", "PSSUSPEND", "PYTHON", - "PYTHON_INSTALL_DIR", "TOOLS_VERSION", "VCREDIST_PATH", "WINDOWS_TARGET_PLATFORM_VERSION"), @@ -1996,73 +1973,12 @@ if ($use_python ne "no") { if ($python_command !~ /\.exe$/i) { $python_command = $python_command . ".exe"; } - # tried to use the full path without success here - if ($verbose) { - print "checking for python module 'argparse'\n"; - } - my $pythonret = `"$python_command" -c "import argparse" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'argparse': $pythonret\n"; - } else { - print STDERR "can't find python module 'argparse': $pythonret\n"; - $use_python = "no"; - } - } - if ($use_python ne "no") { - if ($verbose) { - print "checking for python module 'ply'\n"; - } - $pythonret = `"$python_command" -c "from ply import *" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'ply': $pythonret\n"; - } else { - print STDERR "can't find python module 'ply': $pythonret\n"; - $use_python = "no"; - } - } - } - if ($use_python ne "no") { - if ($verbose) { - print "checking for python module 'win32api'\n"; - } - $pythonret = `"$python_command" -c "import win32api" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'win32api': $pythonret\n"; - } else { - print STDERR - "can't find python module 'win32api': $pythonret\n"; - $use_python = "no"; - } - } - } - if ($use_python ne "no") { - if ($verbose) { - print "checking for python module 'win32con'\n"; - } - $pythonret = `"$python_command" -c "import win32con" 2>&1`; - if ($? != 0) { - if ($use_python ne "auto") { - die "can't find python module 'win32con': $pythonret\n"; - } else { - print STDERR - "can't find python module 'win32con': $pythonret\n"; - $use_python = "no"; - } - } - } if ($use_python ne "no") { $configcond{"PYTHON"} = 1; $configdefd{"USE_PYTHON"} = "USE_PYTHON"; $configvar{"PYTHON"} = "$python_command"; - $configtest{"CHECKDS"} = "checkds"; - $configtest{"COVERAGE"} = "coverage"; - $configtest{"KEYMGR"} = "keymgr"; # Doesn't matter $configvar{"prefix"} = "__prefix__"; - $configvar{"expanded_sysconfdir"} = "__prefix__\\etc"; } } @@ -2711,11 +2627,6 @@ sub makeinstallfile { print LOUT "pkcs11-list.exe-BNFF\n"; print LOUT "pkcs11-tokens.exe-BNFF\n"; } - if ($use_python ne "no") { - print LOUT "dnssec-checkds.py-BNFF\n"; - print LOUT "dnssec-coverage.py-BNFF\n"; - print LOUT "dnssec-keymgr.py-BNFF\n"; - } print LOUT "readme1st.txt-BTFT\n"; close LOUT; } diff --git a/win32utils/build.txt b/win32utils/build.txt index 22d0a63165..35ce02d5c5 100644 --- a/win32utils/build.txt +++ b/win32utils/build.txt @@ -25,9 +25,6 @@ If you wish to use zlib/deflate on the statistics channel, zlib must be downloaded and built on the system on which you are building BIND 9. -If you wish to use python tools, you need a python (version 2 or 3) -interpreter with its standard libraries. - If you wish to use readline, the readline library must be downloaded and built on the system on which you are building BIND 9. @@ -130,25 +127,7 @@ Step 5: Download and build GeoIP This patch has been submitted upstream, and will be included in future versions of libGeoIP. -Step 6: Enable python tools - - Some python packages are required: argparse, ply, win32con and win32api. - Last CPython's (version 2 or 3) from https://www.python.org include - the pip package manager which can install missing packages, for - instance for the 2 last packages 'pip install pypiwin32' downloads and - installs win32con and win32api. - - Note when the python interpreter is in the command path and - the required packages available the Configure script will detect - them and add python tools to the BIND 9 build. - - To be used a python tool must be invoked with python (e.g., - python dnssec-checkds.py ) as the shebang doesn't work - on Windows. The isc package should be installed too, cf step 12. - Unlike on Unix systems, this isc package uses the Registry to - learn where BIND 9 was installed in step 11. - -Step 7: Download and build Readline +Step 6: Download and build Readline The readline library adds command-line editing in nslookup and nsupdate. If you wish to build BIND 9 without support for this feature, skip to @@ -164,7 +143,7 @@ Step 7: Download and build Readline Note: Windows command (cmd.exe) provides an integrated line editing feature so it is not recommended to configure bind with readline. -Step 8: Make the redistributable runtime object available +Step 7: Make the redistributable runtime object available Check that the Microsoft redistributable object (vcredist_x86.exe or vcredist_x64.exe) is available to the build. The file may be placed @@ -176,7 +155,7 @@ Step 8: Make the redistributable runtime object available step 9). If none of these options is used, Configure will attempt to find the redistributable based on clues in the build environment. -Step 9: Configuring the BIND 9 build +Step 8: Configuring the BIND 9 build From the command prompt, cd to the win32utils directory under the BIND 9 root: @@ -196,7 +175,7 @@ Step 9: Configuring the BIND 9 build perl Configure clean -Step 10: Building BIND 9 +Step 9: Building BIND 9 Building using 'nmake' or older versions of Visual Studio (e.g. VS 2005 or VS 2008) is no longer supported. @@ -241,7 +220,7 @@ Step 10: Building BIND 9 After this step this documentation applies to external or remote builds, i.e., is common with installation. -Step 11: Install +Step 10: Install Installation is accomplished by running the BINDInstall program. All DLL's are copied to the Program Files area and all applications @@ -264,18 +243,5 @@ Step 11: Install The idea is to be able to use any BINDInstall.exe binary so a non-free version of Visual Studio is no longer required. -Step 12: Python package install - - When BIND 9 was built with python support, the isc python package - must be installed locally by: - - cd - cd bin/python - python setup.py install - - (replace 'python' by the path of your python interpreter if needed.) - - BIND 9 python tools should work with version 2 or 3, 32 or 64 bits. - Please report bugs, whether in the process of building the application or in BIND 9 itself, at https://gitlab.isc.org/isc-projects/bind9. From 4df5a5832c77be5716789a5eabef461be43da284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 23 Oct 2018 10:28:47 +0200 Subject: [PATCH 2/3] Remove files generated by autotools --- .gitignore | 1 + Makefile.in | 114 - aclocal.m4 | 388 - autogen.sh | 13 - bin/Makefile.in | 18 - bin/check/Makefile.in | 101 - bin/confgen/Makefile.in | 110 - bin/confgen/unix/Makefile.in | 28 - bin/delv/Makefile.in | 80 - bin/dig/Makefile.in | 110 - bin/dnssec/Makefile.in | 126 - bin/named/Makefile.in | 179 - bin/named/unix/Makefile.in | 30 - bin/nsupdate/Makefile.in | 93 - bin/pkcs11/Makefile.in | 101 - bin/plugins/Makefile.in | 79 - bin/rndc/Makefile.in | 87 - bin/tests/Makefile.in | 82 - bin/tests/optional/Makefile.in | 226 - bin/tests/pkcs11/Makefile.in | 30 - bin/tests/pkcs11/benchmarks/Makefile.in | 72 - bin/tests/system/Makefile.in | 95 - bin/tests/system/dlzexternal/Makefile.in | 47 - bin/tests/system/dyndb/Makefile.in | 21 - bin/tests/system/dyndb/driver/Makefile.in | 58 - bin/tests/system/pipelined/Makefile.in | 47 - bin/tests/system/rndc/Makefile.in | 46 - bin/tests/system/rpz/Makefile.in | 48 - bin/tests/system/rsabigexponent/Makefile.in | 49 - bin/tests/system/tkey/Makefile.in | 53 - bin/tools/Makefile.in | 162 - config.guess | 1568 -- config.h.in | 662 - config.sub | 1793 -- config.threads.in | 125 - configure | 26207 ------------------ contrib/dlz/bin/dlzbdb/Makefile.in | 62 - contrib/dlz/modules/mysql/Makefile.in | 21 - contrib/dlz/modules/mysqldyn/Makefile.in | 21 - doc/Makefile.in | 21 - doc/arm/Makefile.in | 79 - doc/doxygen/Makefile.in | 31 - doc/misc/Makefile.in | 80 - doc/tex/Makefile.in | 20 - doc/xsl/Makefile.in | 21 - fuzz/Makefile.in | 44 - install-sh | 250 - lib/Makefile.in | 21 - lib/bind9/Makefile.in | 82 - lib/bind9/include/Makefile.in | 17 - lib/bind9/include/bind9/Makefile.in | 39 - lib/dns/Makefile.in | 220 - lib/dns/include/Makefile.in | 17 - lib/dns/include/dns/Makefile.in | 60 - lib/dns/include/dst/Makefile.in | 34 - lib/dns/tests/Makefile.in | 270 - lib/irs/Makefile.in | 81 - lib/irs/include/Makefile.in | 17 - lib/irs/include/irs/Makefile.in | 44 - lib/irs/tests/Makefile.in | 49 - lib/irs/win32/Makefile.in | 17 - lib/irs/win32/include/Makefile.in | 17 - lib/irs/win32/include/irs/Makefile.in | 26 - lib/isc/Makefile.in | 140 - lib/isc/include/Makefile.in | 17 - lib/isc/include/isc/Makefile.in | 59 - lib/isc/include/pk11/Makefile.in | 38 - lib/isc/include/pkcs11/Makefile.in | 38 - lib/isc/netmgr/Makefile.in | 35 - lib/isc/pthreads/Makefile.in | 30 - lib/isc/pthreads/include/Makefile.in | 17 - lib/isc/pthreads/include/isc/Makefile.in | 34 - lib/isc/tests/Makefile.in | 212 - lib/isc/unix/Makefile.in | 46 - lib/isc/unix/include/Makefile.in | 17 - lib/isc/unix/include/isc/Makefile.in | 35 - lib/isc/win32/Makefile.in | 34 - lib/isc/win32/include/Makefile.in | 17 - lib/isc/win32/include/isc/Makefile.in | 30 - lib/isccc/Makefile.in | 84 - lib/isccc/include/Makefile.in | 17 - lib/isccc/include/isccc/Makefile.in | 39 - lib/isccc/tests/Makefile.in | 49 - lib/isccfg/Makefile.in | 82 - lib/isccfg/include/Makefile.in | 17 - lib/isccfg/include/isccfg/Makefile.in | 40 - lib/isccfg/tests/Makefile.in | 55 - lib/ns/Makefile.in | 93 - lib/ns/include/Makefile.in | 17 - lib/ns/include/ns/Makefile.in | 35 - lib/ns/tests/Makefile.in | 95 - lib/samples/Makefile.in | 97 - ltmain.sh | 11147 -------- m4/libtool.m4 | 8369 ------ m4/ltoptions.m4 | 437 - m4/ltsugar.m4 | 124 - m4/ltversion.m4 | 23 - m4/lt~obsolete.m4 | 99 - make/Makefile.in | 20 - util/copyrights | 6 - 100 files changed, 1 insertion(+), 56453 deletions(-) delete mode 100644 Makefile.in delete mode 100644 aclocal.m4 delete mode 100755 autogen.sh delete mode 100644 bin/Makefile.in delete mode 100644 bin/check/Makefile.in delete mode 100644 bin/confgen/Makefile.in delete mode 100644 bin/confgen/unix/Makefile.in delete mode 100644 bin/delv/Makefile.in delete mode 100644 bin/dig/Makefile.in delete mode 100644 bin/dnssec/Makefile.in delete mode 100644 bin/named/Makefile.in delete mode 100644 bin/named/unix/Makefile.in delete mode 100644 bin/nsupdate/Makefile.in delete mode 100644 bin/pkcs11/Makefile.in delete mode 100644 bin/plugins/Makefile.in delete mode 100644 bin/rndc/Makefile.in delete mode 100644 bin/tests/Makefile.in delete mode 100644 bin/tests/optional/Makefile.in delete mode 100644 bin/tests/pkcs11/Makefile.in delete mode 100644 bin/tests/pkcs11/benchmarks/Makefile.in delete mode 100644 bin/tests/system/Makefile.in delete mode 100644 bin/tests/system/dlzexternal/Makefile.in delete mode 100644 bin/tests/system/dyndb/Makefile.in delete mode 100644 bin/tests/system/dyndb/driver/Makefile.in delete mode 100644 bin/tests/system/pipelined/Makefile.in delete mode 100644 bin/tests/system/rndc/Makefile.in delete mode 100644 bin/tests/system/rpz/Makefile.in delete mode 100644 bin/tests/system/rsabigexponent/Makefile.in delete mode 100644 bin/tests/system/tkey/Makefile.in delete mode 100644 bin/tools/Makefile.in delete mode 100644 config.guess delete mode 100644 config.h.in delete mode 100644 config.sub delete mode 100644 config.threads.in delete mode 100755 configure delete mode 100644 contrib/dlz/bin/dlzbdb/Makefile.in delete mode 100644 contrib/dlz/modules/mysql/Makefile.in delete mode 100644 contrib/dlz/modules/mysqldyn/Makefile.in delete mode 100644 doc/Makefile.in delete mode 100644 doc/arm/Makefile.in delete mode 100644 doc/doxygen/Makefile.in delete mode 100644 doc/misc/Makefile.in delete mode 100644 doc/tex/Makefile.in delete mode 100644 doc/xsl/Makefile.in delete mode 100644 fuzz/Makefile.in delete mode 100755 install-sh delete mode 100644 lib/Makefile.in delete mode 100644 lib/bind9/Makefile.in delete mode 100644 lib/bind9/include/Makefile.in delete mode 100644 lib/bind9/include/bind9/Makefile.in delete mode 100644 lib/dns/Makefile.in delete mode 100644 lib/dns/include/Makefile.in delete mode 100644 lib/dns/include/dns/Makefile.in delete mode 100644 lib/dns/include/dst/Makefile.in delete mode 100644 lib/dns/tests/Makefile.in delete mode 100644 lib/irs/Makefile.in delete mode 100644 lib/irs/include/Makefile.in delete mode 100644 lib/irs/include/irs/Makefile.in delete mode 100644 lib/irs/tests/Makefile.in delete mode 100644 lib/irs/win32/Makefile.in delete mode 100644 lib/irs/win32/include/Makefile.in delete mode 100644 lib/irs/win32/include/irs/Makefile.in delete mode 100644 lib/isc/Makefile.in delete mode 100644 lib/isc/include/Makefile.in delete mode 100644 lib/isc/include/isc/Makefile.in delete mode 100644 lib/isc/include/pk11/Makefile.in delete mode 100644 lib/isc/include/pkcs11/Makefile.in delete mode 100644 lib/isc/netmgr/Makefile.in delete mode 100644 lib/isc/pthreads/Makefile.in delete mode 100644 lib/isc/pthreads/include/Makefile.in delete mode 100644 lib/isc/pthreads/include/isc/Makefile.in delete mode 100644 lib/isc/tests/Makefile.in delete mode 100644 lib/isc/unix/Makefile.in delete mode 100644 lib/isc/unix/include/Makefile.in delete mode 100644 lib/isc/unix/include/isc/Makefile.in delete mode 100644 lib/isc/win32/Makefile.in delete mode 100644 lib/isc/win32/include/Makefile.in delete mode 100644 lib/isc/win32/include/isc/Makefile.in delete mode 100644 lib/isccc/Makefile.in delete mode 100644 lib/isccc/include/Makefile.in delete mode 100644 lib/isccc/include/isccc/Makefile.in delete mode 100644 lib/isccc/tests/Makefile.in delete mode 100644 lib/isccfg/Makefile.in delete mode 100644 lib/isccfg/include/Makefile.in delete mode 100644 lib/isccfg/include/isccfg/Makefile.in delete mode 100644 lib/isccfg/tests/Makefile.in delete mode 100644 lib/ns/Makefile.in delete mode 100644 lib/ns/include/Makefile.in delete mode 100644 lib/ns/include/ns/Makefile.in delete mode 100644 lib/ns/tests/Makefile.in delete mode 100644 lib/samples/Makefile.in delete mode 100644 ltmain.sh delete mode 100644 m4/libtool.m4 delete mode 100644 m4/ltoptions.m4 delete mode 100644 m4/ltsugar.m4 delete mode 100644 m4/ltversion.m4 delete mode 100644 m4/lt~obsolete.m4 delete mode 100644 make/Makefile.in diff --git a/.gitignore b/.gitignore index 8c4e339463..bb2e9e9a88 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ /stamp-h1 /test-driver Makefile +Makefile.in ans.run gen.dSYM/ kyua.log diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 5f31d643e2..0000000000 --- a/Makefile.in +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = @top_builddir@ - -VERSION=@BIND9_VERSION@ - -SUBDIRS = make lib fuzz bin doc -TARGETS = -PREREQS = bind.keys.h - -MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS CODE_OF_CONDUCT \ - ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -newrr: - cd lib/dns; ${MAKE} newrr - -bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl - ${PERL} ${srcdir}/util/bindkeys.pl < ${top_srcdir}/bind.keys > $@ - -distclean:: - rm -f config.cache config.h config.log config.status TAGS - rm -f libtool configure.lineno - rm -f util/conf.sh docutil/docbook2man-wrapper.sh - -# XXX we should clean libtool stuff too. Only do this after we add rules -# to make it. -maintainer-clean:: - rm -f configure - rm -f bind.keys.h - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -doc man:: ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \ - ${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 - -install:: installdirs - ${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir} - -uninstall:: - rm -f ${DESTDIR}${sysconfdir}/bind.keys - -test check: - @if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \ - echo I: NOTE: The tests were not run because they require that; \ - echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \ - echo I: as alias addresses on the loopback interface. Please run; \ - echo I: \'bin/tests/system/ifconfig.sh up\' as root to configure; \ - echo I: them, then rerun the tests. Run make force-test to run the; \ - echo I: tests anyway.; \ - exit 1; \ - fi - ${MAKE} test-force - -force-test: test-force - -test-force: - status=0; \ - (cd fuzz && ${MAKE} check) || status=1; \ - (cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \ - (test -f ${top_builddir}/unit/unittest.sh && \ - $(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \ - exit $$status - -README: README.md - ${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \ - ${W3M} -dump -cols 75 -O ascii -T text/html | \ - sed -e '$${/^$$/d;}' > $@ - -HISTORY: HISTORY.md - ${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \ - ${W3M} -dump -cols 75 -O ascii -T text/html | \ - sed -e '$${/^$$/d;}' > $@ - -OPTIONS: OPTIONS.md - ${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \ - ${W3M} -dump -cols 75 -O ascii -T text/html | \ - sed -e '$${/^$$/d;}' > $@ - -CONTRIBUTING: CONTRIBUTING.md - ${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \ - ${W3M} -dump -cols 75 -O ascii -T text/html | \ - sed -e '$${/^$$/d;}' > $@ - -PLATFORMS: PLATFORMS.md - ${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \ - ${W3M} -dump -cols 75 -O ascii -T text/html | \ - sed -e '$${/^$$/d;}' > $@ - -CODE_OF_CONDUCT: CODE_OF_CONDUCT.md - ${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html CODE_OF_CONDUCT.md | \ - ${W3M} -dump -cols 75 -O ascii -T text/html | \ - sed -e '$${/^$$/d;}' > $@ - -unit:: - sh ${top_builddir}/unit/unittest.sh - -clean:: diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index bbf2316042..0000000000 --- a/aclocal.m4 +++ /dev/null @@ -1,388 +0,0 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- - -# Copyright (C) 1996-2020 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 12 (pkg-config-0.29.2) - -dnl Copyright © 2004 Scott James Remnant . -dnl Copyright © 2012-2015 Dan Nicholson -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. - -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.2]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ - -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. -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 -])dnl PKG_PROG_PKG_CONFIG - -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl 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]) - -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. -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 -])dnl _PKG_CONFIG - -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. -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 -])dnl _PKG_SHORT_ERRORS_SUPPORTED - - -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl 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 $2]) - -_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 -])dnl PKG_CHECK_MODULES - - -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl 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 - - -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --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 - - -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl 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 -])dnl PKG_CHECK_VAR - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -# Copyright (C) 2006-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -m4_include([m4/ax_check_compile_flag.m4]) -m4_include([m4/ax_check_openssl.m4]) -m4_include([m4/ax_lib_lmdb.m4]) -m4_include([m4/ax_posix_shell.m4]) -m4_include([m4/ax_pthread.m4]) -m4_include([m4/ax_restore_flags.m4]) -m4_include([m4/ax_save_flags.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 583b00d870..0000000000 --- a/autogen.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# Run this script after modifying configure.in to generate configure -autoreconf -f -i diff --git a/bin/Makefile.in b/bin/Makefile.in deleted file mode 100644 index 389557222e..0000000000 --- a/bin/Makefile.in +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \ - @NZD_TOOLS@ @PKCS11_TOOLS@ plugins tests -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/bin/check/Makefile.in b/bin/check/Makefile.in deleted file mode 100644 index 9e8334968f..0000000000 --- a/bin/check/Makefile.in +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \ - ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" -CWARNINGS = - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -BIND9LIBS = ../../lib/bind9/libbind9.@A@ -NSLIBS = ../../lib/ns/libns.@A@ - -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ -NSDEPENDLIBS = ../../lib/ns/libns.@A@ - -LIBS = ${ISCLIBS} @LIBS@ - -SUBDIRS = - -# Alphabetically -TARGETS = named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ - -# Alphabetically -SRCS = named-checkconf.c named-checkzone.c check-tool.c - -MANPAGES = named-checkconf.8 named-checkzone.8 - -HTMLPAGES = named-checkconf.html named-checkzone.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -named-checkconf.@O@: named-checkconf.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -c ${srcdir}/named-checkconf.c - -named-checkzone.@O@: named-checkzone.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -c ${srcdir}/named-checkzone.c - -named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \ - ${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS} - export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \ - export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \ - ${FINALBUILDCMD} - -named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \ - ${NSDEPENDLIBS} ${DNSDEPLIBS} - export BASEOBJS="named-checkzone.@O@ check-tool.@O@"; \ - export LIBS0="${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \ - ${FINALBUILDCMD} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir} - (cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@) - for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done - (cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8) - -uninstall:: - rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8 - for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done - rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkconf@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@ - -clean distclean:: - rm -f ${TARGETS} r1.htm diff --git a/bin/confgen/Makefile.in b/bin/confgen/Makefile.in deleted file mode 100644 index 2cd57c17ad..0000000000 --- a/bin/confgen/Makefile.in +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -# Attempt to disable parallel processing. -.NOTPARALLEL: -.NO_PARALLEL: - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/include ${ISC_INCLUDES} ${ISCCC_INCLUDES} \ - ${ISCCFG_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} - -CDEFINES = -CWARNINGS = - -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCCCLIBS = ../../lib/isccc/libisccc.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -BIND9LIBS = ../../lib/bind9/libbind9.@A@ - -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCCCDEPLIBS = ../../lib/isccc/libisccc.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ - -RNDCLIBS = ${ISCCFGLIBS} ${ISCCCLIBS} ${BIND9LIBS} ${DNSLIBS} ${ISCLIBS} @LIBS@ -RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ - -CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} - -SRCS= rndc-confgen.c ddns-confgen.c - -SUBDIRS = unix - -TARGETS = rndc-confgen@EXEEXT@ ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@ - -MANPAGES = rndc-confgen.8 ddns-confgen.8 - -HTMLPAGES = rndc-confgen.html ddns-confgen.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -UOBJS = unix/os.@O@ - -@BIND9_MAKE_RULES@ - -rndc-confgen.@O@: rndc-confgen.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \ - -c ${srcdir}/rndc-confgen.c - -ddns-confgen.@O@: ddns-confgen.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c ${srcdir}/ddns-confgen.c - -rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS} - export BASEOBJS="rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \ - ${FINALBUILDCMD} - -ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS} - export BASEOBJS="ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \ - ${FINALBUILDCMD} - -# make a link in the build directory to assist with testing -tsig-keygen@EXEEXT@: ddns-confgen@EXEEXT@ - rm -f tsig-keygen@EXEEXT@ - ${LINK_PROGRAM} ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@ - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: rndc-confgen@EXEEXT@ ddns-confgen@EXEEXT@ installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} rndc-confgen@EXEEXT@ ${DESTDIR}${sbindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} ddns-confgen@EXEEXT@ ${DESTDIR}${sbindir} - ${INSTALL_DATA} ${srcdir}/rndc-confgen.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/ddns-confgen.8 ${DESTDIR}${mandir}/man8 - (cd ${DESTDIR}${sbindir}; rm -f tsig-keygen@EXEEXT@; ${LINK_PROGRAM} ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@) - (cd ${DESTDIR}${mandir}/man8; rm -f tsig-keygen.8; ${LINK_PROGRAM} ddns-confgen.8 tsig-keygen.8) - -uninstall:: - rm -f ${DESTDIR}${mandir}/man8/tsig-keygen.8 - rm -f ${DESTDIR}${sbindir}/tsig-keygen@EXEEXT@ - rm -f ${DESTDIR}${mandir}/man8/ddns-confgen.8 - rm -f ${DESTDIR}${mandir}/man8/rndc-confgen.8 - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/ddns-confgen@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/rndc-confgen@EXEEXT@ - -clean distclean maintainer-clean:: - rm -f ${TARGETS} diff --git a/bin/confgen/unix/Makefile.in b/bin/confgen/unix/Makefile.in deleted file mode 100644 index 64e3cb8bb5..0000000000 --- a/bin/confgen/unix/Makefile.in +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \ - ${DNS_INCLUDES} ${ISC_INCLUDES} - -CDEFINES = -CWARNINGS = - -OBJS = os.@O@ - -SRCS = os.c - -TARGETS = ${OBJS} - -@BIND9_MAKE_RULES@ diff --git a/bin/delv/Makefile.in b/bin/delv/Makefile.in deleted file mode 100644 index c0c1f4a219..0000000000 --- a/bin/delv/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${IRS_INCLUDES} ${ISCCFG_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -DVERSION=\"${VERSION}\" \ - -DSYSCONFDIR=\"${sysconfdir}\" -CWARNINGS = - -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -IRSLIBS = ../../lib/irs/libirs.@A@ - -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -IRSDEPLIBS = ../../lib/irs/libirs.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ - -SUBDIRS = - -TARGETS = delv@EXEEXT@ - -OBJS = delv.@O@ - -SRCS = delv.c - -MANPAGES = delv.1 - -HTMLPAGES = delv.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -delv@EXEEXT@: delv.@O@ ${DEPLIBS} - export BASEOBJS="delv.@O@"; \ - export LIBS0="${DNSLIBS}"; \ - ${FINALBUILDCMD} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 - -install:: delv@EXEEXT@ installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \ - delv@EXEEXT@ ${DESTDIR}${bindir} - ${INSTALL_DATA} ${srcdir}/delv.1 ${DESTDIR}${mandir}/man1 - -uninstall:: - rm -f ${DESTDIR}${mandir}/man1/delv.1 - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/delv@EXEEXT@ - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -clean distclean maintainer-clean:: - rm -f ${TARGETS} diff --git a/bin/dig/Makefile.in b/bin/dig/Makefile.in deleted file mode 100644 index b6c573cd56..0000000000 --- a/bin/dig/Makefile.in +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -READLINE_LIB = @READLINE_LIB@ - -CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \ - ${BIND9_INCLUDES} ${ISC_INCLUDES} \ - ${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ \ - ${OPENSSL_CFLAGS} - -CDEFINES = -DVERSION=\"${VERSION}\" -CWARNINGS = - -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -BIND9LIBS = ../../lib/bind9/libbind9.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -IRSLIBS = ../../lib/irs/libirs.@A@ - -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -IRSDEPLIBS = ../../lib/irs/libirs.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \ - ${ISCDEPLIBS} ${ISCCFGDEPLIBS} - -LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \ - ${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@ - -SUBDIRS = - -TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ - -OBJS = dig.@O@ dighost.@O@ host.@O@ nslookup.@O@ - -UOBJS = - -SRCS = dig.c dighost.c host.c nslookup.c - -MANPAGES = dig.1 host.1 nslookup.1 - -HTMLPAGES = dig.html host.html nslookup.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -LDFLAGS = @LDFLAGS@ @LIBIDN2_LDFLAGS@ - -dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS} - export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \ - export LIBS0="${DNSLIBS} ${IRSLIBS}"; \ - ${FINALBUILDCMD} - -host@EXEEXT@: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS} - export BASEOBJS="host.@O@ dighost.@O@ ${UOBJS}"; \ - export LIBS0="${DNSLIBS} ${IRSLIBS}"; \ - ${FINALBUILDCMD} - -nslookup@EXEEXT@: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS} - export BASEOBJS="nslookup.@O@ dighost.@O@ ${READLINE_LIB} ${UOBJS}"; \ - export LIBS0="${DNSLIBS} ${IRSLIBS}"; \ - ${FINALBUILDCMD} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -clean distclean maintainer-clean:: - rm -f ${TARGETS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 - -install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \ - dig@EXEEXT@ ${DESTDIR}${bindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \ - host@EXEEXT@ ${DESTDIR}${bindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \ - nslookup@EXEEXT@ ${DESTDIR}${bindir} - for m in ${MANPAGES}; do \ - ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1 || exit 1; \ - done - -uninstall:: - for m in ${MANPAGES}; do \ - rm -f ${DESTDIR}${mandir}/man1/$$m || exit 1; \ - done - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/host@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/dig@EXEEXT@ diff --git a/bin/dnssec/Makefile.in b/bin/dnssec/Makefile.in deleted file mode 100644 index d26db1902f..0000000000 --- a/bin/dnssec/Makefile.in +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -DVERSION=\"${VERSION}\" -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" -CWARNINGS = - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ - -# Alphabetically -TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \ - dnssec-importkey@EXEEXT@ dnssec-keyfromlabel@EXEEXT@ \ - dnssec-keygen@EXEEXT@ dnssec-revoke@EXEEXT@ \ - dnssec-settime@EXEEXT@ dnssec-signzone@EXEEXT@ \ - dnssec-verify@EXEEXT@ - -OBJS = dnssectool.@O@ - -SRCS = dnssec-cds.c dnssec-dsfromkey.c dnssec-importkey.c \ - dnssec-keyfromlabel.c dnssec-keygen.c dnssec-revoke.c \ - dnssec-settime.c dnssec-signzone.c dnssec-verify.c \ - dnssectool.c - -MANPAGES = dnssec-cds.8 dnssec-dsfromkey.8 dnssec-importkey.8 \ - dnssec-keyfromlabel.8 dnssec-keygen.8 dnssec-revoke.8 \ - dnssec-settime.8 dnssec-signzone.8 dnssec-verify.8 - -HTMLPAGES = dnssec-cds.html dnssec-dsfromkey.html \ - dnssec-importkey.html dnssec-keyfromlabel.html \ - dnssec-keygen.html dnssec-revoke.html \ - dnssec-settime.html dnssec-signzone.html \ - dnssec-verify.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -dnssec-cds@EXEEXT@: dnssec-cds.@O@ ${OBJS} ${DEPLIBS} - export BASEOBJS="dnssec-cds.@O@ ${OBJS}"; \ - ${FINALBUILDCMD} - -dnssec-dsfromkey@EXEEXT@: dnssec-dsfromkey.@O@ ${OBJS} ${DEPLIBS} - export BASEOBJS="dnssec-dsfromkey.@O@ ${OBJS}"; \ - ${FINALBUILDCMD} - -dnssec-keyfromlabel@EXEEXT@: dnssec-keyfromlabel.@O@ ${OBJS} ${DEPLIBS} - export BASEOBJS="dnssec-keyfromlabel.@O@ ${OBJS}"; \ - ${FINALBUILDCMD} - -dnssec-keygen@EXEEXT@: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS} - export BASEOBJS="dnssec-keygen.@O@ ${OBJS}"; \ - ${FINALBUILDCMD} - -dnssec-signzone.@O@: dnssec-signzone.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \ - -c ${srcdir}/dnssec-signzone.c - -dnssec-signzone@EXEEXT@: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS} - export BASEOBJS="dnssec-signzone.@O@ ${OBJS}"; \ - ${FINALBUILDCMD} - -dnssec-verify.@O@: dnssec-verify.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \ - -c ${srcdir}/dnssec-verify.c - -dnssec-verify@EXEEXT@: dnssec-verify.@O@ ${OBJS} ${DEPLIBS} - export BASEOBJS="dnssec-verify.@O@ ${OBJS}"; \ - ${FINALBUILDCMD} - -dnssec-revoke@EXEEXT@: dnssec-revoke.@O@ ${OBJS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - dnssec-revoke.@O@ ${OBJS} ${LIBS} - -dnssec-settime@EXEEXT@: dnssec-settime.@O@ ${OBJS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - dnssec-settime.@O@ ${OBJS} ${LIBS} - -dnssec-importkey@EXEEXT@: dnssec-importkey.@O@ ${OBJS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - dnssec-importkey.@O@ ${OBJS} ${LIBS} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: ${TARGETS} installdirs - for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir} || exit 1; done - for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done - -uninstall:: - for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done - for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t || exit 1; done - -clean distclean:: - rm -f ${TARGETS} diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in deleted file mode 100644 index 46c0b5dcca..0000000000 --- a/bin/named/Makefile.in +++ /dev/null @@ -1,179 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -# Attempt to disable parallel processing. -.NOTPARALLEL: -.NO_PARALLEL: - -VERSION=@BIND9_VERSION@ - -@BIND9_PRODUCT@ - -@BIND9_DESCRIPTION@ - -@BIND9_SRCID@ - -@BIND9_CONFIGARGS@ - -@BIND9_MAKE_INCLUDES@ - -# -# Add database drivers here. -# -DBDRIVER_OBJS = -DBDRIVER_SRCS = -DBDRIVER_INCLUDES = -DBDRIVER_LIBS = - -DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers - -DLZDRIVER_OBJS = @DLZ_DRIVER_OBJS@ -DLZDRIVER_SRCS = @DLZ_DRIVER_SRCS@ -DLZDRIVER_INCLUDES = @DLZ_DRIVER_INCLUDES@ -DLZDRIVER_LIBS = @DLZ_DRIVER_LIBS@ - -CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \ - ${NS_INCLUDES} ${DNS_INCLUDES} \ - ${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \ - ${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \ - ${DBDRIVER_INCLUDES} \ - ${OPENSSL_CFLAGS} \ - ${JSON_C_CFLAGS} \ - ${LIBXML2_CFLAGS} \ - ${LMDB_CFLAGS} \ - ${MAXMINDDB_CFLAGS} \ - ${ZLIB_CFLAGS} - -CDEFINES = @CONTRIB_DLZ@ - -CWARNINGS = - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCCCLIBS = ../../lib/isccc/libisccc.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -BIND9LIBS = ../../lib/bind9/libbind9.@A@ -NSLIBS = ../../lib/ns/libns.@A@ - -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCCCDEPLIBS = ../../lib/isccc/libisccc.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ -NSDEPLIBS = ../../lib/ns/libns.@A@ - -DEPLIBS = ${NSDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \ - ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \ - ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \ - ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \ - ${LMDB_LIBS} \ - @LIBS@ - -SUBDIRS = unix - -TARGETS = named@EXEEXT@ - -GEOIP2LINKOBJS = geoip.@O@ - -OBJS = builtin.@O@ config.@O@ control.@O@ \ - controlconf.@O@ fuzz.@O@ \ - @GEOIP2LINKOBJS@ \ - log.@O@ logconf.@O@ main.@O@ \ - server.@O@ statschannel.@O@ \ - tkeyconf.@O@ tsigconf.@O@ zoneconf.@O@ \ - ${DLZDRIVER_OBJS} ${DBDRIVER_OBJS} - -UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@ - -GEOIP2LINKSRCS = geoip.c - -SRCS = builtin.c config.c control.c \ - controlconf.c fuzz.c \ - @GEOIP2LINKSRCS@ \ - log.c logconf.c main.c \ - server.c statschannel.c \ - tkeyconf.c tsigconf.c zoneconf.c \ - ${DLZDRIVER_SRCS} ${DBDRIVER_SRCS} - -MANPAGES = named.8 named.conf.5 - -HTMLPAGES = named.html named.conf.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -main.@O@: main.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DPRODUCT=\"${PRODUCT}\" \ - -DDESCRIPTION=\"${DESCRIPTION}\" \ - -DSRCID=\"${SRCID}\" \ - -DCONFIGARGS="\"${CONFIGARGS}\"" \ - -DBUILDER="\"make\"" \ - -DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \ - -DNAMED_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c - -config.@O@: config.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DSRCID=\"${SRCID}\" \ - -DDYNDB_LIBDIR=\"@libdir@/bind\" \ - -DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \ - -DNAMED_SYSCONFDIR=\"${sysconfdir}\" \ - -DMAXMINDDB_PREFIX=\"@MAXMINDDB_PREFIX@\" \ - -c ${srcdir}/config.c - -server.@O@: server.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DPRODUCT=\"${PRODUCT}\" \ - -DVERSION=\"${VERSION}\" -c ${srcdir}/server.c - -named@EXEEXT@: ${OBJS} ${DEPLIBS} - export BASEOBJS="${OBJS} ${UOBJS}"; \ - ${FINALBUILDCMD} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -clean distclean maintainer-clean:: - rm -f ${TARGETS} ${OBJS} - -maintainer-clean:: - -bind9.xsl.h: bind9.xsl ${srcdir}/convertxsl.pl - ${PERL} ${srcdir}/convertxsl.pl < ${srcdir}/bind9.xsl > bind9.xsl.h - -depend: bind9.xsl.h -statschannel.@O@: bind9.xsl.h - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5 - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: named@EXEEXT@ installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir} - ${INSTALL_DATA} ${srcdir}/named.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5 - -uninstall:: - rm -f ${DESTDIR}${mandir}/man5/named.conf.5 - rm -f ${DESTDIR}${mandir}/man8/named.8 - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named@EXEEXT@ - -@DLZ_DRIVER_RULES@ diff --git a/bin/named/unix/Makefile.in b/bin/named/unix/Makefile.in deleted file mode 100644 index fd9ca8d113..0000000000 --- a/bin/named/unix/Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \ - ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \ - ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -OBJS = os.@O@ dlz_dlopen_driver.@O@ - -SRCS = os.c dlz_dlopen_driver.c - -TARGETS = ${OBJS} - -@BIND9_MAKE_RULES@ diff --git a/bin/nsupdate/Makefile.in b/bin/nsupdate/Makefile.in deleted file mode 100644 index a81ee91938..0000000000 --- a/bin/nsupdate/Makefile.in +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -READLINE_LIB = @READLINE_LIB@ - -DST_GSSAPI_INC = @DST_GSSAPI_INC@ - -CINCLUDES = ${DNS_INCLUDES} ${BIND9_INCLUDES} ${ISC_INCLUDES} \ - ${ISCCFG_INCLUDES} ${IRS_INCLUDES} ${DST_GSSAPI_INC} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -DVERSION=\"${VERSION}\" @USE_GSSAPI@ -CWARNINGS = - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -BIND9LIBS = ../../lib/bind9/libbind9.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -IRSLIBS = ../../lib/irs/libirs.@A@ - -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -IRSDEPLIBS = ../../lib/irs/libirs.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \ - ${ISCDEPLIBS} ${ISCCFGDEPLIBS} - -LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \ - ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ - -SUBDIRS = - -TARGETS = nsupdate@EXEEXT@ - -OBJS = nsupdate.@O@ - -UOBJS = - -SRCS = nsupdate.c - -MANPAGES = nsupdate.1 - -HTMLPAGES = nsupdate.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -nsupdate.@O@: nsupdate.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DSESSION_KEYFILE=\"${localstatedir}/run/named/session.key\" \ - -c ${srcdir}/nsupdate.c - -nsupdate@EXEEXT@: nsupdate.@O@ ${UOBJS} ${DEPLIBS} - export BASEOBJS="nsupdate.@O@ ${READLINE_LIB} ${UOBJS}"; \ - export LIBS0="${DNSLIBS} ${IRSLIBS}"; \ - ${FINALBUILDCMD} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -clean distclean:: - rm -f ${TARGETS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 - -install:: nsupdate@EXEEXT@ installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} nsupdate@EXEEXT@ ${DESTDIR}${bindir} - ${INSTALL_DATA} ${srcdir}/nsupdate.1 ${DESTDIR}${mandir}/man1 - -uninstall:: - rm -f ${DESTDIR}${mandir}/man1/nsupdate.1 - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nsupdate@EXEEXT@ diff --git a/bin/pkcs11/Makefile.in b/bin/pkcs11/Makefile.in deleted file mode 100644 index c5912770e0..0000000000 --- a/bin/pkcs11/Makefile.in +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${ISC_INCLUDES} - -CDEFINES = - -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -ISCDEPLIBS = ../../lib/isc/libisc.@A@ - -DEPLIBS = ${ISCDEPLIBS} - -# if FORCE_STATIC_PROVIDER: LIBS += ${PROVIDER} -LIBS = ${ISCLIBS} @LIBS@ - -SUBDIRS = benchmarks - -TARGETS = pkcs11-list@EXEEXT@ pkcs11-destroy@EXEEXT@ \ - pkcs11-keygen@EXEEXT@ pkcs11-tokens@EXEEXT@ -SRCS = pkcs11-list.c pkcs11-destroy.c \ - pkcs11-keygen.c pkcs11-tokens.c -OBJS = pkcs11-list.@O@ pkcs11-destroy.@O@ \ - pkcs11-keygen.@O@ pkcs11-tokens.@O@ - - -MANPAGES = pkcs11-list.8 pkcs11-destroy.8 \ - pkcs11-keygen.8 pkcs11-tokens.8 -HTMLPAGES = pkcs11-list.html pkcs11-destroy.html \ - pkcs11-keygen.html pkcs11-tokens.html -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -pkcs11-list@EXEEXT@: pkcs11-list.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ pkcs11-list.@O@ ${LIBS} - -pkcs11-destroy@EXEEXT@: pkcs11-destroy.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ pkcs11-destroy.@O@ ${LIBS} - -pkcs11-keygen@EXEEXT@: pkcs11-keygen.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ pkcs11-keygen.@O@ ${LIBS} - -pkcs11-tokens@EXEEXT@: pkcs11-tokens.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ pkcs11-tokens.@O@ ${LIBS} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: ${TARGETS} installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} pkcs11-list@EXEEXT@ \ - ${DESTDIR}${sbindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} pkcs11-destroy@EXEEXT@ \ - ${DESTDIR}${sbindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} pkcs11-keygen@EXEEXT@ \ - ${DESTDIR}${sbindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} pkcs11-tokens@EXEEXT@ \ - ${DESTDIR}${sbindir} - ${INSTALL_DATA} ${srcdir}/pkcs11-list.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/pkcs11-destroy.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/pkcs11-keygen.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/pkcs11-tokens.8 ${DESTDIR}${mandir}/man8 - -uninstall:: - rm -f ${DESTDIR}${mandir}/man8/pkcs11-tokens.8 - rm -f ${DESTDIR}${mandir}/man8/pkcs11-keygen.8 - rm -f ${DESTDIR}${mandir}/man8/pkcs11-destroy.8 - rm -f ${DESTDIR}${mandir}/man8/pkcs11-list.8 - ${LIBTOOL_MODE_UNINSTALL} rm -f / - ${DESTDIR}${sbindir}/pkcs11-tokens@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f / - ${DESTDIR}${sbindir}/pkcs11-keygen@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f / - ${DESTDIR}${sbindir}/pkcs11-destroy@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f / - ${DESTDIR}${sbindir}/pkcs11-list@EXEEXT@ - -clean distclean:: - rm -f ${OBJS} ${TARGETS} diff --git a/bin/plugins/Makefile.in b/bin/plugins/Makefile.in deleted file mode 100644 index 92dc4f8ede..0000000000 --- a/bin/plugins/Makefile.in +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \ - ${NS_INCLUDES} ${DNS_INCLUDES} \ - ${ISCCFG_INCLUDES} ${ISC_INCLUDES} - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -NSLIBS = ../../lib/ns/libns.@A@ - -LIBS = - -SO_TARGETS = lib/filter-aaaa.@SO@ -SO_INSTALL = filter-aaaa.@SO@ -TARGETS = @SO_TARGETS@ - -SO_OBJS = filter-aaaa.@O@ -SO_SRCS = filter-aaaa.c - -CFLAGS = @CFLAGS@ @SO_CFLAGS@ -SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@ - -MANPAGES = filter-aaaa.8 - -HTMLPAGES = filter-aaaa.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -lib/filter-aaaa.@SO@: filter-aaaa.@SO@ - $(SHELL) ${top_srcdir}/mkinstalldirs `pwd`/lib - ${LIBTOOL_MODE_INSTALL} ${INSTALL} filter-aaaa.@SO@ `pwd`/lib - -filter-aaaa.@SO@: filter-aaaa.@O@ - ${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ \ - filter-aaaa.@O@ ${LIBS} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -clean distclean:: - rm -f filter-aaaa.so - rm -f ${TARGETS} ${OBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${plugindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: @SO_TARGETS@ installdirs - for i in ${SO_INSTALL} ; \ - do \ - if test -f $$i ; \ - then \ - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} $$i \ - ${DESTDIR}${plugindir}; \ - fi \ - done - ${INSTALL_DATA} ${srcdir}/filter-aaaa.8 ${DESTDIR}${mandir}/man8 - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${plugindir}/filter-aaaa.@SO@ - rm -f ${DESTDIR}${mandir}/man8/filter-aaaa.8 diff --git a/bin/rndc/Makefile.in b/bin/rndc/Makefile.in deleted file mode 100644 index 8eef2106d1..0000000000 --- a/bin/rndc/Makefile.in +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/include ${ISC_INCLUDES} ${ISCCC_INCLUDES} \ - ${ISCCFG_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} - -CDEFINES = -CWARNINGS = - -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCCCLIBS = ../../lib/isccc/libisccc.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -BIND9LIBS = ../../lib/bind9/libbind9.@A@ - -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -ISCCCDEPLIBS = ../../lib/isccc/libisccc.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ - -LIBS = ${ISCLIBS} @LIBS@ - -RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS} - -CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} - -SRCS= rndc.c - -TARGETS = rndc@EXEEXT@ - -MANPAGES = rndc.8 rndc.conf.5 - -HTMLPAGES = rndc.html rndc.conf.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -rndc.@O@: rndc.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DRNDC_CONFFILE=\"${sysconfdir}/rndc.conf\" \ - -DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \ - -c ${srcdir}/rndc.c - -rndc@EXEEXT@: rndc.@O@ util.@O@ ${RNDCDEPLIBS} - export BASEOBJS="rndc.@O@ util.@O@"; \ - export LIBS0="${ISCCFGLIBS} ${ISCCCLIBS} ${BIND9LIBS} ${DNSLIBS} ${ISCLIBS}"; \ - ${FINALBUILDCMD} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5 - -install:: rndc@EXEEXT@ installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} rndc@EXEEXT@ ${DESTDIR}${sbindir} - ${INSTALL_DATA} ${srcdir}/rndc.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/rndc.conf.5 ${DESTDIR}${mandir}/man5 - -uninstall:: - rm -f ${DESTDIR}${mandir}/man5/rndc.conf.5 - rm -f ${DESTDIR}${mandir}/man8/rndc.8 - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/rndc@EXEEXT@ - -clean distclean maintainer-clean:: - rm -f ${TARGETS} diff --git a/bin/tests/Makefile.in b/bin/tests/Makefile.in deleted file mode 100644 index dd3dddd438..0000000000 --- a/bin/tests/Makefile.in +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ - -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ - -LIBS = @LIBS@ - -SUBDIRS = system @PKCS11_TOOLS@ -TESTDIRS = system - -# Test programs that are built by default: -# cfg_test is needed for regenerating doc/misc/options -# makejournal is needed by system tests -# wire_test is needed for fuzz testing -# other opptional test programs have been moved to ./optional - -# Alphabetically -XTARGETS = all_tests -TARGETS = cfg_test@EXEEXT@ makejournal@EXEEXT@ \ - wire_test@EXEEXT@ @XTARGETS@ - -SRCS = cfg_test.c makejournal.c wire_test.c - -@BIND9_MAKE_RULES@ - -.NOTPARALLEL: - -.PHONY: -all_tests: - echo "making depend in `pwd`/optional"; \ - (cd optional; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) - -wire_test@EXEEXT@: wire_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ wire_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -cfg_test@EXEEXT@: cfg_test.@O@ ${ISCCFGDEPLIBS} ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ cfg_test.@O@ \ - ${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -makejournal@EXEEXT@: makejournal.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ makejournal.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -distclean:: - rm -f headerdep_test.sh - -clean distclean:: - rm -f ${TARGETS} - ( cd optional; $(MAKE) $@) - -check: test - -test: - @for dir in $(TESTDIRS) ;\ - do \ - ( cd $$dir; $(MAKE) test ) ;\ - done diff --git a/bin/tests/optional/Makefile.in b/bin/tests/optional/Makefile.in deleted file mode 100644 index b01bc5e04d..0000000000 --- a/bin/tests/optional/Makefile.in +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ - ${OPENSSL_CFLAGS} @DST_GSSAPI_INC@ - -CDEFINES = @USE_GSSAPI@ - -CWARNINGS = -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ - -DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCLIBS = ../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@ - -DNSDEPLIBS = ../../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../../lib/isc/libisc.@A@ -ISCCFGDEPLIBS = ../../../lib/isccfg/libisccfg.@A@ - -LIBS = @LIBS@ - -SUBDIRS = - -# These programs are not built by default, but only when -# configured with --enable-developer or built explicitly with -# "make all_tests" - -TARGETS = @XTARGETS@ -XTARGETS = adb_test@EXEEXT@ \ - byaddr_test@EXEEXT@ \ - backtrace_test@EXEEXT@ \ - byname_test@EXEEXT@ \ - db_test@EXEEXT@ \ - gsstest@EXEEXT@ \ - fsaccess_test@EXEEXT@ \ - inter_test@EXEEXT@ \ - lex_test@EXEEXT@ \ - lfsr_test@EXEEXT@ \ - log_test@EXEEXT@ \ - master_test@EXEEXT@ \ - mempool_test@EXEEXT@ \ - name_test@EXEEXT@ \ - nsecify@EXEEXT@ \ - ratelimiter_test@EXEEXT@ \ - rbt_test@EXEEXT@ \ - rwlock_test@EXEEXT@ \ - serial_test@EXEEXT@ \ - shutdown_test@EXEEXT@ \ - sig0_test@EXEEXT@ \ - sock_test@EXEEXT@ \ - sym_test@EXEEXT@ \ - task_test@EXEEXT@ \ - timer_test@EXEEXT@ \ - zone_test@EXEEXT@ - -SRCS = ${XSRCS} -XSRCS = adb_test.c \ - byaddr_test.c \ - backtrace_test.c \ - byname_test.c \ - db_test.c \ - fsaccess_test.c \ - gsstest.c \ - inter_test.c \ - lex_test.c \ - lfsr_test.c \ - log_test.c \ - master_test.c \ - mempool_test.c \ - name_test.c \ - nsecify.c \ - ratelimiter_test.c \ - rbt_test.c \ - rwlock_test.c \ - serial_test.c \ - shutdown_test.c \ - sig0_test.c \ - sock_test.c \ - sym_test.c \ - task_test.c \ - timer_test.c \ - zone_test.c - -@BIND9_MAKE_RULES@ - -# disable optimization for backtrace test to get the expected result -BTTEST_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} -g \ - ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS} ${PTHREAD_CFLAGS} - -all_tests: ${XTARGETS} - -adb_test@EXEEXT@: adb_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ adb_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -backtrace_test@EXEEXT@: ${srcdir}/backtrace_test.c ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} -o $@ \ - ${srcdir}/backtrace_test.c ${ISCLIBS} ${LIBS} - -nsecify@EXEEXT@: nsecify.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsecify.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -byaddr_test@EXEEXT@: byaddr_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ byaddr_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -byname_test@EXEEXT@: byname_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ byname_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -lex_test@EXEEXT@: lex_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ lex_test.@O@ \ - ${ISCLIBS} ${LIBS} - -lfsr_test@EXEEXT@: lfsr_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ lfsr_test.@O@ \ - ${ISCLIBS} ${LIBS} - -log_test@EXEEXT@: log_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ log_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -name_test@EXEEXT@: name_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ name_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -entropy_test@EXEEXT@: entropy_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ entropy_test.@O@ \ - ${ISCLIBS} ${LIBS} - -entropy2_test@EXEEXT@: entropy2_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ entropy2_test.@O@ \ - ${ISCLIBS} ${LIBS} - -sock_test@EXEEXT@: sock_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sock_test.@O@ \ - ${ISCLIBS} ${LIBS} - -sym_test@EXEEXT@: sym_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sym_test.@O@ \ - ${ISCLIBS} ${LIBS} - -task_test@EXEEXT@: task_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ task_test.@O@ \ - ${ISCLIBS} ${LIBS} - -shutdown_test@EXEEXT@: shutdown_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ shutdown_test.@O@ \ - ${ISCLIBS} ${LIBS} - -timer_test@EXEEXT@: timer_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ timer_test.@O@ \ - ${ISCLIBS} ${LIBS} - -ratelimiter_test@EXEEXT@: ratelimiter_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ratelimiter_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rbt_test@EXEEXT@: rbt_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rbt_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rwlock_test@EXEEXT@: rwlock_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rwlock_test.@O@ \ - ${ISCLIBS} ${LIBS} - -master_test@EXEEXT@: master_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ master_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -db_test@EXEEXT@: db_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ db_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -mempool_test@EXEEXT@: mempool_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ mempool_test.@O@ \ - ${ISCLIBS} ${LIBS} - -serial_test@EXEEXT@: serial_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ serial_test.@O@ \ - ${ISCLIBS} ${LIBS} - -zone_test@EXEEXT@: zone_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zone_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -fsaccess_test@EXEEXT@: fsaccess_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ fsaccess_test.@O@ \ - ${ISCLIBS} ${LIBS} - -inter_test@EXEEXT@: inter_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ inter_test.@O@ \ - ${ISCLIBS} ${LIBS} - -sig0_test@EXEEXT@: sig0_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sig0_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -gsstest@EXEEXT@: gsstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \ - -o $@ gsstest.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS} - -clean distclean:: - rm -f ${TARGETS} ${XTARGETS} - rm -f backtrace_test_symtbl.c - -check: test - -test: - @for dir in $(TESTDIRS) ;\ - do \ - ( cd $$dir; $(MAKE) test ) ;\ - done diff --git a/bin/tests/pkcs11/Makefile.in b/bin/tests/pkcs11/Makefile.in deleted file mode 100644 index 4c44d4a10d..0000000000 --- a/bin/tests/pkcs11/Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${ISC_INCLUDES} -CDEFINES = - -ISCLIBS = ../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -LIBS = ${ISCLIBS} @LIBS@ - -SUBDIRS = benchmarks - -@BIND9_MAKE_RULES@ - -test: - -clean distclean:: - rm -f ${TARGETS} diff --git a/bin/tests/pkcs11/benchmarks/Makefile.in b/bin/tests/pkcs11/benchmarks/Makefile.in deleted file mode 100644 index 11ec4847b9..0000000000 --- a/bin/tests/pkcs11/benchmarks/Makefile.in +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${ISC_INCLUDES} -CDEFINES = - -ISCLIBS = ../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -LIBS = ${ISCLIBS} @LIBS@ - -SUBDIRS = - -TARGETS = session@EXEEXT@ login@EXEEXT@ \ - create@EXEEXT@ find@EXEEXT@ \ - pubrsa@EXEEXT@ privrsa@EXEEXT@ genrsa@EXEEXT@ \ - sign@EXEEXT@ verify@EXEEXT@ - -SRCS = session.c login.c create.c find.c \ - pubrsa.c privrsa.c genrsa.c sign.c verify.c - -@BIND9_MAKE_RULES@ - -session@EXEEXT@: @srcdir@/session.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/session.c ${LIBS} - -login@EXEEXT@: @srcdir@/login.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/login.c ${LIBS} - -create@EXEEXT@: @srcdir@/create.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/create.c ${LIBS} - -find@EXEEXT@: @srcdir@/find.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/find.c ${LIBS} - -pubrsa@EXEEXT@: @srcdir@/pubrsa.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/pubrsa.c ${LIBS} - -privrsa@EXEEXT@: @srcdir@/privrsa.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/privrsa.c ${LIBS} - -genrsa@EXEEXT@: @srcdir@/genrsa.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/genrsa.c ${LIBS} - -sign@EXEEXT@: @srcdir@/sign.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/sign.c ${LIBS} - -verify@EXEEXT@: @srcdir@/verify.c - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ @srcdir@/verify.c ${LIBS} - -clean distclean:: - rm -f ${TARGETS} diff --git a/bin/tests/system/Makefile.in b/bin/tests/system/Makefile.in deleted file mode 100644 index 9574ee5abe..0000000000 --- a/bin/tests/system/Makefile.in +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -SUBDIRS = dlzexternal dyndb pipelined rndc rpz rsabigexponent tkey - -CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES} - -CDEFINES = @USE_GSSAPI@ @CONTRIB_DLZ@ -CWARNINGS = - -DNSLIBS = -ISCLIBS = ../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = -ISCDEPLIBS = - -DEPLIBS = - -LIBS = @LIBS@ - -OBJS = feature-test.@O@ -SRCS = feature-test.c - -TARGETS = feature-test@EXEEXT@ - -@BIND9_MAKE_RULES@ - -subdirs: ${TARGETS} - -feature-test@EXEEXT@: feature-test.@O@ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ feature-test.@O@ ${ISCLIBS} ${LIBS} - -# Running the scripts below is bypassed when a separate build directory is -# used. - -# Produce intermediate makefile that assigns unique port numbers to each -# parallel test. The start port number of 5,000 is arbitrary - it must just -# be greater than the highest privileged port, 1024. -# -# Test names need to be sanitized because Solaris make does not like -# underscores in target names and requires explicit differentiation -# between a target name and a directory name (.PHONY is not supported). - -.PHONY: parallel.mk - -parallel.mk: - $(SHELL) parallel.sh > parallel.mk - -# Targets to run the tests. - -test: parallel.mk subdirs - @$(MAKE) -f parallel.mk check - @$(SHELL) ./runsequential.sh - @$(SHELL) ./testsummary.sh - -check: test - -# Other targets: -# -# testclean - delete files generated by running tests. -# clean - testclean + also delete files built for the tests by "make". -# distclean - clean + also delete test-related files generated by "configure". - -testclean clean distclean:: - if test -f ./cleanall.sh; then $(SHELL) ./cleanall.sh; fi - rm -f systests.output - rm -f random.data - rm -f parallel.mk - -clean distclean:: - rm -f ${TARGETS} - rm -f ${OBJS} - -distclean:: - rm -f conf.sh - -installdirs: - -install:: - -uninstall:: diff --git a/bin/tests/system/dlzexternal/Makefile.in b/bin/tests/system/dlzexternal/Makefile.in deleted file mode 100644 index 4eee745b03..0000000000 --- a/bin/tests/system/dlzexternal/Makefile.in +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} -CDEFINES = -CWARNINGS = - -LIBS = @LIBS@ - -SO_TARGETS = driver.@SO@ -TARGETS = @SO_TARGETS@ - -SRCS = driver.c - -SO_OBJS = driver.@O@ -SO_SRCS = driver.c - -OBJS = - -@BIND9_MAKE_RULES@ - -CFLAGS = @CFLAGS@ @SO_CFLAGS@ -SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@ - -driver.@SO@: ${SO_OBJS} - ${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ driver.@O@ - -clean distclean:: - rm -f ${TARGETS} - -distclean:: - rm -f ns1/named.conf diff --git a/bin/tests/system/dyndb/Makefile.in b/bin/tests/system/dyndb/Makefile.in deleted file mode 100644 index e975337d6c..0000000000 --- a/bin/tests/system/dyndb/Makefile.in +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -SUBDIRS = driver -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/bin/tests/system/dyndb/driver/Makefile.in b/bin/tests/system/dyndb/driver/Makefile.in deleted file mode 100644 index 044dfe0912..0000000000 --- a/bin/tests/system/dyndb/driver/Makefile.in +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -DNSLIBS = ../../../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ -ISCLIBS = ../../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = ../../../../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../../../../lib/isc/libisc.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ - - -SRCS = db.c driver.c instance.c \ - lock.c log.c syncptr.c zone.c - -OBJS = db.@O@ driver.@O@ instance.@O@ \ - lock.@O@ log.@O@ syncptr.@O@ zone.@O@ - -SO_TARGETS = lib/sample.@SO@ -TARGETS = @SO_TARGETS@ -SO_STRIP = @SO_STRIP@ - -@BIND9_MAKE_RULES@ - -CFLAGS = @CFLAGS@ @SO_CFLAGS@ -SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@ - -lib/sample.@SO@: sample.@SO@ - $(SHELL) ${top_srcdir}/mkinstalldirs `pwd`/lib - ${LIBTOOL_MODE_INSTALL} ${INSTALL} sample.@SO@ `pwd`/lib - -sample.@SO@: ${OBJS} ${DNSDEPLIBS} ${ISCDEPLIBS} - CLEANED=`echo "${DNSLIBS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ ${LIBS}" | ${SO_STRIP}`; \ - ${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ ${OBJS} \ - $${CLEANED} - -clean distclean:: - rm -f ${OBJS} sample.so lib/sample.so diff --git a/bin/tests/system/pipelined/Makefile.in b/bin/tests/system/pipelined/Makefile.in deleted file mode 100644 index 91d2beaa42..0000000000 --- a/bin/tests/system/pipelined/Makefile.in +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -DNSLIBS = ../../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCLIBS = ../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = ../../../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../../../lib/isc/libisc.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ - -TARGETS = pipequeries@EXEEXT@ - -SRCS = pipequeries.c - -@BIND9_MAKE_RULES@ - -all: pipequeries@EXEEXT@ - -pipequeries@EXEEXT@: pipequeries.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ pipequeries.@O@ ${LIBS} - -clean distclean:: - rm -f ${TARGETS} - diff --git a/bin/tests/system/rndc/Makefile.in b/bin/tests/system/rndc/Makefile.in deleted file mode 100644 index 0410004ea1..0000000000 --- a/bin/tests/system/rndc/Makefile.in +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${ISC_INCLUDES} - -CDEFINES = -CWARNINGS = - -ISCLIBS = ../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = -ISCDEPLIBS = ../../../../lib/isc/libisc.@A@ - -DEPLIBS = - -LIBS = @LIBS@ - -TARGETS = gencheck@EXEEXT@ - -GENCHECKOBJS = gencheck.@O@ - -SRCS = gencheck.c - -@BIND9_MAKE_RULES@ - -all: gencheck@EXEEXT@ - -gencheck@EXEEXT@: ${GENCHECKOBJS} ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${GENCHECKOBJS} ${ISCLIBS} ${LIBS} - -clean distclean:: - rm -f ${TARGETS} diff --git a/bin/tests/system/rpz/Makefile.in b/bin/tests/system/rpz/Makefile.in deleted file mode 100644 index 2d2cfac33b..0000000000 --- a/bin/tests/system/rpz/Makefile.in +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES} - -CDEFINES = -CWARNINGS = - -DNSLIBS = -ISCLIBS = ../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = -ISCDEPLIBS = ../../../../lib/isc/libisc.@A@ - -DEPLIBS = ${ISCDEPLIBS} - -LIBS = ${ISCLIBS} @LIBS@ - -TARGETS = dnsrps@EXEEXT@ - -DNSRPSOBJS = dnsrps.@O@ - -SRCS = dnsrps.c - -@BIND9_MAKE_RULES@ - -all: dnsrps@EXEEXT@ - -dnsrps@EXEEXT@: ${DNSRPSOBJS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${DNSRPSOBJS} ${LIBS} - -clean distclean:: - rm -f ${TARGETS} - diff --git a/bin/tests/system/rsabigexponent/Makefile.in b/bin/tests/system/rsabigexponent/Makefile.in deleted file mode 100644 index f4f32d1087..0000000000 --- a/bin/tests/system/rsabigexponent/Makefile.in +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -DNSLIBS = ../../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCLIBS = ../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = ../../../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../../../lib/isc/libisc.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ - -TARGETS = bigkey@EXEEXT@ - -OBJS = bigkey.@O@ - -SRCS = bigkey.c - -@BIND9_MAKE_RULES@ - -all: bigkey@EXEEXT@ - -bigkey@EXEEXT@: ${OBJS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} - -clean distclean:: - rm -f ${TARGETS} - diff --git a/bin/tests/system/tkey/Makefile.in b/bin/tests/system/tkey/Makefile.in deleted file mode 100644 index 54cde006f1..0000000000 --- a/bin/tests/system/tkey/Makefile.in +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -DNSLIBS = ../../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCLIBS = ../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DNSDEPLIBS = ../../../../lib/dns/libdns.@A@ -ISCDEPLIBS = ../../../../lib/isc/libisc.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ - -TARGETS = keycreate@EXEEXT@ keydelete@EXEEXT@ - -CREATEOBJS = keycreate.@O@ -DELETEOBJS = keydelete.@O@ - -SRCS = keycreate.c keydelete.c - -@BIND9_MAKE_RULES@ - -all: keycreate@EXEEXT@ keydelete@EXEEXT@ - -keycreate@EXEEXT@: ${CREATEOBJS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${CREATEOBJS} ${LIBS} - -keydelete@EXEEXT@: ${DELETEOBJS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${DELETEOBJS} ${LIBS} - -clean distclean:: - rm -f ${TARGETS} - diff --git a/bin/tools/Makefile.in b/bin/tools/Makefile.in deleted file mode 100644 index 8cb0679561..0000000000 --- a/bin/tools/Makefile.in +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ - ${BIND9_INCLUDES} \ - ${OPENSSL_CFLAGS} \ - ${MAXMINDDB_CFLAGS} \ - ${LMDB_CFLAGS} - -CDEFINES = -DVERSION=\"${VERSION}\" -CWARNINGS = - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -BIND9LIBS = ../../lib/bind9/libbind9.@A@ -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ - -DNSDEPLIBS = ../../lib/dns/libdns.@A@ -BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ - -LIBS = ${ISCLIBS} ${LMDB_LIBS} @LIBS@ - -SUBDIRS = - -DNSTAPTARGETS = dnstap-read@EXEEXT@ -NZDTARGETS = named-nzd2nzf@EXEEXT@ -TARGETS = arpaname@EXEEXT@ named-journalprint@EXEEXT@ \ - named-rrchecker@EXEEXT@ nsec3hash@EXEEXT@ \ - mdig@EXEEXT@ \ - @DNSTAPTARGETS@ @NZDTARGETS@ - -DNSTAPSRCS = dnstap-read.c -NZDSRCS = named-nzd2nzf.c -SRCS = arpaname.c named-journalprint.c named-rrchecker.c \ - nsec3hash.c mdig.c \ - @DNSTAPSRCS@ @NZDSRCS@ - -MANPAGES = arpaname.1 dnstap-read.1 \ - mdig.1 named-journalprint.8 \ - named-nzd2nzf.8 named-rrchecker.1 nsec3hash.8 - -HTMLPAGES = arpaname.html dnstap-read.html \ - mdig.html named-journalprint.html \ - named-nzd2nzf.html named-rrchecker.html nsec3hash.html - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -arpaname@EXEEXT@: arpaname.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \ - -o $@ arpaname.@O@ ${ISCLIBS} ${LIBS} - -named-journalprint@EXEEXT@: named-journalprint.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - export BASEOBJS="named-journalprint.@O@"; \ - export LIBS0="${DNSLIBS}"; \ - ${FINALBUILDCMD} - -named-rrchecker@EXEEXT@: named-rrchecker.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - export BASEOBJS="named-rrchecker.@O@"; \ - export LIBS0="${DNSLIBS}"; \ - ${FINALBUILDCMD} - -nsec3hash@EXEEXT@: nsec3hash.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - export BASEOBJS="nsec3hash.@O@"; \ - export LIBS0="${DNSLIBS} ${ISCLIBS}"; \ - ${FINALBUILDCMD} - -mdig@EXEEXT@: mdig.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} - export BASEOBJS="mdig.@O@"; \ - export LIBS0="${DNSLIBS} ${BIND9LIBS}"; \ - ${FINALBUILDCMD} - -dnstap-read@EXEEXT@: dnstap-read.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - export BASEOBJS="dnstap-read.@O@"; \ - export LIBS0="${DNSLIBS}"; \ - ${FINALBUILDCMD} - -named-nzd2nzf@EXEEXT@: named-nzd2nzf.@O@ ${NZDDEPLIBS} - export BASEOBJS="named-nzd2nzf.@O@"; \ - export LIBS0="${ISCCFGLIBS} ${ISCCCLIBS} ${BIND9LIBS} ${DNSLIBS}"; \ - ${FINALBUILDCMD} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -nzd: - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-nzd2nzf@EXEEXT@ \ - ${DESTDIR}${sbindir} - ${INSTALL_DATA} ${srcdir}/named-nzd2nzf.8 ${DESTDIR}${mandir}/man8 - -dnstap: - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} dnstap-read@EXEEXT@ \ - ${DESTDIR}${bindir} - ${INSTALL_DATA} ${srcdir}/dnstap-read.1 ${DESTDIR}${mandir}/man1 - -install:: ${TARGETS} installdirs @DNSTAP@ @NZD_TOOLS@ - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} arpaname@EXEEXT@ \ - ${DESTDIR}${bindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-journalprint@EXEEXT@ \ - ${DESTDIR}${sbindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-rrchecker@EXEEXT@ \ - ${DESTDIR}${bindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} nsec3hash@EXEEXT@ \ - ${DESTDIR}${sbindir} - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} mdig@EXEEXT@ \ - ${DESTDIR}${bindir} - ${INSTALL_DATA} ${srcdir}/arpaname.1 ${DESTDIR}${mandir}/man1 - ${INSTALL_DATA} ${srcdir}/named-journalprint.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/named-rrchecker.1 ${DESTDIR}${mandir}/man1 - ${INSTALL_DATA} ${srcdir}/nsec3hash.8 ${DESTDIR}${mandir}/man8 - ${INSTALL_DATA} ${srcdir}/mdig.1 ${DESTDIR}${mandir}/man1 - -uninstall:: - rm -f ${DESTDIR}${mandir}/man1/mdig.1 - rm -f ${DESTDIR}${mandir}/man8/nsec3hash.8 - rm -f ${DESTDIR}${mandir}/man1/named-rrchecker.1 - rm -f ${DESTDIR}${mandir}/man8/named-journalprint.8 - rm -f ${DESTDIR}${mandir}/man1/arpaname.1 - ${LIBTOOL_MODE_UNINSTALL} rm -f \ - ${DESTDIR}${bindir}/mdig@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f \ - ${DESTDIR}${sbindir}/nsec3hash@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f \ - ${DESTDIR}${bindir}/named-rrchecker@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f \ - ${DESTDIR}${sbindir}/named-journalprint@EXEEXT@ - ${LIBTOOL_MODE_UNINSTALL} rm -f \ - ${DESTDIR}${bindir}/arpaname@EXEEXT@ - rm -f ${DESTDIR}${mandir}/man1/dnstap-read.1 - ${LIBTOOL_MODE_UNINSTALL} rm -f \ - ${DESTDIR}${bindir}/dnstap-read@EXEEXT@ - rm -f ${DESTDIR}${mandir}/man8/named-nzd2nzf.8 - ${LIBTOOL_MODE_UNINSTALL} rm -f \ - ${DESTDIR}${sbindir}/named-nzd2nzf@EXEEXT@ - -clean distclean:: - rm -f ${TARGETS} diff --git a/config.guess b/config.guess deleted file mode 100644 index 9afd676206..0000000000 --- a/config.guess +++ /dev/null @@ -1,1568 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. - -timestamp='2013-11-29' - -# This file 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 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. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -# -# Please send patches with a ChangeLog entry to config-patches@gnu.org. - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "${UNAME_SYSTEM}" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval $set_cc_for_build - cat <<-EOF > $dummy.c - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi - else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -esac - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.h.in b/config.h.in deleted file mode 100644 index 449ce58765..0000000000 --- a/config.h.in +++ /dev/null @@ -1,662 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* Define if you cannot bind() before connect() for TCP sockets. */ -#undef BROKEN_TCP_BIND_BEFORE_CONNECT - -/* dnsrps $librpz_name */ -#undef DNSRPS_LIBRPZ_PATH - -/* 0=no DNSRPS 1=static link 2=dlopen() */ -#undef DNSRPS_LIB_OPEN - -/* Define to enable "rrset-order fixed" syntax. */ -#undef DNS_RDATASET_FIXED - -/* Define to enable American Fuzzy Lop test harness */ -#undef ENABLE_AFL - -/* define if you want TCP_FASTOPEN enabled if available */ -#undef ENABLE_TCP_FASTOPEN - -/* Solaris hack to get select_large_fdset. */ -#undef FD_SETSIZE - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. When computing the size of such an object, don't use 'sizeof - (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - MSVC and with C++ compilers. */ -#undef FLEXIBLE_ARRAY_MEMBER - -/* Define to 1 if you have the `arc4random' function. */ -#undef HAVE_ARC4RANDOM - -/* Define to 1 if you have the `arc4random_buf' function. */ -#undef HAVE_ARC4RANDOM_BUF - -/* Define to 1 if you have the `arc4random_uniform' function. */ -#undef HAVE_ARC4RANDOM_UNIFORM - -/* define if the ARM yield instruction is available */ -#undef HAVE_ARM_YIELD - -/* Define to 1 if you have the `backtrace' function. */ -#undef HAVE_BACKTRACE - -/* Define to 1 if you have the `backtrace_symbols' function. */ -#undef HAVE_BACKTRACE_SYMBOLS - -/* Define to 1 if the compiler supports __builtin_clz. */ -#undef HAVE_BUILTIN_CLZ - -/* Define to 1 if the compiler supports __builtin_expect. */ -#undef HAVE_BUILTIN_EXPECT - -/* define if the compiler supports __builtin_unreachable(). */ -#undef HAVE_BUILTIN_UNREACHABLE - -/* Define to 1 if you have the `chroot' function. */ -#undef HAVE_CHROOT - -/* Define if clock_gettime is available. */ -#undef HAVE_CLOCK_GETTIME - -/* Use CMocka */ -#undef HAVE_CMOCKA - -/* Define to 1 if you have the `cpuset_setaffinity' function. */ -#undef HAVE_CPUSET_SETAFFINITY - -/* Define to 1 if you have the `CRYPTO_zalloc' function. */ -#undef HAVE_CRYPTO_ZALLOC - -/* Define to 1 if you have the header file. */ -#undef HAVE_DEVPOLL_H - -/* Define to 1 if you have the `DH_get0_key' function. */ -#undef HAVE_DH_GET0_KEY - -/* Define to 1 if you have the `dlclose' function. */ -#undef HAVE_DLCLOSE - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `dlopen' function. */ -#undef HAVE_DLOPEN - -/* Define to 1 if you have the `dlsym' function. */ -#undef HAVE_DLSYM - -/* Define to 1 to enable dnstap support */ -#undef HAVE_DNSTAP - -/* Define to 1 if you have the `ECDSA_sign' function. */ -#undef HAVE_ECDSA_SIGN - -/* Define to 1 if you have the `ECDSA_SIG_get0' function. */ -#undef HAVE_ECDSA_SIG_GET0 - -/* Define to 1 if you have the `ECDSA_verify' function. */ -#undef HAVE_ECDSA_VERIFY - -/* Define to 1 if you have the header file. */ -#undef HAVE_EDITLINE_READLINE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_EDIT_READLINE_HISTORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_EDIT_READLINE_READLINE_H - -/* Define to 1 if you have the `epoll_create1' function. */ -#undef HAVE_EPOLL_CREATE1 - -/* Define to 1 if you have the `EVP_aes_128_ecb' function. */ -#undef HAVE_EVP_AES_128_ECB - -/* Define to 1 if you have the `EVP_aes_192_ecb' function. */ -#undef HAVE_EVP_AES_192_ECB - -/* Define to 1 if you have the `EVP_aes_256_ecb' function. */ -#undef HAVE_EVP_AES_256_ECB - -/* Define to 1 if you have the `EVP_CIPHER_CTX_free' function. */ -#undef HAVE_EVP_CIPHER_CTX_FREE - -/* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */ -#undef HAVE_EVP_CIPHER_CTX_NEW - -/* Define to 1 if you have the `EVP_MD_CTX_free' function. */ -#undef HAVE_EVP_MD_CTX_FREE - -/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -#undef HAVE_EVP_MD_CTX_NEW - -/* Define to 1 if you have the `EVP_MD_CTX_reset' function. */ -#undef HAVE_EVP_MD_CTX_RESET - -/* Define to 1 if you have the `EVP_sha1' function. */ -#undef HAVE_EVP_SHA1 - -/* Define to 1 if you have the `EVP_sha224' function. */ -#undef HAVE_EVP_SHA224 - -/* Define to 1 if you have the `EVP_sha256' function. */ -#undef HAVE_EVP_SHA256 - -/* Define to 1 if you have the `EVP_sha384' function. */ -#undef HAVE_EVP_SHA384 - -/* Define to 1 if you have the `EVP_sha512' function. */ -#undef HAVE_EVP_SHA512 - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXECINFO_H - -/* Define to 1 if you have the `explicit_bzero' function. */ -#undef HAVE_EXPLICIT_BZERO - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `FIPS_mode' function. */ -#undef HAVE_FIPS_MODE - -/* Define to 1 if you have the `flockfile' function. */ -#undef HAVE_FLOCKFILE - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Build with GeoIP2 support */ -#undef HAVE_GEOIP2 - -/* Define to 1 if you have the `getc_unlocked' function. */ -#undef HAVE_GETC_UNLOCKED - -/* Define to 1 if you have the `getpassphrase' function. */ -#undef HAVE_GETPASSPHRASE - -/* Define to 1 if you have the `getrandom' function. */ -#undef HAVE_GETRANDOM - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define to use gperftools CPU profiler. */ -#undef HAVE_GPERFTOOLS_PROFILER - -/* Define to 1 if you have the header file. */ -#undef HAVE_GSSAPI_GSSAPI_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GSSAPI_GSSAPI_KRB5_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GSSAPI_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GSSAPI_KRB5_H - -/* Define to 1 if you have the `HMAC_CTX_free' function. */ -#undef HAVE_HMAC_CTX_FREE - -/* Define to 1 if you have the `HMAC_CTX_get_md' function. */ -#undef HAVE_HMAC_CTX_GET_MD - -/* Define to 1 if you have the `HMAC_CTX_new' function. */ -#undef HAVE_HMAC_CTX_NEW - -/* Define to 1 if you have the `HMAC_CTX_reset' function. */ -#undef HAVE_HMAC_CTX_RESET - -/* Define to 1 if you have the header file. */ -#undef HAVE_IDN2_H - -/* Define to 1 if you have the `if_nametoindex' function. */ -#undef HAVE_IF_NAMETOINDEX - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Use json-c library */ -#undef HAVE_JSON_C - -/* Define to 1 if you have the header file. */ -#undef HAVE_KERBEROSV5_KRB5_H - -/* Define to 1 if you have the `kqueue' function. */ -#undef HAVE_KQUEUE - -/* Define to 1 if you have the header file. */ -#undef HAVE_KRB5_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_KRB5_KRB5_H - -/* Define if libidn2 was found */ -#undef HAVE_LIBIDN2 - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define to 1 if you have the `scf' library (-lscf). */ -#undef HAVE_LIBSCF - -/* Define to 1 if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* Use libxml2 library */ -#undef HAVE_LIBXML2 - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_NETLINK_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_RTNETLINK_H - -/* Use lmdb library */ -#undef HAVE_LMDB - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `mmap' function. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the `nanosleep' function. */ -#undef HAVE_NANOSLEEP - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_IF6_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_ROUTE_H - -/* define if OpenSSL supports Ed25519 */ -#undef HAVE_OPENSSL_ED25519 - -/* define if OpenSSL supports Ed448 */ -#undef HAVE_OPENSSL_ED448 - -/* define if OpenSSL supports SipHash */ -#undef HAVE_OPENSSL_SIPHASH - -/* Define to 1 if you have the `processor_bind' function. */ -#undef HAVE_PROCESSOR_BIND - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the `pthread_attr_getstacksize' function. */ -#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE - -/* Define to 1 if you have the `pthread_attr_setstacksize' function. */ -#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE - -/* Support for PTHREAD_MUTEX_ADAPTIVE_NP */ -#undef HAVE_PTHREAD_MUTEX_ADAPTIVE_NP - -/* Define to 1 if you have the header file. */ -#undef HAVE_PTHREAD_NP_H - -/* Have PTHREAD_PRIO_INHERIT. */ -#undef HAVE_PTHREAD_PRIO_INHERIT - -/* Define to 1 if you have the `pthread_rwlock_rdlock' function. */ -#undef HAVE_PTHREAD_RWLOCK_RDLOCK - -/* Define to 1 if you have the `pthread_setaffinity_np' function. */ -#undef HAVE_PTHREAD_SETAFFINITY_NP - -/* Define to 1 if you have the `pthread_setname_np' function. */ -#undef HAVE_PTHREAD_SETNAME_NP - -/* Define to 1 if you have the `pthread_set_name_np' function. */ -#undef HAVE_PTHREAD_SET_NAME_NP - -/* Define to 1 if you have the `pthread_yield' function. */ -#undef HAVE_PTHREAD_YIELD - -/* Define to 1 if you have the `pthread_yield_np' function. */ -#undef HAVE_PTHREAD_YIELD_NP - -/* Define to 1 if you have the `readline' function. */ -#undef HAVE_READLINE - -/* Define to 1 if you have the header file. */ -#undef HAVE_READLINE_HISTORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_READLINE_READLINE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_REGEX_H - -/* Define to 1 if you have the `RSA_set0_key' function. */ -#undef HAVE_RSA_SET0_KEY - -/* Define to 1 if you have the header file. */ -#undef HAVE_SCHED_H - -/* Define to 1 if you have the `sched_setaffinity' function. */ -#undef HAVE_SCHED_SETAFFINITY - -/* Define to 1 if you have the `sched_yield' function. */ -#undef HAVE_SCHED_YIELD - -/* Define to 1 if you have the `setegid' function. */ -#undef HAVE_SETEGID - -/* Define to 1 if you have the `seteuid' function. */ -#undef HAVE_SETEUID - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `setresgid' function. */ -#undef HAVE_SETRESGID - -/* Define to 1 if you have the `setresuid' function. */ -#undef HAVE_SETRESUID - -/* define if the SPARC pause instruction is available */ -#undef HAVE_SPARC_PAUSE - -/* define if struct stat has st_mtim.tv_nsec field */ -#undef HAVE_STAT_NSEC - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDALIGN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDATOMIC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcat' function. */ -#undef HAVE_STRLCAT - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `sysconf' function. */ -#undef HAVE_SYSCONF - -/* Define to 1 if you have the `sysctlbyname' function. */ -#undef HAVE_SYSCTLBYNAME - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_CAPABILITY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_CPUSET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_DEVPOLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MMAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PROCSET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_THREADS_H - -/* Define if thread_local keyword is available */ -#undef HAVE_THREAD_LOCAL - -/* Define if Thread-Local Storage is available */ -#undef HAVE_TLS - -/* Define to 1 if you have the `tzset' function. */ -#undef HAVE_TZSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_UCHAR_H - -/* Define to 1 if the system has the type `uintptr_t'. */ -#undef HAVE_UINTPTR_T - -/* define if uname is available */ -#undef HAVE_UNAME - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `uv_handle_get_data' function. */ -#undef HAVE_UV_HANDLE_GET_DATA - -/* Define to 1 if you have the `uv_handle_set_data' function. */ -#undef HAVE_UV_HANDLE_SET_DATA - -/* Define to 1 if you have the `uv_import' function. */ -#undef HAVE_UV_IMPORT - -/* Use zlib library */ -#undef HAVE_ZLIB - -/* define if __atomic builtins are not available */ -#undef HAVE___ATOMIC - -/* Define if __thread keyword is available */ -#undef HAVE___THREAD - -/* Define if you want to use inline buffers */ -#undef ISC_BUFFER_USEINLINE - -/* Define to allow building of objects for dlopen(). */ -#undef ISC_DLZ_DLOPEN - -/* Define to emulate atomic variables with mutexes. */ -#undef ISC_MUTEX_ATOMICS - -/* define if the linker supports --wrap option */ -#undef LD_WRAP - -/* have __attribute__s used in librpz.h */ -#undef LIBRPZ_HAVE_ATTR - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Defined if extern char *optarg is not declared. */ -#undef NEED_OPTARG - -/* Define if connect does not honour the permission on the UNIX domain socket. - */ -#undef NEED_SECURE_DIRECTORY - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* define the default PKCS11 library path */ -#undef PK11_LIB_LOCATION - -/* Sets which flag to pass to open/fcntl to make non-blocking - (O_NDELAY/O_NONBLOCK). */ -#undef PORT_NONBLOCK - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to use default system tuning. */ -#undef TUNE_LARGE - -/* Enable DNS Response Policy Service API */ -#undef USE_DNSRPS - -/* Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make - non-blocking. */ -#undef USE_FIONBIO_IOCTL - -/* define if OpenSSL is used for Public-Key Cryptography */ -#undef USE_OPENSSL - -/* define if PKCS11 is used for Public-Key Cryptography */ -#undef USE_PKCS11 - -/* Define if you want to use pthread rwlock implementation */ -#undef USE_PTHREAD_RWLOCK - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* the default value of dnssec-validation option */ -#undef VALIDATION_DEFAULT - -/* Define to enable very verbose query trace logging. */ -#undef WANT_QUERYTRACE - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#undef _LARGEFILE_SOURCE - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - -/* Select RFC3542 IPv6 API on macOS */ -#undef __APPLE_USE_RFC_3542 - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define to `int' if does not define. */ -#undef ssize_t - -/* Define to the type of an unsigned integer type wide enough to hold a - pointer, if such a type exists, and if the system does not define it. */ -#undef uintptr_t - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -#undef volatile diff --git a/config.sub b/config.sub deleted file mode 100644 index 61cb4bc22d..0000000000 --- a/config.sub +++ /dev/null @@ -1,1793 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. - -timestamp='2013-10-01' - -# This file 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 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. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches with a ChangeLog entry to config-patches@gnu.org. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2013 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 \ - | or1k | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or1k-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.threads.in b/config.threads.in deleted file mode 100644 index 2c007ecaf6..0000000000 --- a/config.threads.in +++ /dev/null @@ -1,125 +0,0 @@ -# -# Begin pthreads checking. -# -# First, decide whether to use multithreading or not. -# -# Enable multithreading by default on systems where it is known -# to work well, and where debugging of multithreaded programs -# is supported. -# - -AC_MSG_CHECKING(whether to build with thread support) - -case $host in -*-dec-osf*) - use_threads=true ;; -[*-solaris2.[0-6]]) - # Thread signals are broken on Solaris 2.6; they are sometimes - # delivered to the wrong thread. - use_threads=false ;; -*-solaris*) - use_threads=true ;; -*-hp-hpux10*) - use_threads=false ;; -*-hp-hpux11*) - use_threads=true ;; -*-sgi-irix*) - use_threads=true ;; -*-sco-sysv*uw*|*-*-sysv*UnixWare*) - # UnixWare - use_threads=false ;; -*-*-sysv*OpenUNIX*) - # UnixWare - use_threads=true ;; -[*-netbsd[1234].*]) - # NetBSD earlier than NetBSD 5.0 has poor pthreads. - # Don't use it by default. - use_threads=false ;; -*-netbsd*) - use_threads=true ;; -*-openbsd*) - # OpenBSD users have reported that named dumps core on - # startup when built with threads. - use_threads=false ;; -[*-freebsd[1234567].*]) - # Threads are broken at least up to FreeBSD 4.11. - # FreeBSD 5, 6 and 7 we have never officially supported threads - # on. YMMV - use_threads=false ;; -*-freebsd*) - use_threads=true ;; -*-linux*) - use_threads=true ;; -*-darwin[[123456789]].*) - use_threads=false ;; -*-darwin*.*) - use_threads=true ;; -*) - use_threads=true ;; -esac - -AC_ARG_ENABLE(threads, - [ --enable-threads enable multithreading]) -case "$enable_threads" in - yes) - use_threads=true - ;; - no) - use_threads=false - ;; - '') - # Use system-dependent default - ;; - *) - AC_MSG_ERROR([--enable-threads takes yes or no]) - ;; -esac - -if $use_threads -then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -if $use_threads -then - # - # Search for / configure pthreads in a system-dependent fashion. - # - case "$host" in - *-freebsd*) - # We don't want to set -lpthread as that break - # the ability to choose threads library at final - # link time and is not valid for all architectures. - - PTHREAD= - if test "X$GCC" = "Xyes"; then - saved_cc="$CC" - CC="$CC -pthread" - AC_MSG_CHECKING(for gcc -pthread support); - AC_TRY_LINK([#include ], - [printf("%x\n", pthread_create);], - PTHREAD="yes" - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) - CC="$saved_cc" - fi - if test "X$PTHREAD" != "Xyes"; then - AC_CHECK_LIB(pthread, pthread_create,, - AC_CHECK_LIB(thr, thread_create,, - AC_CHECK_LIB(c_r, pthread_create,, - AC_CHECK_LIB(c, pthread_create,, - AC_MSG_ERROR("could not find thread libraries"))))) - fi - ;; - *) - AC_CHECK_LIB(pthread, pthread_create,, - AC_CHECK_LIB(pthread, __pthread_create,, - AC_CHECK_LIB(pthread, __pthread_create_system,, - AC_CHECK_LIB(c_r, pthread_create,, - AC_CHECK_LIB(c, pthread_create,, - AC_MSG_ERROR("could not find thread libraries")))))) - ;; - esac -fi diff --git a/configure b/configure deleted file mode 100755 index 79c05b87de..0000000000 --- a/configure +++ /dev/null @@ -1,26207 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for BIND 9.17. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and info@isc.org about -$0: your system, including any error possibly output before -$0: this message. Then install a modern shell, or manually -$0: run the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='BIND' -PACKAGE_TARNAME='bind' -PACKAGE_VERSION='9.17' -PACKAGE_STRING='BIND 9.17' -PACKAGE_BUGREPORT='info@isc.org' -PACKAGE_URL='https://www.isc.org/downloads/' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -BUILD_LIBS -BUILD_LDFLAGS -BUILD_CPPFLAGS -BUILD_CFLAGS -BUILD_CC -DLZ_DRIVER_MYSQL_LIBS -DLZ_DRIVER_MYSQL_INCLUDES -DLZ_SYSTEM_TEST -DLZ_DRIVER_OBJS -DLZ_DRIVER_SRCS -DLZ_DRIVER_LIBS -DLZ_DRIVER_INCLUDES -CONTRIB_DLZ -MYSQL_CONFIG -PG_CONFIG -SO_TARGETS -SO_STRIP -SO_LD -SO_LDFLAGS -SO_CFLAGS -SO -BIND9_CONFIGARGS -BIND9_SRCID -BIND9_VERSIONSHORT -BIND9_VERSIONSTRING -BIND9_MAJOR -BIND9_VERSION -BIND9_DESCRIPTION -BIND9_PRODUCT -BIND9_IRS_BUILDINCLUDE -BIND9_BIND9_BUILDINCLUDE -BIND9_NS_BUILDINCLUDE -BIND9_DNS_BUILDINCLUDE -BIND9_ISCCFG_BUILDINCLUDE -BIND9_ISCCC_BUILDINCLUDE -BIND9_ISC_BUILDINCLUDE -BIND9_TOP_BUILDDIR -WRAP_NAME -WRAP_INTERPOSE -LD_WRAP_TESTS -KYUA -UNITTESTS -CMOCKA_LIBS -CMOCKA_CFLAGS -LIBIDN2_LDFLAGS -LIBIDN2_LIBS -LIBIDN2_CFLAGS -XSLT_DOCBOOK_MAKETOC_XHTML -XSLT_DOCBOOK_MAKETOC_HTML -XSLT_DOCBOOK_CHUNKTOC_XHTML -XSLT_DOCBOOK_CHUNKTOC_HTML -XSLT_DOCBOOK_CHUNK_XHTML -XSLT_DOCBOOK_CHUNK_HTML -XSLT_DOCBOOK_STYLE_MAN -XSLT_DOCBOOK_STYLE_XHTML -XSLT_DOCBOOK_STYLE_HTML -CURL -DOXYGEN -XMLLINT -XSLTPROC -PANDOC -W3M -DBLATEX -PDFLATEX -LATEX -DNSTAPTARGETS -DNSTAPOBJS -DNSTAPSRCS -DNSTAP -FSTRM_CAPTURE -PROTOC_C -ISC_PLATFORM_HAVESYSUNH -LIBCAP_LIBS -DST_EXTRA_SRCS -DST_EXTRA_OBJS -USE_ISC_SPNEGO -READLINE_LIB -BIND9_CO_RULE -INSTALL_LIBRARY -LIBTOOL_MODE_UNINSTALL -LIBTOOL_MODE_LINK -LIBTOOL_MODE_INSTALL -LIBTOOL_MODE_COMPILE -LIBTOOL_MKDEP_SED -SA -A -O -PURIFY -purify_path -MKDEPPROG -MKDEPCFLAGS -MKDEPCC -ZLIB_LIBS -ZLIB_CFLAGS -JSON_C_LIBS -JSON_C_CFLAGS -LIBXML2_LIBS -LIBXML2_CFLAGS -NZDTARGETS -NZDSRCS -NZD_TOOLS -LMDB_LDFLAGS -LMDB_LIBS -LMDB_CFLAGS -DNS_CRYPTO_LIBS -DNS_GSSAPI_LIBS -DST_GSSAPI_INC -USE_GSSAPI -ISC_PLATFORM_KRB5HEADER -ISC_PLATFORM_GSSAPI_KRB5_HEADER -ISC_PLATFORM_GSSAPIHEADER -ISC_PLATFORM_HAVEGSSAPI -KRB5_CONFIG -CRYPTO -PKCS11_TOOLS -PKCS11_TEST -OPENSSL_LIBS -OPENSSL_CFLAGS -ALWAYS_DEFINES -LIBUV_LIBS -LIBUV_CFLAGS -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -ax_pthread_config -GEOIP2LINKOBJS -GEOIP2LINKSRCS -MAXMINDDB_PREFIX -MAXMINDDB_LIBS -MAXMINDDB_CFLAGS -ISC_PLATFORM_NORETURN_POST -ISC_PLATFORM_NORETURN_PRE -PYTHON -PERL -LN -ARFLAGS -XTARGETS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -CCNOOPT -CCOPT -STD_CWARNINGS -STD_CDEFINES -STD_CINCLUDES -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -AWK -RANLIB -STRIP -ac_ct_AR -AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -LIBTOOL -SET_MAKE -LFS_LIBS -LFS_LDFLAGS -LFS_CFLAGS -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='BIND9_MAKE_INCLUDES -BIND9_MAKE_RULES -LIBISC_API -LIBISCCC_API -LIBISCCFG_API -LIBDNS_API -LIBDNS_MAPAPI -LIBBIND9_API -LIBIRS_API -LIBNS_API -DLZ_DRIVER_RULES' -ac_user_opts=' -enable_option_checking -enable_maintainer_mode -enable_largefile -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_buffer_useinline -enable_warn_shadow -enable_warn_error -enable_developer -enable_fuzzing -enable_mutex_atomics -with_python -enable_kqueue -enable_epoll -enable_devpoll -with_geoip2 -enable_geoip -with_maxminddb -with_locktype -enable_pthread_rwlock -with_openssl -enable_fips_mode -enable_native_pkcs11 -with_pkcs11 -with_gssapi -with_lmdb -with_libxml2 -with_libjson -with_json_c -with_zlib -with_purify -with_gperftools_profiler -enable_tcp_fastopen -with_readline -enable_isc_spnego -enable_chroot -enable_linux_caps -enable_fixed_rrset -enable_dnstap -with_protobuf_c -with_libfstrm -with_docbook_xsl -with_libidn2 -with_cmocka -with_tuning -enable_querytrace -enable_auto_validation -with_dlopen -enable_dnsrps_dl -with_dnsrps_libname -with_dnsrps_dir -enable_dnsrps -with_dlz_postgres -with_dlz_mysql -with_dlz_bdb -with_dlz_filesystem -with_dlz_ldap -with_dlz_odbc -with_dlz_stub -with_make_clean -enable_full_report -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -LT_SYS_LIBRARY_PATH -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -PYTHON -MAXMINDDB_CFLAGS -MAXMINDDB_LIBS -MAXMINDDB_PREFIX -LIBUV_CFLAGS -LIBUV_LIBS -OPENSSL_CFLAGS -OPENSSL_LIBS -LMDB_CFLAGS -LMDB_LIBS -LIBXML2_CFLAGS -LIBXML2_LIBS -JSON_C_CFLAGS -JSON_C_LIBS -ZLIB_CFLAGS -ZLIB_LIBS -LIBIDN2_CFLAGS -LIBIDN2_LIBS -CMOCKA_CFLAGS -CMOCKA_LIBS -KYUA' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures BIND 9.17 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/bind] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of BIND 9.17:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-maintainer-mode - disable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --disable-largefile omit support for large files - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-buffer-useinline - define ISC_BUFFER_USEINLINE when compiling - [default=yes] - --enable-warn-shadow turn on -Wshadow when compiling - --enable-warn-error turn on -Werror when compiling - --enable-developer enable developer build settings - --enable-fuzzing= - Enable fuzzing using American Fuzzy Lop or libFuzzer - (default=no) - --enable-mutex-atomics emulate atomics by mutex-locked variables, useful - for debugging [default=no] - --enable-kqueue use BSD kqueue when available [default=yes] - --enable-epoll use Linux epoll when available [default=auto] - --enable-devpoll use /dev/poll when available [default=yes] - --disable-geoip support GeoIP2 geolocation ACLs if available - [default=yes] - --enable-pthread-rwlock use pthread rwlock instead of internal rwlock - implementation - --enable-fips-mode enable FIPS mode in OpenSSL library [default=no] - --enable-native-pkcs11 use native PKCS11 for public-key crypto [default=no] - --disable-tcp-fastopen disable TCP Fast Open support [default=yes] - --disable-isc-spnego use SPNEGO from GSSAPI library - --disable-chroot disable chroot - --disable-linux-caps disable Linux capabilities - --enable-fixed-rrset enable fixed rrset ordering [default=no] - --enable-dnstap enable dnstap support (requires fstrm, protobuf-c) - --enable-querytrace enable very verbose query trace logging [default=no] - --enable-auto-validation - turn on DNSSEC validation by default, using the IANA - root key [default=yes] - --enable-dnsrps-dl DNS Response Policy Service delayed link - [default=$librpz_dl] - --enable-dnsrps enable DNS Response Policy Service API - --enable-full-report report values of all configure options - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - --with-python=PATH specify path to Python 3 interpreter - --with-geoip2 deprecated, use --with-maxminddb - --with-maxminddb=PATH Build with MaxMind GeoIP2 support (auto|yes|no|path) - [default=auto] - --with-locktype=ARG Specify mutex lock type (adaptive or standard) - --with-openssl=DIR root of the OpenSSL directory - --with-pkcs11=PATH Build with PKCS11 support [no|path] (PATH is for the - PKCS11 provider) - --with-gssapi=PATH|/path/krb5-config - Specify path for system-supplied GSSAPI - [default=auto] - --with-lmdb=[PATH] use LMDB library [default=auto], optionally specify - the prefix for lmdb library - --with-libxml2 build with libxml2 library [yes|no|auto] (default is - auto) - --with-libjson deprecated, use --with-json-c - --with-json-c build with json-c library [yes|no|detect] (default - is detect) - --with-zlib build with zlib for HTTP compression [default=yes] - --with-purify=PATH use Rational purify - --with-gperftools-profiler - use gperftools CPU profiler - --with-readline=LIBSPEC specify readline library [default auto] - --with-protobuf-c=path Path where protobuf-c is installed, for dnstap - --with-libfstrm=path Path where libfstrm is installed, for dnstap - --with-docbook-xsl=PATH specify path for Docbook-XSL stylesheets - --with-libidn2=PATH enable IDN support using GNU libidn2 - [yes|no(default)|path] - --with-cmocka=detect enable CMocka based tests (default is detect) - --with-tuning=ARG Specify server tuning (default or small) - --with-dlopen=ARG support dynamically loadable DLZ and DYNDB drivers - --with-dnsrps-libname DNSRPS provider library name (librpz.so) - --with-dnsrps-dir path to DNSRPS provider library - --with-dlz-postgres=PATH - Build with Postgres DLZ driver [yes|no|path]. - (Required to use Postgres with DLZ) - --with-dlz-mysql=PATH Build with MySQL DLZ driver [yes|no|path]. (Required - to use MySQL with DLZ) - --with-dlz-bdb=PATH Build with Berkeley DB DLZ driver [yes|no|path]. - (Required to use Berkeley DB with DLZ) - --with-dlz-filesystem=ARG - Build with filesystem DLZ driver [yes|no]. (Required - to use file system driver with DLZ) - --with-dlz-ldap=PATH Build with LDAP DLZ driver [yes|no|path]. (Required - to use LDAP with DLZ) - --with-dlz-odbc=PATH Build with ODBC DLZ driver [yes|no|path]. (Required - to use ODBC with DLZ) - --with-dlz-stub=ARG Build with stub DLZ driver [yes|no]. (Required to - use stub driver with DLZ) - --with-make-clean run "make clean" at end of configure [yes|no] - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path - PYTHON path to python executable - MAXMINDDB_CFLAGS - C compiler flags for MAXMINDDB, overriding pkg-config - MAXMINDDB_LIBS - linker flags for MAXMINDDB, overriding pkg-config - MAXMINDDB_PREFIX - value of prefix for libmaxminddb, overriding pkg-config - LIBUV_CFLAGS - C compiler flags for LIBUV, overriding pkg-config - LIBUV_LIBS linker flags for LIBUV, overriding pkg-config - OPENSSL_CFLAGS - C compiler flags for OPENSSL, overriding pkg-config - OPENSSL_LIBS - linker flags for OPENSSL, overriding pkg-config - LMDB_CFLAGS C compiler flags for LMDB, overriding pkg-config - LMDB_LIBS linker flags for LMDB, overriding pkg-config - LIBXML2_CFLAGS - C compiler flags for LIBXML2, overriding pkg-config - LIBXML2_LIBS - linker flags for LIBXML2, overriding pkg-config - JSON_C_CFLAGS - C compiler flags for JSON_C, overriding pkg-config - JSON_C_LIBS linker flags for JSON_C, overriding pkg-config - ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config - ZLIB_LIBS linker flags for ZLIB, overriding pkg-config - LIBIDN2_CFLAGS - C compiler flags for LIBIDN2, overriding pkg-config - LIBIDN2_LIBS - linker flags for LIBIDN2, overriding pkg-config - CMOCKA_CFLAGS - C compiler flags for CMOCKA, overriding pkg-config - CMOCKA_LIBS linker flags for CMOCKA, overriding pkg-config - KYUA path to kyua execution engine - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -BIND home page: . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -BIND configure 9.17 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## --------------------------- ## -## Report this to info@isc.org ## -## --------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by BIND $as_me 9.17, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -# -# Enable maintainer mode by default, but allow to disable it in the CI -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -ac_config_headers="$ac_config_headers config.h" - - - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -# -# Enable system extensions to C and POSIX -# -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : - MINIX=yes -else - MINIX= -fi - - - if test "$MINIX" = yes; then - -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - - -$as_echo "#define _MINIX 1" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h - - - -# -# Enable large file support -# -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi - - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if ${ac_cv_sys_largefile_source+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=no; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=1; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -rf conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - -$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h - -fi - - -LFS_CFLAGS=`getconf LFS_CFLAGS 2>/dev/null` -LFS_LDFLAGS=`getconf LFS_LDFLAGS 2>/dev/null` -LFS_LIBS=`getconf LFS_LIBS 2>/dev/null` - - - - - -# Enable RFC 3542 APIs on macOS - -$as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -if test -z "$LIBTOOL"; then : - as_fn_error $? "The libtool script could not be found." "$LINENO" 5 -fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compatible shell" >&5 -$as_echo_n "checking for a POSIX-compatible shell... " >&6; } -if ${ac_cv_prog_shell+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_test_shell_script=' - test "$(expr 1 + 1)" = "2" && - test "$(( 1 + 1 ))" = "2" - ' - - for ac_cv_prog_shell in \ - "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do - case $ac_cv_prog_shell in #( - /*) : - - if "$ac_cv_prog_shell" -c "$ac_test_shell_script" 2>/dev/null; then : - break -fi - ;; #( - *) : - ;; -esac - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_shell" >&5 -$as_echo "$ac_cv_prog_shell" >&6; } - if test "$ac_cv_prog_shell" = "no"; then : - SHELL=/bin/sh - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5 -$as_echo "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;} - -else - SHELL="$ac_cv_prog_shell" - -fi - - - - - - - - - -# -# Use pkg-config -# - - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi -if test -z "$PKG_CONFIG"; then : - as_fn_error $? "The pkg-config script could not be found or is too old." "$LINENO" 5 -fi - -# Check whether --enable-buffer_useinline was given. -if test "${enable_buffer_useinline+set}" = set; then : - enableval=$enable_buffer_useinline; if test yes = "${enable}" - then - -$as_echo "#define ISC_BUFFER_USEINLINE 1" >>confdefs.h - - fi -else - $as_echo "#define ISC_BUFFER_USEINLINE 1" >>confdefs.h - -fi - - -# Check whether --enable-warn_shadow was given. -if test "${enable_warn_shadow+set}" = set; then : - enableval=$enable_warn_shadow; -fi - - -# Check whether --enable-warn_error was given. -if test "${enable_warn_error+set}" = set; then : - enableval=$enable_warn_error; -fi - - -# Check whether --enable-developer was given. -if test "${enable_developer+set}" = set; then : - enableval=$enable_developer; -fi - - -XTARGETS= -if test "$enable_developer" = "yes"; then : - STD_CDEFINES="$STD_CDEFINES -DISC_MEM_DEFAULTFILL=1 -DISC_LIST_CHECKINIT=1" - test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes - test "${enable_querytrace+set}" = set || enable_querytrace=yes - test "${with_cmocka+set}" = set || with_cmocka=yes - test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes - test "${enable_warn_error+set}" = set || enable_warn_error=yes - test "${enable_warn_shadow+set}" = set || enable_warn_shadow=yes - test "${with_zlib+set}" = set || with_zlib=yes - XTARGETS='${XTARGETS}' - -fi - - -# Check whether --enable-fuzzing was given. -if test "${enable_fuzzing+set}" = set; then : - enableval=$enable_fuzzing; -else - enable_fuzzing=no -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable fuzzing mode" >&5 -$as_echo_n "checking whether to enable fuzzing mode... " >&6; } -case $enable_fuzzing in #( - no) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;; #( - afl) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using AFL" >&5 -$as_echo "using AFL" >&6; } - -$as_echo "#define ENABLE_AFL 1" >>confdefs.h - - CFLAGS="$CFLAGS -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1" - LIBS="$LIBS -lpthread" ;; #( - libfuzzer) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libFuzzer" >&5 -$as_echo "using libFuzzer" >&6; } - CFLAGS="$CFLAGS -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1 -fsanitize=fuzzer,address,undefined" - LDFLAGS="$LDFLAGS -fsanitize=fuzzer,address,undefined" ;; #( - *) : - as_fn_error $? "You need to explicitly select the fuzzer" "$LINENO" 5 ;; #( - *) : - ;; -esac - -if test "$enable_fuzzing" = "afl"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for AFL enabled compiler\"" >&5 -$as_echo_n "checking \"for AFL enabled compiler\"... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __AFL_COMPILER - #error AFL compiler required - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - as_fn_error $? "set CC=afl- when --enable-fuzzing=afl is used" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -# Check whether --enable-mutex_atomics was given. -if test "${enable_mutex_atomics+set}" = set; then : - enableval=$enable_mutex_atomics; -else - enable_mutex_atomics=no -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to emulate atomics with mutexes" >&5 -$as_echo_n "checking whether to emulate atomics with mutexes... " >&6; } -case "$enable_mutex_atomics" in -yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define ISC_MUTEX_ATOMICS 1" >>confdefs.h - - ;; -no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -*) - as_fn_error $? "\"--enable-mutex-atomics requires yes or no\"" "$LINENO" 5 - ;; -esac - -# -# Make very sure that these are the first files processed by -# config.status, since we use the processed output as the input for -# AC_SUBST_FILE() substitutions in other files. -# -ac_config_files="$ac_config_files make/rules make/includes" - - -# Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $AR in - [\\/]* | ?:[\\/]*) - ac_cv_path_AR="$AR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -AR=$ac_cv_path_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -ARFLAGS="cruv" - - - -# The POSIX ln(1) program. Non-POSIX systems may substitute -# "copy" or something. -LN=ln - - -case "$AR" in - "") - as_fn_error $? " -ar program not found. Please fix your PATH to include the directory in -which ar resides, or set AR in the environment with the full path to ar. -" "$LINENO" 5 - - ;; -esac - -# -# Perl is optional; it is used only by some of the system test scripts. -# Note: the backtrace feature (see below) uses perl to build the symbol table, -# but it still compiles without perl, in which case an empty table will be used. -# -for ac_prog in perl5 perl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PERL in - [\\/]* | ?:[\\/]*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PERL=$ac_cv_path_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PERL" && break -done - - - -# -# Python 3 is optional; it is used by the system test scripts. -# -testminvers='import sys -if (sys.version_info < (3,5)): - exit(1)' - -default_with_python="python python3 python3.8 python3.7 python3.6 python3.5" - - - - -# Check whether --with-python was given. -if test "${with_python+set}" = set; then : - withval=$with_python; -else - with_python=$default_with_python -fi - - -if test "$with_python" = "yes"; then : - with_python=$default_with_python -fi - -if test "$with_python" = "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python support" >&5 -$as_echo_n "checking for Python support... " >&6; } - unset PYTHON - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } -else - for p in $with_python - do - case $p in #( - /*) : - PYTHON="$p" ;; #( - *) : - ;; -esac - - # Extract the first word of "$p", so it can be a program name with args. -set dummy $p; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - # Do not cache the result of the check from the previous line. If the - # first found Python interpreter has missing module dependencies and - # the result of the above check is cached, subsequent module checks - # will erroneously keep on using the cached path to the first found - # Python interpreter instead of different ones. - unset ac_cv_path_PYTHON - - if test -z "$PYTHON"; then : - continue -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PYTHON is Python version >= 3.5" >&5 -$as_echo_n "checking if $PYTHON is Python version >= 3.5... " >&6; } - if "$PYTHON" -c "$testminvers" 2>/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - unset PYTHON - continue -fi - - # Stop looking any further once we find a Python 3 interpreter - # satisfying all requirements. - break - done -fi - -# -# Make sure INSTALL uses an absolute path, else it will be wrong in all -# Makefiles, since they use make/rules.in and INSTALL will be adjusted by -# configure based on the location of the file where it is substituted. -# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate -# subdirectory of install-sh, This relative path will be wrong for all -# directories more than one level down from install-sh. -# -case "$INSTALL" in - /*) - ;; - *) - # - # Not all systems have dirname. - # - - ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`" - - - ac_prog="`echo $INSTALL | sed 's%.*/%%'`" - test "X$ac_dir" = "X$ac_prog" && ac_dir=. - test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`" - INSTALL="$ac_dir/$ac_prog" - ;; -esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 -$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if ${ac_cv_prog_cc_c99+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -#include - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static void -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str; - int number; - float fnumber; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); -} - -int -main () -{ - - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); - - ; - return 0; -} -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c99" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c99" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c99" != xno; then : - -fi - - - -# -# Using Solaris linker with gcc on Solaris breaks Thread Local Storage -# -case $host in #( - *-solaris*) : - - if test "$GCC" = "yes"; then : - LDFLAGS="$LDFLAGS -zrelax=transtls" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: When using GNU C Compiler on Solaris, -zrelax=transtls linker flag is used to fix bug in Thread Local Storage" >&5 -$as_echo "$as_me: WARNING: When using GNU C Compiler on Solaris, -zrelax=transtls linker flag is used to fix bug in Thread Local Storage" >&2;} - -fi - ;; #( - *) : - ;; -esac - -# -# CCNOOPT defaults to -O0 on gcc and disables optimization when is last -# -if test "X$CCNOOPT" = "X" -a "X$GCC" = "Xyes"; then - CCNOOPT="-O0" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - - -for ac_header in fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h sys/socket.h net/route.h linux/netlink.h linux/rtnetlink.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -#ifdef HAVE_SYS_PARAM_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# -# Check for thread local storage -# -for ac_header in threads.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "threads.h" "ac_cv_header_threads_h" "$ac_includes_default" -if test "x$ac_cv_header_threads_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_THREADS_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C11 Thread-Local Storage using thread_local" >&5 -$as_echo_n "checking for C11 Thread-Local Storage using thread_local... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - static thread_local int tls = 0; - return (tls); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_THREAD_LOCAL 1" >>confdefs.h - - -$as_echo "#define HAVE_TLS 1" >>confdefs.h - - -else - - as_fn_error $? "Thread Local Storage support required, update your toolchain to build BIND 9" "$LINENO" 5 - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Thread-Local Storage using __thread" >&5 -$as_echo_n "checking for Thread-Local Storage using __thread... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ - - static __thread int tls = 0; - return (tls); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE___THREAD 1" >>confdefs.h - - -$as_echo "#define HAVE_TLS 1" >>confdefs.h - - -else - - as_fn_error $? "Thread Local Storage support required, update your toolchain to build BIND 9" "$LINENO" 5 - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_volatile=yes -else - ac_cv_c_volatile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -$as_echo "#define volatile /**/" >>confdefs.h - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5 -$as_echo_n "checking for flexible array members... " >&6; } -if ${ac_cv_c_flexmember+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - struct s { int n; double d[]; }; -int -main () -{ -int m = getchar (); - struct s *p = malloc (offsetof (struct s, d) - + m * sizeof (double)); - p->d[0] = 0.0; - return p->d != (double *) NULL; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_flexmember=yes -else - ac_cv_c_flexmember=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 -$as_echo "$ac_cv_c_flexmember" >&6; } - if test $ac_cv_c_flexmember = yes; then - -$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h - - else - $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h - - fi - - -# -# Check for yield support on ARM processors -# -case $host in #( - arm*) : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yield instruction support" >&5 -$as_echo_n "checking for yield instruction support... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -__asm__ __volatile__ ("yield") - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_ARM_YIELD 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; #( - *) : - ;; -esac - -# -# Check for pause support on SPARC processors -# -case $host in #( - sparc*) : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pause instruction support" >&5 -$as_echo_n "checking for pause instruction support... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -__asm__ __volatile__ ("pause") - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_SPARC_PAUSE 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; #( - *) : - ;; -esac - -for ac_func in sysctlbyname -do : - ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname" -if test "x$ac_cv_func_sysctlbyname" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYSCTLBYNAME 1 -_ACEOF - -fi -done - - -# -# Check for the existence of mmap to enable the fast format zones -# -for ac_func in mmap -do : - ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MMAP 1 -_ACEOF - -fi -done - - -# -# Older versions of HP/UX don't define seteuid() and setegid() -# -for ac_func in seteuid setresuid -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in setegid setresgid -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t int -_ACEOF - -fi - - - ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" -if test "x$ac_cv_type_uintptr_t" = xyes; then : - -$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h - -else - for ac_type in 'unsigned int' 'unsigned long int' \ - 'unsigned long long int'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -cat >>confdefs.h <<_ACEOF -#define uintptr_t $ac_type -_ACEOF - - ac_type= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test -z "$ac_type" && break - done -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - -# -# check for uname library routine -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uname" >&5 -$as_echo_n "checking for uname... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ - - struct utsname uts; - uname(&uts); - printf("running on %s %s %s for %s\n", - uts.sysname, uts.release, uts.version, uts.machine); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_UNAME 1" >>confdefs.h - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: uname is not correctly supported" >&5 -$as_echo "$as_me: WARNING: uname is not correctly supported" >&2;} - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# check for GCC noreturn attribute -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC noreturn attribute" >&5 -$as_echo_n "checking for GCC noreturn attribute... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -void foo() __attribute__((noreturn)); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE" - ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE" - ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - -# -# check if we have kqueue -# -# Check whether --enable-kqueue was given. -if test "${enable_kqueue+set}" = set; then : - enableval=$enable_kqueue; -else - enable_kqueue="yes" -fi - - -if test "$enable_kqueue" = "yes"; then : - for ac_func in kqueue -do : - ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue" -if test "x$ac_cv_func_kqueue" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KQUEUE 1 -_ACEOF - -fi -done - -fi - -# -# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails, -# so we need to try running the code, not just test its existence. -# -# Check whether --enable-epoll was given. -if test "${enable_epoll+set}" = set; then : - enableval=$enable_epoll; -else - enable_epoll="yes" -fi - - -if test "$enable_epoll" = "yes"; then : - for ac_func in epoll_create1 -do : - ac_fn_c_check_func "$LINENO" "epoll_create1" "ac_cv_func_epoll_create1" -if test "x$ac_cv_func_epoll_create1" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EPOLL_CREATE1 1 -_ACEOF - -fi -done - -fi - -# -# check if we support /dev/poll -# -# Check whether --enable-devpoll was given. -if test "${enable_devpoll+set}" = set; then : - enableval=$enable_devpoll; -else - enable_devpoll="yes" -fi - -if test "$enable_devpoll" = "yes"; then : - for ac_header in sys/devpoll.h devpoll.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -fi - -# -# Find the machine's endian flavor. -# - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - - -# -# GeoIP support? -# -# Should be on by default if libmaxminddb exists. -# - -# Check whether --with-geoip2 was given. -if test "${with_geoip2+set}" = set; then : - withval=$with_geoip2; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-geoip2 is DEPRECATED and will be removed in a future release, use --with-maxminddb instead" >&5 -$as_echo "$as_me: WARNING: --with-geoip2 is DEPRECATED and will be removed in a future release, use --with-maxminddb instead" >&2;} -else - with_geoip2="auto" -fi - - -# Check whether --enable-geoip was given. -if test "${enable_geoip+set}" = set; then : - enableval=$enable_geoip; -else - enable_geoip="yes" -fi - - - -# Check whether --with-maxminddb was given. -if test "${with_maxminddb+set}" = set; then : - withval=$with_maxminddb; -else - with_maxminddb="$with_geoip2" -fi - - -GEOIP2LINKSRCS= -GEOIP2LINKOBJS= -if test "$enable_geoip" = "yes"; then : - case $with_maxminddb in #( - no) : - as_fn_error $? "Use '--disable-geoip' to disable the GeoIP" "$LINENO" 5 ;; #( - auto) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmaxminddb" >&5 -$as_echo_n "checking for libmaxminddb... " >&6; } - -if test -n "$MAXMINDDB_CFLAGS"; then - pkg_cv_MAXMINDDB_CFLAGS="$MAXMINDDB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libmaxminddb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_MAXMINDDB_CFLAGS=`$PKG_CONFIG --cflags "libmaxminddb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$MAXMINDDB_LIBS"; then - pkg_cv_MAXMINDDB_LIBS="$MAXMINDDB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libmaxminddb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_MAXMINDDB_LIBS=`$PKG_CONFIG --libs "libmaxminddb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MAXMINDDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmaxminddb" 2>&1` - else - MAXMINDDB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmaxminddb" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$MAXMINDDB_PKG_ERRORS" >&5 - - : -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - : -else - MAXMINDDB_CFLAGS=$pkg_cv_MAXMINDDB_CFLAGS - MAXMINDDB_LIBS=$pkg_cv_MAXMINDDB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_GEOIP2 1" >>confdefs.h - - -if test -n "$MAXMINDDB_PREFIX"; then - pkg_cv_MAXMINDDB_PREFIX="$MAXMINDDB_PREFIX" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libmaxminddb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_MAXMINDDB_PREFIX=`$PKG_CONFIG --variable="prefix" "libmaxminddb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -MAXMINDDB_PREFIX=$pkg_cv_MAXMINDDB_PREFIX - -if test "x$MAXMINDDB_PREFIX" = x""; then : - as_fn_error $? "libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment" "$LINENO" 5 -fi - GEOIP2LINKSRCS='${GEOIP2LINKSRCS}' - GEOIP2LINKOBJS='${GEOIP2LINKOBJS}' - -fi ;; #( - yes) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmaxminddb" >&5 -$as_echo_n "checking for libmaxminddb... " >&6; } - -if test -n "$MAXMINDDB_CFLAGS"; then - pkg_cv_MAXMINDDB_CFLAGS="$MAXMINDDB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libmaxminddb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_MAXMINDDB_CFLAGS=`$PKG_CONFIG --cflags "libmaxminddb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$MAXMINDDB_LIBS"; then - pkg_cv_MAXMINDDB_LIBS="$MAXMINDDB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libmaxminddb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_MAXMINDDB_LIBS=`$PKG_CONFIG --libs "libmaxminddb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - MAXMINDDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmaxminddb" 2>&1` - else - MAXMINDDB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmaxminddb" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$MAXMINDDB_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libmaxminddb) were not met: - -$MAXMINDDB_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables MAXMINDDB_CFLAGS -and MAXMINDDB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "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. - -Alternatively, you may set the environment variables MAXMINDDB_CFLAGS -and MAXMINDDB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - MAXMINDDB_CFLAGS=$pkg_cv_MAXMINDDB_CFLAGS - MAXMINDDB_LIBS=$pkg_cv_MAXMINDDB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_GEOIP2 1" >>confdefs.h - - -if test -n "$MAXMINDDB_PREFIX"; then - pkg_cv_MAXMINDDB_PREFIX="$MAXMINDDB_PREFIX" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmaxminddb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libmaxminddb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_MAXMINDDB_PREFIX=`$PKG_CONFIG --variable="prefix" "libmaxminddb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -MAXMINDDB_PREFIX=$pkg_cv_MAXMINDDB_PREFIX - -if test "x$MAXMINDDB_PREFIX" = x""; then : - as_fn_error $? "libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment" "$LINENO" 5 -fi - GEOIP2LINKSRCS='${GEOIP2LINKSRCS}' - GEOIP2LINKOBJS='${GEOIP2LINKOBJS}' - -fi ;; #( - *) : - # default - - - CCASFLAGS_maxminddb_ax_save_flags=$CCASFLAGS - - - - CFLAGS_maxminddb_ax_save_flags=$CFLAGS - - - - CPPFLAGS_maxminddb_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_maxminddb_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_maxminddb_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_maxminddb_ax_save_flags=$FCFLAGS - - - - FCLIBS_maxminddb_ax_save_flags=$FCLIBS - - - - FFLAGS_maxminddb_ax_save_flags=$FFLAGS - - - - FLIBS_maxminddb_ax_save_flags=$FLIBS - - - - GCJFLAGS_maxminddb_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_maxminddb_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_maxminddb_ax_save_flags=$LDFLAGS - - - - LIBS_maxminddb_ax_save_flags=$LIBS - - - - OBJCFLAGS_maxminddb_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_maxminddb_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_maxminddb_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_maxminddb_ax_save_flags=$VALAFLAGS - - - - MAXMINDDB_CFLAGS="-I$with_maxminddb/include" - MAXMINDDB_LIBS="-L$with_maxminddb/lib" - CFLAGS="$CFLAGS $MAXMINDDB_CFLAGS" - LDFLAGS="$LDFLAGS $MAXMINDDB_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MMDB_open" >&5 -$as_echo_n "checking for library containing MMDB_open... " >&6; } -if ${ac_cv_search_MMDB_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MMDB_open (); -int -main () -{ -return MMDB_open (); - ; - return 0; -} -_ACEOF -for ac_lib in '' maxminddb; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_MMDB_open=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_MMDB_open+:} false; then : - break -fi -done -if ${ac_cv_search_MMDB_open+:} false; then : - -else - ac_cv_search_MMDB_open=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MMDB_open" >&5 -$as_echo "$ac_cv_search_MMDB_open" >&6; } -ac_res=$ac_cv_search_MMDB_open -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -$as_echo "#define HAVE_GEOIP2 1" >>confdefs.h - - GEOIP2LINKSRCS='${GEOIP2LINKSRCS}' - GEOIP2LINKOBJS='${GEOIP2LINKOBJS}' - MAXMINDDB_LIBS="$MAXMINDDB_LIBS $ac_cv_search_mmdb_open" - { $as_echo "$as_me:${as_lineno-$LINENO}: GeoIP2 default database path set to $with_maxminddb/share/GeoIP" >&5 -$as_echo "$as_me: GeoIP2 default database path set to $with_maxminddb/share/GeoIP" >&6;} - eval MAXMINDDB_PREFIX=\$$with_maxminddb - -else - as_fn_error $? "GeoIP2 requested, but libmaxminddb not found" "$LINENO" 5 -fi - - - CCASFLAGS=$CCASFLAGS_maxminddb_ax_save_flags - - - CFLAGS=$CFLAGS_maxminddb_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_maxminddb_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_maxminddb_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_maxminddb_ax_save_flags - - - FCFLAGS=$FCFLAGS_maxminddb_ax_save_flags - - - FCLIBS=$FCLIBS_maxminddb_ax_save_flags - - - FFLAGS=$FFLAGS_maxminddb_ax_save_flags - - - FLIBS=$FLIBS_maxminddb_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_maxminddb_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_maxminddb_ax_save_flags - - - LDFLAGS=$LDFLAGS_maxminddb_ax_save_flags - - - LIBS=$LIBS_maxminddb_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_maxminddb_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_maxminddb_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_maxminddb_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_maxminddb_ax_save_flags - - - - ;; -esac - - -fi - - - - - - -# -# Do we have arc4random(), etc ? -# -for ac_func in arc4random arc4random_buf arc4random_uniform getrandom -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on Tru64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then - ax_pthread_save_CC="$CC" - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - if test "x$PTHREAD_CC" != "x"; then : - CC="$PTHREAD_CC" -fi - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 -$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); -int -main () -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = "xno"; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - CC="$ax_pthread_save_CC" - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 -# (Note: HP C rejects this with "bad form for `-t' option") -# -pthreads: Solaris/gcc (Note: HP C also rejects) -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads and -# -D_REENTRANT too), HP C (must be checked before -lpthread, which -# is present but should not be used directly; and before -mthreads, -# because the compiler interprets this as "-mt" + "-hreads") -# -mthreads: Mingw32/gcc, Lynx/gcc -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case $host_os in - - freebsd*) - - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) - # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) - - ax_pthread_flags="-kthread lthread $ax_pthread_flags" - ;; - - hpux*) - - # From the cc(1) man page: "[-mt] Sets various -D flags to enable - # multi-threading and also sets -lpthread." - - ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" - ;; - - openedition*) - - # IBM z/OS requires a feature-test macro to be defined in order to - # enable POSIX threads at all, so give the user a hint if this is - # not set. (We don't define these ourselves, as they can affect - # other portions of the system API in unpredictable ways.) - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) - AX_PTHREAD_ZOS_MISSING -# endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 -$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} -fi -rm -f conftest* - - ;; - - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (N.B.: The stubs are missing - # pthread_cleanup_push, or rather a function called by this macro, - # so we could check for that, but who knows whether they'll stub - # that too in a future libc.) So we'll check first for the - # standard Solaris way of linking pthreads (-mt -lpthread). - - ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" - ;; -esac - -# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) - -if test "x$GCC" = "xyes"; then : - ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" -fi - -# The presence of a feature test macro requesting re-entrant function -# definitions is, on some systems, a strong hint that pthreads support is -# correctly enabled - -case $host_os in - darwin* | hpux* | linux* | osf* | solaris*) - ax_pthread_check_macro="_REENTRANT" - ;; - - aix*) - ax_pthread_check_macro="_THREAD_SAFE" - ;; - - *) - ax_pthread_check_macro="--" - ;; -esac -if test "x$ax_pthread_check_macro" = "x--"; then : - ax_pthread_check_cond=0 -else - ax_pthread_check_cond="!defined($ax_pthread_check_macro)" -fi - -# Are we compiling with Clang? - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 -$as_echo_n "checking whether $CC is Clang... " >&6; } -if ${ax_cv_PTHREAD_CLANG+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_PTHREAD_CLANG=no - # Note that Autoconf sets GCC=yes for Clang as well as GCC - if test "x$GCC" = "xyes"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -# if defined(__clang__) && defined(__llvm__) - AX_PTHREAD_CC_IS_CLANG -# endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : - ax_cv_PTHREAD_CLANG=yes -fi -rm -f conftest* - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 -$as_echo "$ax_cv_PTHREAD_CLANG" >&6; } -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" - -ax_pthread_clang_warning=no - -# Clang needs special handling, because older versions handle the -pthread -# option in a rather... idiosyncratic way - -if test "x$ax_pthread_clang" = "xyes"; then - - # Clang takes -pthread; it has never supported any other flag - - # (Note 1: This will need to be revisited if a system that Clang - # supports has POSIX threads in a separate library. This tends not - # to be the way of modern systems, but it's conceivable.) - - # (Note 2: On some systems, notably Darwin, -pthread is not needed - # to get POSIX threads support; the API is always present and - # active. We could reasonably leave PTHREAD_CFLAGS empty. But - # -pthread does define _REENTRANT, and while the Darwin headers - # ignore this macro, third-party headers might not.) - - PTHREAD_CFLAGS="-pthread" - PTHREAD_LIBS= - - ax_pthread_ok=yes - - # However, older versions of Clang make a point of warning the user - # that, in an invocation where only linking and no compilation is - # taking place, the -pthread option has no effect ("argument unused - # during compilation"). They expect -pthread to be passed in only - # when source code is being compiled. - # - # Problem is, this is at odds with the way Automake and most other - # C build frameworks function, which is that the same flags used in - # compilation (CFLAGS) are also used in linking. Many systems - # supported by AX_PTHREAD require exactly this for POSIX threads - # support, and in fact it is often not straightforward to specify a - # flag that is used only in the compilation phase and not in - # linking. Such a scenario is extremely rare in practice. - # - # Even though use of the -pthread flag in linking would only print - # a warning, this can be a nuisance for well-run software projects - # that build with -Werror. So if the active version of Clang has - # this misfeature, we search for an option to squash it. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 -$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } -if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown - # Create an alternate version of $ac_link that compiles and - # links in two steps (.c -> .o, .o -> exe) instead of one - # (.c -> exe), because the warning occurs only in the second - # step - ax_pthread_save_ac_link="$ac_link" - ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` - ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - if test "x$ax_pthread_try" = "xunknown"; then : - break -fi - CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(void){return 0;} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_link="$ax_pthread_2step_ac_link" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(void){return 0;} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_link="$ax_pthread_save_ac_link" - CFLAGS="$ax_pthread_save_CFLAGS" - if test "x$ax_pthread_try" = "x"; then : - ax_pthread_try=no -fi - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 -$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } - - case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in - no | unknown) ;; - *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; - esac - -fi # $ax_pthread_clang = yes - -if test "x$ax_pthread_ok" = "xno"; then -for ax_pthread_try_flag in $ax_pthread_flags; do - - case $ax_pthread_try_flag in - none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; - - -mt,pthread) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 -$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } - PTHREAD_CFLAGS="-mt" - PTHREAD_LIBS="-lpthread" - ;; - - -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 -$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } - PTHREAD_CFLAGS="$ax_pthread_try_flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ax_pthread_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi -fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -$as_echo "$ax_pthread_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$ax_pthread_config" = "xno"; then : - continue -fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 -$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } - PTHREAD_LIBS="-l$ax_pthread_try_flag" - ;; - esac - - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -# if $ax_pthread_check_cond -# error "$ax_pthread_check_macro must be defined" -# endif - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; } -int -main () -{ -pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = "xyes"; then : - break -fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } -if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_PTHREAD_JOINABLE_ATTR=unknown - for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int attr = $ax_pthread_attr; return attr /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 -$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } - if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ - test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ - test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : - -cat >>confdefs.h <<_ACEOF -#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR -_ACEOF - - ax_pthread_joinable_attr_defined=yes - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 -$as_echo_n "checking whether more special flags are required for pthreads... " >&6; } -if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $host_os in - solaris*) - ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" - ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 -$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } - if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ - test "x$ax_pthread_special_flags_added" != "xyes"; then : - PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" - ax_pthread_special_flags_added=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int i = PTHREAD_PRIO_INHERIT; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_PTHREAD_PRIO_INHERIT=yes -else - ax_cv_PTHREAD_PRIO_INHERIT=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ - test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : - -$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h - - ax_pthread_prio_inherit_defined=yes - -fi - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != "xyes"; then - case $host_os in - aix*) - case "x/$CC" in #( - x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : - #handle absolute path differently from PATH based program lookup - case "x$CC" in #( - x/*) : - if as_fn_executable_p ${CC}_r; then : - PTHREAD_CC="${CC}_r" -fi ;; #( - *) : - for ac_prog in ${CC}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PTHREAD_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; #( - *) : - ;; -esac - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "x$ax_pthread_ok" = "xyes"; then - -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - - : -else - ax_pthread_ok=no - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -LIBS="$PTHREAD_LIBS $LIBS" -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -CC="$PTHREAD_CC" - -for ac_func in pthread_attr_getstacksize pthread_attr_setstacksize -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - -# Check whether --with-locktype was given. -if test "${with_locktype+set}" = set; then : - withval=$with_locktype; -else - with_locktype="adaptive" -fi - - -case $with_locktype in #( - adaptive) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ADAPTIVE_NP" >&5 -$as_echo_n "checking for PTHREAD_MUTEX_ADAPTIVE_NP... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #ifndef _GNU_SOURCE - #define _GNU_SOURCE - #endif - #include - -int -main () -{ - - return (PTHREAD_MUTEX_ADAPTIVE_NP); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using adaptive lock type" >&5 -$as_echo "using adaptive lock type" >&6; } - -$as_echo "#define HAVE_PTHREAD_MUTEX_ADAPTIVE_NP 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using standard lock type" >&5 -$as_echo "using standard lock type" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; #( - standard) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using standard lock type" >&5 -$as_echo "using standard lock type" >&6; } ;; #( - *) : - as_fn_error $? "You must specify \"adaptive\" or \"standard\" for --with-locktype." "$LINENO" 5 - ;; -esac - -for ac_header in sched.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default" -if test "x$ac_cv_header_sched_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SCHED_H 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5 -$as_echo_n "checking for library containing sched_yield... " >&6; } -if ${ac_cv_search_sched_yield+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sched_yield (); -int -main () -{ -return sched_yield (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_sched_yield=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_sched_yield+:} false; then : - break -fi -done -if ${ac_cv_search_sched_yield+:} false; then : - -else - ac_cv_search_sched_yield=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5 -$as_echo "$ac_cv_search_sched_yield" >&6; } -ac_res=$ac_cv_search_sched_yield -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -for ac_func in sched_yield pthread_yield pthread_yield_np -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -for ac_header in sys/cpuset.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/cpuset.h" "ac_cv_header_sys_cpuset_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_cpuset_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_CPUSET_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/procset.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/procset.h" "ac_cv_header_sys_procset_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_procset_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PROCSET_H 1 -_ACEOF - -fi - -done - -for ac_func in pthread_setaffinity_np cpuset_setaffinity processor_bind sched_setaffinity -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# Look for functions relating to thread naming -for ac_func in pthread_setname_np pthread_set_name_np -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_header in pthread_np.h -do : - ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "#include -" -if test "x$ac_cv_header_pthread_np_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_NP_H 1 -_ACEOF - -fi - -done - - -# libuv -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuv" >&5 -$as_echo_n "checking for libuv... " >&6; } - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuv >= 1.0.0" >&5 -$as_echo_n "checking for libuv >= 1.0.0... " >&6; } - -if test -n "$LIBUV_CFLAGS"; then - pkg_cv_LIBUV_CFLAGS="$LIBUV_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuv >= 1.0.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libuv >= 1.0.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBUV_CFLAGS=`$PKG_CONFIG --cflags "libuv >= 1.0.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LIBUV_LIBS"; then - pkg_cv_LIBUV_LIBS="$LIBUV_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuv >= 1.0.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libuv >= 1.0.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBUV_LIBS=`$PKG_CONFIG --libs "libuv >= 1.0.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBUV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libuv >= 1.0.0" 2>&1` - else - LIBUV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libuv >= 1.0.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBUV_PKG_ERRORS" >&5 - - as_fn_error $? "libuv not found" "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "libuv not found" "$LINENO" 5 -else - LIBUV_CFLAGS=$pkg_cv_LIBUV_CFLAGS - LIBUV_LIBS=$pkg_cv_LIBUV_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - CCASFLAGS_libuv_ax_save_flags=$CCASFLAGS - - - - CFLAGS_libuv_ax_save_flags=$CFLAGS - - - - CPPFLAGS_libuv_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_libuv_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_libuv_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_libuv_ax_save_flags=$FCFLAGS - - - - FCLIBS_libuv_ax_save_flags=$FCLIBS - - - - FFLAGS_libuv_ax_save_flags=$FFLAGS - - - - FLIBS_libuv_ax_save_flags=$FLIBS - - - - GCJFLAGS_libuv_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_libuv_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_libuv_ax_save_flags=$LDFLAGS - - - - LIBS_libuv_ax_save_flags=$LIBS - - - - OBJCFLAGS_libuv_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_libuv_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_libuv_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_libuv_ax_save_flags=$VALAFLAGS - - - - -CFLAGS="$CFLAGS $LIBUV_CFLAGS" -LIBS="$LIBS $LIBUV_LIBS" - -# Those functions are only provided in newer versions of libuv, we'll be emulating them -# for now -for ac_func in uv_handle_get_data uv_handle_set_data uv_import -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# -# flockfile is usually provided by pthreads -# -for ac_func in flockfile getc_unlocked -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# -# Look for sysconf to allow detection of the number of processors. -# -for ac_func in sysconf -do : - ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" -if test "x$ac_cv_func_sysconf" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYSCONF 1 -_ACEOF - -fi -done - - - - -# -# Do we want to use pthread rwlock? -# -# Check whether --enable-pthread_rwlock was given. -if test "${enable_pthread_rwlock+set}" = set; then : - enableval=$enable_pthread_rwlock; -else - enable_pthread_rwlock=no -fi - - -if test "$enable_pthread_rwlock" = "yes"; then : - for ac_func in pthread_rwlock_rdlock -do : - ac_fn_c_check_func "$LINENO" "pthread_rwlock_rdlock" "ac_cv_func_pthread_rwlock_rdlock" -if test "x$ac_cv_func_pthread_rwlock_rdlock" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_RWLOCK_RDLOCK 1 -_ACEOF - -else - as_fn_error $? "pthread_rwlock_rdlock requested but not found" "$LINENO" 5 -fi -done - - -$as_echo "#define USE_PTHREAD_RWLOCK 1" >>confdefs.h - - -fi - -CRYPTO=OpenSSL - -# -# OpenSSL/LibreSSL is mandatory -# - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcrypto" >&5 -$as_echo_n "checking for libcrypto... " >&6; } - -if test -n "$OPENSSL_CFLAGS"; then - pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "libcrypto" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$OPENSSL_LIBS"; then - pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "libcrypto" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcrypto" 2>&1` - else - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcrypto" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$OPENSSL_PKG_ERRORS" >&5 - - - found=false - default_ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/local/opt/openssl /usr/local/opt/libressl /usr" - -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; - case $with_openssl in #( - ""|y|ye|yes) : - ssldirs="$default_ssldirs" ;; #( - n|no) : - as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5 ;; #( - *) : - ssldirs="$withval" ;; #( - *) : - ssldirs="$default_ssldirs" - ;; -esac - -else - - # if pkg-config is installed and openssl has installed a .pc file, - # then use that information and don't search ssldirs - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto" >&5 -$as_echo_n "checking for crypto... " >&6; } - -if test -n "$OPENSSL_CFLAGS"; then - pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"crypto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "crypto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "crypto" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$OPENSSL_LIBS"; then - pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"crypto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "crypto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "crypto" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "crypto" 2>&1` - else - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "crypto" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$OPENSSL_PKG_ERRORS" >&5 - - ssldirs="$default_ssldirs" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ssldirs="$default_ssldirs" -else - OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS - OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - found=true -fi - - - -fi - - - - # note that we #include , so the OpenSSL headers have to be in - # an 'openssl' subdirectory - - if ! $found; then : - - OPENSSL_CFLAGS= - for ssldir in $ssldirs; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 -$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; } - if test -f "$ssldir/include/openssl/ssl.h"; then : - - OPENSSL_CFLAGS="-I$ssldir/include" - OPENSSL_LIBS="-L$ssldir/lib -lcrypto" - found=true - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - break - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - done - - # if the file wasn't found, well, go ahead and try the link anyway -- maybe - # it will just work! - -fi - - # try the preprocessor and linker with our new flags, - # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5 -$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; } - # AC_MSG_NOTICE([Trying link with OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_CFLAGS=$OPENSSL_CFLAGS]) - - save_LIBS="$LIBS" - save_CPPFLAGS="$CPPFLAGS" - LIBS="$OPENSSL_LIBS $LIBS" - CPPFLAGS="$OPENSSL_CFLAGS $CPPFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - OPENSSL_free(NULL); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "OpenSSL/LibreSSL not found -See \`config.log' for more details" "$LINENO" 5; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" - LIBS="$save_LIBS" - - - - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - found=false - default_ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/local/opt/openssl /usr/local/opt/libressl /usr" - -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; - case $with_openssl in #( - ""|y|ye|yes) : - ssldirs="$default_ssldirs" ;; #( - n|no) : - as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5 ;; #( - *) : - ssldirs="$withval" ;; #( - *) : - ssldirs="$default_ssldirs" - ;; -esac - -else - - # if pkg-config is installed and openssl has installed a .pc file, - # then use that information and don't search ssldirs - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto" >&5 -$as_echo_n "checking for crypto... " >&6; } - -if test -n "$OPENSSL_CFLAGS"; then - pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"crypto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "crypto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "crypto" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$OPENSSL_LIBS"; then - pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"crypto\""; } >&5 - ($PKG_CONFIG --exists --print-errors "crypto") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "crypto" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "crypto" 2>&1` - else - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "crypto" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$OPENSSL_PKG_ERRORS" >&5 - - ssldirs="$default_ssldirs" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ssldirs="$default_ssldirs" -else - OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS - OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - found=true -fi - - - -fi - - - - # note that we #include , so the OpenSSL headers have to be in - # an 'openssl' subdirectory - - if ! $found; then : - - OPENSSL_CFLAGS= - for ssldir in $ssldirs; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 -$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; } - if test -f "$ssldir/include/openssl/ssl.h"; then : - - OPENSSL_CFLAGS="-I$ssldir/include" - OPENSSL_LIBS="-L$ssldir/lib -lcrypto" - found=true - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - break - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - done - - # if the file wasn't found, well, go ahead and try the link anyway -- maybe - # it will just work! - -fi - - # try the preprocessor and linker with our new flags, - # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5 -$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; } - # AC_MSG_NOTICE([Trying link with OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_CFLAGS=$OPENSSL_CFLAGS]) - - save_LIBS="$LIBS" - save_CPPFLAGS="$CPPFLAGS" - LIBS="$OPENSSL_LIBS $LIBS" - CPPFLAGS="$OPENSSL_CFLAGS $CPPFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main () -{ - - OPENSSL_free(NULL); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - : - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "OpenSSL/LibreSSL not found -See \`config.log' for more details" "$LINENO" 5; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" - LIBS="$save_LIBS" - - - - -else - OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS - OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - - CCASFLAGS_openssl_ax_save_flags=$CCASFLAGS - - - - CFLAGS_openssl_ax_save_flags=$CFLAGS - - - - CPPFLAGS_openssl_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_openssl_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_openssl_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_openssl_ax_save_flags=$FCFLAGS - - - - FCLIBS_openssl_ax_save_flags=$FCLIBS - - - - FFLAGS_openssl_ax_save_flags=$FFLAGS - - - - FLIBS_openssl_ax_save_flags=$FLIBS - - - - GCJFLAGS_openssl_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_openssl_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_openssl_ax_save_flags=$LDFLAGS - - - - LIBS_openssl_ax_save_flags=$LIBS - - - - OBJCFLAGS_openssl_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_openssl_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_openssl_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_openssl_ax_save_flags=$VALAFLAGS - - - - -CFLAGS="$CFLAGS $OPENSSL_CFLAGS" -LIBS="$LIBS $OPENSSL_LIBS" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL >= 1.0.0 or LibreSSL" >&5 -$as_echo_n "checking for OpenSSL >= 1.0.0 or LibreSSL... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x1000000fL) - #error OpenSSL >= 1.0.0 or LibreSSL required - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "not found -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# Check for functions added in OpenSSL or LibreSSL -# - -for ac_func in CRYPTO_zalloc -do : - ac_fn_c_check_func "$LINENO" "CRYPTO_zalloc" "ac_cv_func_CRYPTO_zalloc" -if test "x$ac_cv_func_CRYPTO_zalloc" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CRYPTO_ZALLOC 1 -_ACEOF - -fi -done - -for ac_func in EVP_CIPHER_CTX_new EVP_CIPHER_CTX_free -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in EVP_MD_CTX_new EVP_MD_CTX_free EVP_MD_CTX_reset -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in HMAC_CTX_new HMAC_CTX_free HMAC_CTX_reset HMAC_CTX_get_md -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# -# Check for algorithm support in OpenSSL -# - -for ac_func in ECDSA_sign ECDSA_verify -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "ECDSA support in OpenSSL is mandatory. -See \`config.log' for more details" "$LINENO" 5; } -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECDSA P-256 support" >&5 -$as_echo_n "checking for ECDSA P-256 support... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -EC_KEY *key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "not found. ECDSA P-256 support in OpenSSL is mandatory. -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECDSA P-384 support" >&5 -$as_echo_n "checking for ECDSA P-384 support... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -EC_KEY *key = EC_KEY_new_by_curve_name(NID_secp384r1); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "not found. ECDSA P-384 support in OpenSSL is mandatory. -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ed25519 support" >&5 -$as_echo_n "checking for Ed25519 support... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -EC_KEY *key = EC_KEY_new_by_curve_name(NID_ED25519); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_OPENSSL_ED25519 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ed448 support" >&5 -$as_echo_n "checking for Ed448 support... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -EC_KEY *key = EC_KEY_new_by_curve_name(NID_ED448); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_OPENSSL_ED448 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SipHash support" >&5 -$as_echo_n "checking for SipHash support... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -#if OPENSSL_VERSION_NUMBER < 0x10101010L - #error OpenSSL >= 1.1.1a required for working SipHash initialization - #endif - EVP_PKEY *key = EVP_PKEY_new_raw_private_key( - EVP_PKEY_SIPHASH, NULL, NULL, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_OPENSSL_SIPHASH 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# Check for OpenSSL SHA-1 support -# -for ac_func in EVP_sha1 -do : - ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1" -if test "x$ac_cv_func_EVP_sha1" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EVP_SHA1 1 -_ACEOF - : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "SHA-1 support in OpenSSL is mandatory. -See \`config.log' for more details" "$LINENO" 5; } -fi -done - - -# -# Check for OpenSSL SHA-2 support -# -for ac_func in EVP_sha224 EVP_sha256 EVP_sha384 EVP_sha512 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "SHA-2 support in OpenSSL is mandatory. -See \`config.log' for more details" "$LINENO" 5; } -fi -done - - -# -# Check for OpenSSL AES support -# -for ac_func in EVP_aes_128_ecb EVP_aes_192_ecb EVP_aes_256_ecb -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "AES support in OpenSSL is mandatory. -See \`config.log' for more details" "$LINENO" 5; } -fi -done - - -# -# Check for OpenSSL 1.1.x/LibreSSL functions -# -for ac_func in DH_get0_key ECDSA_SIG_get0 RSA_set0_key -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# -# Check whether FIPS mode is available and whether we should enable it -# -# Check whether --enable-fips-mode was given. -if test "${enable_fips_mode+set}" = set; then : - enableval=$enable_fips_mode; -else - enable_fips_mode="no" -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable FIPS mode in OpenSSL library" >&5 -$as_echo_n "checking whether to enable FIPS mode in OpenSSL library... " >&6; } -case $enable_fips_mode in #( - yes) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - for ac_func in FIPS_mode -do : - ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode" -if test "x$ac_cv_func_FIPS_mode" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FIPS_MODE 1 -_ACEOF - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "OpenSSL FIPS mode requested but not available. -See \`config.log' for more details" "$LINENO" 5; } -fi -done - ;; #( - no) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;; #( - *) : - ;; -esac - - - CCASFLAGS=$CCASFLAGS_openssl_ax_save_flags - - - CFLAGS=$CFLAGS_openssl_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_openssl_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_openssl_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_openssl_ax_save_flags - - - FCFLAGS=$FCFLAGS_openssl_ax_save_flags - - - FCLIBS=$FCLIBS_openssl_ax_save_flags - - - FFLAGS=$FFLAGS_openssl_ax_save_flags - - - FLIBS=$FLIBS_openssl_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_openssl_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_openssl_ax_save_flags - - - LDFLAGS=$LDFLAGS_openssl_ax_save_flags - - - LIBS=$LIBS_openssl_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_openssl_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_openssl_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_openssl_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_openssl_ax_save_flags - - - - - - - -PKCS11_TOOLS= -PKCS11_TEST= -# -# was --enable-native-pkcs11 specified? -# -# Check whether --enable-native-pkcs11 was given. -if test "${enable_native_pkcs11+set}" = set; then : - enableval=$enable_native_pkcs11; : -else - enable_native_pkcs11="no" -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS11 for Public-Key Cryptography" >&5 -$as_echo_n "checking for PKCS11 for Public-Key Cryptography... " >&6; } -case $enable_native_pkcs11 in #( - no) : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;; #( - yes) : - PKCS11_TOOLS=pkcs11 - PKCS11_TEST=pkcs11 - CRYPTO=pkcs11 - if $use_threads; then : - : -else - as_fn_error $? "PKCS11 requires threading support" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - for ac_func in getpassphrase -do : - ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase" -if test "x$ac_cv_func_getpassphrase" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPASSPHRASE 1 -_ACEOF - -fi -done - - ;; #( - *) : - ;; -esac - - - - -case $CRYPTO in #( - pkcs11) : - -$as_echo "#define USE_PKCS11 1" >>confdefs.h - ;; #( - *) : - -$as_echo "#define USE_OPENSSL 1" >>confdefs.h - ;; -esac - -# preparation for automake -# AM_CONDITIONAL([PKCS11_TOOLS], [test "$with_native_pkcs11" = "yes"]) - -# -# was --with-pkcs11 specified? -# - -# Check whether --with-pkcs11 was given. -if test "${with_pkcs11+set}" = set; then : - withval=$with_pkcs11; : -else - with_pkcs11="undefined" -fi - - -case $with_pkcs11 in #( - yes|auto) : - as_fn_error $? "--with-pkcs11 needs explicit path to the PKCS11 library" "$LINENO" 5 ;; #( - no|undefined) : - with_pkcs11="undefined" ;; #( - *) : - ;; -esac - -cat >>confdefs.h <<_ACEOF -#define PK11_LIB_LOCATION "$with_pkcs11" -_ACEOF - - -# for PKCS11 benchmarks - -have_clock_gt=no -ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - have_clock_gt=yes -fi - -if test "no" = "$have_clock_gt"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if ${ac_cv_lib_rt_clock_gettime+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_clock_gettime=yes -else - ac_cv_lib_rt_clock_gettime=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : - have_clock_gt=rt -fi - -fi - -if test "no" != "$have_clock_gt"; then - -$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - -fi - -if test "rt" = "$have_clock_gt"; then - LIBS="-lrt $LIBS" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSSAPI library" >&5 -$as_echo_n "checking for GSSAPI library... " >&6; } - -# Check whether --with-gssapi was given. -if test "${with_gssapi+set}" = set; then : - withval=$with_gssapi; use_gssapi="$withval" -else - use_gssapi="auto" -fi - - -# first try using krb5-config, if that does not work then fall back to "yes" method. - -case "$use_gssapi" in -*/krb5-config|krb5-config) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: trying $use_gssapi" >&5 -$as_echo "trying $use_gssapi" >&6; } - if test krb5-config = "$use_gssapi" - then - # Extract the first word of "$use_gssapi", so it can be a program name with args. -set dummy $use_gssapi; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_KRB5_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $KRB5_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG -if test -n "$KRB5_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5 -$as_echo "$KRB5_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - KRB5_CONFIG="$use_gssapi" - fi - gssapi_cflags=`$KRB5_CONFIG --cflags gssapi` - gssapi_libs=`$KRB5_CONFIG --libs gssapi` - saved_cppflags="$CPPFLAGS" - CPPFLAGS="$gssapi_cflags $CPPFLAGS" - for ac_header in gssapi.h gssapi/gssapi.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>" -fi - -done - - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: gssapi.h not found" >&5 -$as_echo "krb5-config: gssapi.h not found" >&6; } - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - for ac_header in krb5/krb5.h krb5.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>" -fi - -done - - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: krb5.h not found" >&5 -$as_echo "krb5-config: krb5.h not found" >&6; } - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - CPPFLAGS="$saved_cppflags" - saved_libs="$LIBS" - LIBS=$gssapi_libs - { $as_echo "$as_me:${as_lineno-$LINENO}: checking krb5-config linking as $LIBS" >&5 -$as_echo_n "checking krb5-config linking as $LIBS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -gss_acquire_cred();krb5_init_context() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gssapi_linked=yes -else - gssapi_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - case $gssapi_linked in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: linked" >&5 -$as_echo "krb5-config: linked" >&6; };; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: krb5-config: could not determine proper GSSAPI linkage" >&5 -$as_echo "krb5-config: could not determine proper GSSAPI linkage" >&6; } - use_gssapi="yes" - ;; - esac - LIBS=$saved_libs - fi - fi - if test "yes" = "$use_gssapi"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSSAPI library, non krb5-config method" >&5 -$as_echo_n "checking for GSSAPI library, non krb5-config method... " >&6; } - fi - ;; -esac - -case "$host" in -*darwin*) - if test "yes" = "$use_gssapi" -o "auto" = "$use_gssapi" - then - use_gssapi=framework - fi - ;; -esac - -# gssapi is just the framework, we really require kerberos v5, so -# look for those headers (the gssapi headers must be there, too) -# The problem with this implementation is that it doesn't allow -# for the specification of gssapi and krb5 headers in different locations, -# which probably ought to be fixed although fixing might raise the issue of -# trying to build with incompatible versions of gssapi and krb5. -if test "yes" = "$use_gssapi" -o "auto" = "$use_gssapi" -then - # first, deal with the obvious - if test \( -f /usr/include/kerberosv5/krb5.h -o \ - -f /usr/include/krb5/krb5.h -o \ - -f /usr/include/krb5.h \) -a \ - \( -f /usr/include/gssapi.h -o \ - -f /usr/include/gssapi/gssapi.h \) - then - use_gssapi=/usr - else - krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr" - for d in $krb5dirs - do - if test -f $d/include/gssapi/gssapi_krb5.h -o \ - -f $d/include/krb5.h - then - if test -f $d/include/gssapi/gssapi.h -o \ - -f $d/include/gssapi.h - then - use_gssapi=$d - break - fi - fi - done - if test "auto" = "$use_gssapi" - then - use_gssapi="no" - fi - fi -fi - -case "$use_gssapi" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - USE_GSSAPI='' - ;; - yes) - as_fn_error $? "--with-gssapi must specify a path" "$LINENO" 5 - ;; - */krb5-config|krb5-config) - USE_GSSAPI='-DGSSAPI' - DST_GSSAPI_INC="$gssapi_cflags" - DNS_GSSAPI_LIBS="$gssapi_libs" - ;; - framework) - USE_GSSAPI='-DGSSAPI' - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER " - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER " - DNS_GSSAPI_LIBS="-framework Kerberos" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: framework" >&5 -$as_echo "framework" >&6; } - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: looking in $use_gssapi/lib" >&5 -$as_echo "looking in $use_gssapi/lib" >&6; } - USE_GSSAPI='-DGSSAPI' - saved_cppflags="$CPPFLAGS" - CPPFLAGS="-I$use_gssapi/include $CPPFLAGS" - for ac_header in gssapi.h gssapi/gssapi.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>" - gssapi_hack="#include <$ac_header>" -fi - -done - - - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - as_fn_error $? "gssapi.h not found" "$LINENO" 5 - fi - - for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>" - gssapi_krb5_hack="#include <$ac_header>" -fi - -done - - - for ac_header in krb5.h krb5/krb5.h kerberosv5/krb5.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>" - krb5_hack="#include <$ac_header>" -fi - -done - - - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - as_fn_error $? "krb5.h not found" "$LINENO" 5 - fi - - # - # XXXDCL This probably doesn't work right on all systems. - # It will need to be worked on as problems become evident. - # - # Essentially the problems here relate to two different - # areas. The first area is building with either KTH - # or MIT Kerberos, particularly when both are present on - # the machine. The other is static versus dynamic linking. - # - # On the KTH vs MIT issue, Both have libkrb5 that can mess - # up the works if one implementation ends up trying to - # use the other's krb. This is unfortunately a situation - # that very easily arises. - # - # Dynamic linking when the dependency information is built - # into MIT's libgssapi_krb5 or KTH's libgssapi magically makes - # all such problems go away, but when that setup is not - # present, because either the dynamic libraries lack - # dependencies or static linking is being done, then the - # problems start to show up. - saved_libs="$LIBS" - for TRY_LIBS in \ - "-lgssapi_krb5" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \ - "-lgssapi" \ - "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lhx509 -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgss -lkrb5" - do - # Note that this does not include $saved_libs, because - # on FreeBSD machines this configure script has added - # -L/usr/local/lib to LIBS, which can make the - # -lgssapi_krb5 test succeed with shared libraries even - # when you are trying to build with KTH in /usr/lib. - if test "/usr" = "$use_gssapi" - then - LIBS="$TRY_LIBS $ISC_OPENSSL_LIBS" - else - LIBS="-L$use_gssapi/lib $TRY_LIBS $ISC_OPENSSL_LIBS" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking linking as $TRY_LIBS" >&5 -$as_echo_n "checking linking as $TRY_LIBS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -$gssapi_hack -$gssapi_krb5_hack -$krb5_hack - -int -main () -{ -gss_acquire_cred(NULL, NULL, 0, NULL, 0, NULL, NULL, NULL);krb5_init_context(NULL); -#if defined(HAVE_GSSAPI_KRB5_H) || defined(HAVE_GSSAPI_GSSAPI_KRB5_H) -gsskrb5_register_acceptor_identity(NULL); -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gssapi_linked=yes -else - gssapi_linked=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - case $gssapi_linked in - yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; break ;; - no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;; - esac - done - - CPPFLAGS="$saved_cppflags" - - case $gssapi_linked in - no) as_fn_error $? "could not determine proper GSSAPI linkage" "$LINENO" 5 ;; - esac - - # - # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib - # but MIT in /usr/local/lib and trying to build with KTH. - # /usr/local/lib can end up earlier on the link lines. - # Like most kludges, this one is not only inelegant it - # is also likely to be the wrong thing to do at least as - # many times as it is the right thing. Something better - # needs to be done. - # - if test "/usr" = "$use_gssapi" -a \ - -f /usr/local/lib/libkrb5.a; then - FIX_KTH_VS_MIT=yes - fi - - case "$FIX_KTH_VS_MIT" in - yes) - case "$enable_static_linking" in - yes) gssapi_lib_suffix=".a" ;; - *) gssapi_lib_suffix=".so" ;; - esac - - for lib in $LIBS; do - case $lib in - -L*) - ;; - -l*) - new_lib=`echo $lib | - sed -e s%^-l%$use_gssapi/lib/lib% \ - -e s%$%$gssapi_lib_suffix%` - NEW_LIBS="$NEW_LIBS $new_lib" - ;; - *) - as_fn_error $? "KTH vs MIT Kerberos confusion!" "$LINENO" 5 - ;; - esac - done - LIBS="$NEW_LIBS" - ;; - esac - - DST_GSSAPI_INC="-I$use_gssapi/include" - DNS_GSSAPI_LIBS="$LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using GSSAPI from $use_gssapi/lib and $use_gssapi/include" >&5 -$as_echo "using GSSAPI from $use_gssapi/lib and $use_gssapi/include" >&6; } - LIBS="$saved_libs" - ;; -esac - - - - - - - - - -DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS" - -# -# Applications linking with libdns also need to link with these libraries. -# - - - -# -# was --with-lmdb specified? -# - - -# Check whether --with-lmdb was given. -if test "${with_lmdb+set}" = set; then : - withval=$with_lmdb; : -else - with_lmdb="auto" -fi - - -ac_lib_lmdb_found=no -case $with_lmdb in #( - no) : - ;; #( - auto|yes) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lmdb" >&5 -$as_echo_n "checking for lmdb... " >&6; } - -if test -n "$LMDB_CFLAGS"; then - pkg_cv_LMDB_CFLAGS="$LMDB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lmdb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "lmdb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LMDB_CFLAGS=`$PKG_CONFIG --cflags "lmdb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LMDB_LIBS"; then - pkg_cv_LMDB_LIBS="$LMDB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lmdb\""; } >&5 - ($PKG_CONFIG --exists --print-errors "lmdb") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LMDB_LIBS=`$PKG_CONFIG --libs "lmdb" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LMDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lmdb" 2>&1` - else - LMDB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lmdb" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LMDB_PKG_ERRORS" >&5 - - for ac_lib_lmdb_path in /usr /usr/local /opt /opt/local; do - if test -z "$ac_lib_lmdb_path"; then : - as_fn_error $? "Path cannot be empty" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lmdb header in $ac_lib_lmdb_path" >&5 -$as_echo_n "checking for lmdb header in $ac_lib_lmdb_path... " >&6; } - if test -r "$ac_lib_lmdb_path/include/lmdb.h"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - LMDB_CFLAGS="-I$ac_lib_lmdb_path/include" - LMDB_LIBS="-L$ac_lib_lmdb_path/lib" - saved_CFLAGS="$CFLAGS" - saved_LIBS="$LIBS" - CFLAGS="$CFLAGS $LMDB_CFLAGS" - LIBS="$LIBS $LMDB_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mdb_env_create" >&5 -$as_echo_n "checking for library containing mdb_env_create... " >&6; } -if ${ac_cv_search_mdb_env_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mdb_env_create (); -int -main () -{ -return mdb_env_create (); - ; - return 0; -} -_ACEOF -for ac_lib in '' lmdb; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_mdb_env_create=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_mdb_env_create+:} false; then : - break -fi -done -if ${ac_cv_search_mdb_env_create+:} false; then : - -else - ac_cv_search_mdb_env_create=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mdb_env_create" >&5 -$as_echo "$ac_cv_search_mdb_env_create" >&6; } -ac_res=$ac_cv_search_mdb_env_create -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - LMDB_LIBS="$LMDB_LIBS $ac_cv_search_mdb_env_create" - - - ac_lib_lmdb_found=yes - break - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LMDB_CFLAGS="" - LMDB_LIBS="" - - -fi - - CFLAGS="$saved_CFLAGS" - LIBS="$saved_LIBS" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - done - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - for ac_lib_lmdb_path in /usr /usr/local /opt /opt/local; do - if test -z "$ac_lib_lmdb_path"; then : - as_fn_error $? "Path cannot be empty" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lmdb header in $ac_lib_lmdb_path" >&5 -$as_echo_n "checking for lmdb header in $ac_lib_lmdb_path... " >&6; } - if test -r "$ac_lib_lmdb_path/include/lmdb.h"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - LMDB_CFLAGS="-I$ac_lib_lmdb_path/include" - LMDB_LIBS="-L$ac_lib_lmdb_path/lib" - saved_CFLAGS="$CFLAGS" - saved_LIBS="$LIBS" - CFLAGS="$CFLAGS $LMDB_CFLAGS" - LIBS="$LIBS $LMDB_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mdb_env_create" >&5 -$as_echo_n "checking for library containing mdb_env_create... " >&6; } -if ${ac_cv_search_mdb_env_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mdb_env_create (); -int -main () -{ -return mdb_env_create (); - ; - return 0; -} -_ACEOF -for ac_lib in '' lmdb; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_mdb_env_create=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_mdb_env_create+:} false; then : - break -fi -done -if ${ac_cv_search_mdb_env_create+:} false; then : - -else - ac_cv_search_mdb_env_create=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mdb_env_create" >&5 -$as_echo "$ac_cv_search_mdb_env_create" >&6; } -ac_res=$ac_cv_search_mdb_env_create -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - LMDB_LIBS="$LMDB_LIBS $ac_cv_search_mdb_env_create" - - - ac_lib_lmdb_found=yes - break - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LMDB_CFLAGS="" - LMDB_LIBS="" - - -fi - - CFLAGS="$saved_CFLAGS" - LIBS="$saved_LIBS" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - done - -else - LMDB_CFLAGS=$pkg_cv_LMDB_CFLAGS - LMDB_LIBS=$pkg_cv_LMDB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_lib_lmdb_found=yes -fi ;; #( - *) : - if test -z "$with_lmdb"; then : - as_fn_error $? "Path cannot be empty" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lmdb header in $with_lmdb" >&5 -$as_echo_n "checking for lmdb header in $with_lmdb... " >&6; } - if test -r "$with_lmdb/include/lmdb.h"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - LMDB_CFLAGS="-I$with_lmdb/include" - LMDB_LIBS="-L$with_lmdb/lib" - saved_CFLAGS="$CFLAGS" - saved_LIBS="$LIBS" - CFLAGS="$CFLAGS $LMDB_CFLAGS" - LIBS="$LIBS $LMDB_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mdb_env_create" >&5 -$as_echo_n "checking for library containing mdb_env_create... " >&6; } -if ${ac_cv_search_mdb_env_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mdb_env_create (); -int -main () -{ -return mdb_env_create (); - ; - return 0; -} -_ACEOF -for ac_lib in '' lmdb; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_mdb_env_create=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_mdb_env_create+:} false; then : - break -fi -done -if ${ac_cv_search_mdb_env_create+:} false; then : - -else - ac_cv_search_mdb_env_create=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mdb_env_create" >&5 -$as_echo "$ac_cv_search_mdb_env_create" >&6; } -ac_res=$ac_cv_search_mdb_env_create -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - LMDB_LIBS="$LMDB_LIBS $ac_cv_search_mdb_env_create" - - - ac_lib_lmdb_found=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LMDB_CFLAGS="" - LMDB_LIBS="" - - -fi - - CFLAGS="$saved_CFLAGS" - LIBS="$saved_LIBS" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi ;; -esac - -# don't fail when in automatic mode -if test "$with_lmdb" = "auto" && test "$ac_lib_lmdb_found" = "no"; then : - with_lmdb=no -fi - -# hard fail when LMDB requested, but not found -if test "$with_lmdb" != "no" && test "$ac_lib_lmdb_found" != "yes"; then : - as_fn_error $? "LMDB requested, but not found" "$LINENO" 5 -fi - -if test "$ac_lib_lmdb_found" = "yes"; then : - -$as_echo "#define HAVE_LMDB 1" >>confdefs.h - -fi - - - -#AM_CONDITIONAL([HAVE_LMDB], [test "$ac_lib_lmdb_found" = "yes"]) - -NZD_TOOLS= -NZDSRCS= -NZDTARGETS= -if test -n "$LMDB_LIBS"; then : - NZD_TOOLS="nzd" - NZDSRCS='${NZDSRCS}' - NZDTARGETS='${NZDTARGETS}' -fi - - - - -# -# was --with-libxml2 specified? -# - -# Check whether --with-libxml2 was given. -if test "${with_libxml2+set}" = set; then : - withval=$with_libxml2; -else - with_libxml2="auto" -fi - - -case $with_libxml2 in #( - no) : - ;; #( - auto) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.0" >&5 -$as_echo_n "checking for libxml-2.0 >= 2.6.0... " >&6; } - -if test -n "$LIBXML2_CFLAGS"; then - pkg_cv_LIBXML2_CFLAGS="$LIBXML2_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LIBXML2_LIBS"; then - pkg_cv_LIBXML2_LIBS="$LIBXML2_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.0" 2>&1` - else - LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBXML2_PKG_ERRORS" >&5 - - : -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - : -else - LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS - LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h - -fi ;; #( - yes) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.0" >&5 -$as_echo_n "checking for libxml-2.0 >= 2.6.0... " >&6; } - -if test -n "$LIBXML2_CFLAGS"; then - pkg_cv_LIBXML2_CFLAGS="$LIBXML2_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LIBXML2_LIBS"; then - pkg_cv_LIBXML2_LIBS="$LIBXML2_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.0" 2>&1` - else - LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBXML2_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libxml-2.0 >= 2.6.0) were not met: - -$LIBXML2_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables LIBXML2_CFLAGS -and LIBXML2_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "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. - -Alternatively, you may set the environment variables LIBXML2_CFLAGS -and LIBXML2_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS - LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h - -fi ;; #( - *) : - as_fn_error $? "Specifying libxml2 installation path is not supported, adjust PKG_CONFIG_PATH instead" "$LINENO" 5 ;; -esac - -# -# DEPRECATED -# - -# Check whether --with-libjson was given. -if test "${with_libjson+set}" = set; then : - withval=$with_libjson; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-libjson is DEPRECATED and will be removed in a future release, use --with-json-c instead" >&5 -$as_echo "$as_me: WARNING: --with-libjson is DEPRECATED and will be removed in a future release, use --with-json-c instead" >&2;} -else - with_libjson="detect" -fi - - -# -# was --with-json-c specified? -# - -# Check whether --with-json-c was given. -if test "${with_json_c+set}" = set; then : - withval=$with_json_c; -else - with_json_c="$with_libjson" -fi - - -case $with_json_c in #( - no) : - ;; #( - detect) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for json-c >= 0.11" >&5 -$as_echo_n "checking for json-c >= 0.11... " >&6; } - -if test -n "$JSON_C_CFLAGS"; then - pkg_cv_JSON_C_CFLAGS="$JSON_C_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c >= 0.11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c >= 0.11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_JSON_C_CFLAGS=`$PKG_CONFIG --cflags "json-c >= 0.11" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$JSON_C_LIBS"; then - pkg_cv_JSON_C_LIBS="$JSON_C_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c >= 0.11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c >= 0.11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_JSON_C_LIBS=`$PKG_CONFIG --libs "json-c >= 0.11" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - JSON_C_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json-c >= 0.11" 2>&1` - else - JSON_C_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json-c >= 0.11" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$JSON_C_PKG_ERRORS" >&5 - - : -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - : -else - JSON_C_CFLAGS=$pkg_cv_JSON_C_CFLAGS - JSON_C_LIBS=$pkg_cv_JSON_C_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_JSON_C 1" >>confdefs.h - -fi ;; #( - yes) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for json-c >= 0.11" >&5 -$as_echo_n "checking for json-c >= 0.11... " >&6; } - -if test -n "$JSON_C_CFLAGS"; then - pkg_cv_JSON_C_CFLAGS="$JSON_C_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c >= 0.11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c >= 0.11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_JSON_C_CFLAGS=`$PKG_CONFIG --cflags "json-c >= 0.11" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$JSON_C_LIBS"; then - pkg_cv_JSON_C_LIBS="$JSON_C_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c >= 0.11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c >= 0.11") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_JSON_C_LIBS=`$PKG_CONFIG --libs "json-c >= 0.11" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - JSON_C_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json-c >= 0.11" 2>&1` - else - JSON_C_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json-c >= 0.11" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$JSON_C_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (json-c >= 0.11) were not met: - -$JSON_C_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables JSON_C_CFLAGS -and JSON_C_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "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. - -Alternatively, you may set the environment variables JSON_C_CFLAGS -and JSON_C_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - JSON_C_CFLAGS=$pkg_cv_JSON_C_CFLAGS - JSON_C_LIBS=$pkg_cv_JSON_C_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_JSON_C 1" >>confdefs.h - -fi ;; #( - *) : - as_fn_error $? "Specifying json-c installation path is not supported, adjust PKG_CONFIG_PATH instead" "$LINENO" 5 - ;; -esac - - - - - -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; -else - with_zlib="auto" -fi - - -case $with_zlib in #( - no) : - ;; #( - auto) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 -$as_echo_n "checking for zlib... " >&6; } - -if test -n "$ZLIB_CFLAGS"; then - pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 - ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$ZLIB_LIBS"; then - pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 - ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1` - else - ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$ZLIB_PKG_ERRORS" >&5 - - : -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - : -else - ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS - ZLIB_LIBS=$pkg_cv_ZLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_ZLIB 1" >>confdefs.h - -fi ;; #( - yes) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 -$as_echo_n "checking for zlib... " >&6; } - -if test -n "$ZLIB_CFLAGS"; then - pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 - ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$ZLIB_LIBS"; then - pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 - ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1` - else - ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$ZLIB_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (zlib) were not met: - -$ZLIB_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables ZLIB_CFLAGS -and ZLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "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. - -Alternatively, you may set the environment variables ZLIB_CFLAGS -and ZLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS - ZLIB_LIBS=$pkg_cv_ZLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_ZLIB 1" >>confdefs.h - -fi ;; #( - *) : - as_fn_error $? "Specifying zlib installation path is not supported, adjust PKG_CONFIG_PATH instead" "$LINENO" 5 ;; -esac - - - -# -# In solaris 10, SMF can manage named service -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for smf_enable_instance in -lscf" >&5 -$as_echo_n "checking for smf_enable_instance in -lscf... " >&6; } -if ${ac_cv_lib_scf_smf_enable_instance+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lscf $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char smf_enable_instance (); -int -main () -{ -return smf_enable_instance (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_scf_smf_enable_instance=yes -else - ac_cv_lib_scf_smf_enable_instance=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_scf_smf_enable_instance" >&5 -$as_echo "$ac_cv_lib_scf_smf_enable_instance" >&6; } -if test "x$ac_cv_lib_scf_smf_enable_instance" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSCF 1 -_ACEOF - - LIBS="-lscf $LIBS" - -fi - - -# -# Additional compiler settings. -# -MKDEPCC="$CC" - -MKDEPCFLAGS="-M" -case $host in #( - *-solaris*) : - - if test "$GCC" != "yes"; then : - MKDEPCFLAGS="-xM" -fi ;; #( - *) : - ;; -esac - -if test "$GCC" = "yes"; then : - STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers" - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-strict-aliasing" >&5 -$as_echo_n "checking whether C compiler accepts -fno-strict-aliasing... " >&6; } -if ${ax_cv_check_cflags___fno_strict_aliasing+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -fno-strict-aliasing" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags___fno_strict_aliasing=yes -else - ax_cv_check_cflags___fno_strict_aliasing=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_strict_aliasing" >&5 -$as_echo "$ax_cv_check_cflags___fno_strict_aliasing" >&6; } -if test "x$ax_cv_check_cflags___fno_strict_aliasing" = xyes; then : - STD_CWARNINGS="$STD_CWARNINGS -fno-strict-aliasing" -else - : -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-delete-null-pointer-checks" >&5 -$as_echo_n "checking whether C compiler accepts -fno-delete-null-pointer-checks... " >&6; } -if ${ax_cv_check_cflags___fno_delete_null_pointer_checks+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags___fno_delete_null_pointer_checks=yes -else - ax_cv_check_cflags___fno_delete_null_pointer_checks=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_delete_null_pointer_checks" >&5 -$as_echo "$ax_cv_check_cflags___fno_delete_null_pointer_checks" >&6; } -if test "x$ax_cv_check_cflags___fno_delete_null_pointer_checks" = xyes; then : - STC_CWARNINGS="$STD_CWARNINGS -fno-delete-null-pointer-checks" -else - : -fi - -if test "$enable_warn_shadow" = "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wshadow" >&5 -$as_echo_n "checking whether C compiler accepts -Wshadow... " >&6; } -if ${ax_cv_check_cflags___Wshadow+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Wshadow" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags___Wshadow=yes -else - ax_cv_check_cflags___Wshadow=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wshadow" >&5 -$as_echo "$ax_cv_check_cflags___Wshadow" >&6; } -if test "x$ax_cv_check_cflags___Wshadow" = xyes; then : - STD_CWARNINGS="$STD_CWARNINGS -Wshadow" -else - : -fi - -fi -if test "$enable_warn_error" = "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror" >&5 -$as_echo_n "checking whether C compiler accepts -Werror... " >&6; } -if ${ax_cv_check_cflags___Werror+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_check_cflags___Werror=yes -else - ax_cv_check_cflags___Werror=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Werror" >&5 -$as_echo "$ax_cv_check_cflags___Werror" >&6; } -if test "x$ax_cv_check_cflags___Werror" = xyes; then : - STD_CWARNINGS="$STD_CWARNINGS -Werror" -else - : -fi - -fi - - - - - -# -# -lxnet buys us one big porting headache... standards, gotta love 'em. -# -# AC_CHECK_LIB(xnet, socket, , -# AC_CHECK_LIB(socket, socket) -# ) -# -# Use this for now, instead: -# -case "$host" in - *-linux*) - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if ${ac_cv_lib_socket_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_socket=yes -else - ac_cv_lib_socket_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_addr in -lnsl" >&5 -$as_echo_n "checking for inet_addr in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_inet_addr+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inet_addr (); -int -main () -{ -return inet_addr (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_inet_addr=yes -else - ac_cv_lib_nsl_inet_addr=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_addr" >&5 -$as_echo "$ac_cv_lib_nsl_inet_addr" >&6; } -if test "x$ac_cv_lib_nsl_inet_addr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -fi - - ;; -esac - -# -# Work around Solaris's select() limitations. -# -case "$host" in - *-solaris2.[89]|*-solaris2.1?) - -$as_echo "#define FD_SETSIZE 65536" >>confdefs.h - - ;; -esac - -# -# Purify support -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use purify" >&5 -$as_echo_n "checking whether to use purify... " >&6; } - -# Check whether --with-purify was given. -if test "${with_purify+set}" = set; then : - withval=$with_purify; use_purify="$withval" -else - use_purify="no" -fi - - -case "$use_purify" in - no) - ;; - yes) - # Extract the first word of "purify", so it can be a program name with args. -set dummy purify; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_purify_path+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $purify_path in - [\\/]* | ?:[\\/]*) - ac_cv_path_purify_path="$purify_path" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_purify_path="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_purify_path" && ac_cv_path_purify_path="purify" - ;; -esac -fi -purify_path=$ac_cv_path_purify_path -if test -n "$purify_path"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $purify_path" >&5 -$as_echo "$purify_path" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - ;; - *) - purify_path="$use_purify" - ;; -esac - -case "$use_purify" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PURIFY="" - ;; - *) - if test -f "$purify_path" || test purify = "$purify_path"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $purify_path" >&5 -$as_echo "$purify_path" >&6; } - PURIFYFLAGS="`echo $PURIFYOPTIONS`" - PURIFY="$purify_path $PURIFYFLAGS" - else - as_fn_error $? "$purify_path not found. - -Please choose the proper path with the following command: - - configure --with-purify=PATH -" "$LINENO" 5 - fi - ;; -esac - - - -# -# Google/Great Performance Tools CPU Profiler -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use gperftools profiler" >&5 -$as_echo_n "checking whether to use gperftools profiler... " >&6; } - -# Check whether --with-gperftools-profiler was given. -if test "${with_gperftools_profiler+set}" = set; then : - withval=$with_gperftools_profiler; use_profiler="$withval" -else - use_profiler="no" -fi - - -case $use_profiler in - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_GPERFTOOLS_PROFILER 1" >>confdefs.h - - LIBS="$LIBS -lprofiler" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -esac - -# -# Check if the system supports glibc-compatible backtrace() function. -# -for ac_header in execinfo.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_execinfo_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EXECINFO_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 -$as_echo_n "checking for library containing backtrace... " >&6; } -if ${ac_cv_search_backtrace+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char backtrace (); -int -main () -{ -return backtrace (); - ; - return 0; -} -_ACEOF -for ac_lib in '' execinfo; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_backtrace=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_backtrace+:} false; then : - break -fi -done -if ${ac_cv_search_backtrace+:} false; then : - -else - ac_cv_search_backtrace=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 -$as_echo "$ac_cv_search_backtrace" >&6; } -ac_res=$ac_cv_search_backtrace -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - for ac_func in backtrace backtrace_symbols -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi - -fi - -done - - -# AM_CONDITIONAL([HAVE_BACKTRACE], [test "$ac_cv_func_backtrace" = "yes"]) - -# -# File name extension for static archive files, for those few places -# where they are treated differently from dynamic ones. -# -O=lo -A=la -SA=a -LIBTOOL_MKDEP_SED='s;\.o;\.lo;' -LIBTOOL_MODE_COMPILE='--mode=compile' -LIBTOOL_MODE_INSTALL='--mode=install' -LIBTOOL_MODE_LINK='--mode=link' -LIBTOOL_MODE_UNINSTALL='--mode=uninstall' -INSTALL_LIBRARY='${INSTALL_PROGRAM}' - - - - - - - - - - - -BIND9_CO_RULE=".c.$O:" - - -# -# Here begins a very long section to determine the system's networking -# capabilities. The order of the tests is significant. -# - -# -# We do the IPv6 compilation checking after libtool so that we can put -# the right suffix on the files. -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5 -$as_echo_n "checking for IPv6 structures... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - #include - -int -main () -{ - - struct sockaddr_in6 sin6; - struct in6_addr in6; - struct in6_pktinfo in6_pi; - struct sockaddr_storage storage; - in6 = in6addr_any; - in6 = in6addr_loopback; - sin6.sin6_scope_id = 0; - return (0); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "IPv6 support is mandatory -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# Allow forcibly disabling TCP Fast Open support as autodetection might yield -# confusing results on some systems (e.g. FreeBSD; see set_tcp_fastopen() -# comment in lib/isc/unix/socket.c). -# - -# Check whether --enable-tcp_fastopen was given. -if test "${enable_tcp_fastopen+set}" = set; then : - enableval=$enable_tcp_fastopen; -else - enable_tcp_fastopen="yes" -fi - - -if test "$enable_tcp_fastopen" = "yes"; then : - -$as_echo "#define ENABLE_TCP_FASTOPEN 1" >>confdefs.h - -fi - -# -# Check for some other useful functions that are not ever-present. -# -for ac_func in strlcpy strlcat -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - -# Check whether --with-readline was given. -if test "${with_readline+set}" = set; then : - withval=$with_readline; use_readline="$withval" -else - use_readline="auto" -fi - -case "$use_readline" in -no) ;; -*) - saved_LIBS="$LIBS" - case "$use_readline" in - yes|auto) try_readline="-ledit"; or_readline="-lreadline" ;; - *) try_readline="$use_readline" - esac - for readline in "$try_readline" $or_readline - do - LIBS="$readline" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline" >&5 -$as_echo "$as_me: checking for readline with $readline" >&6;} - for ac_func in readline -do : - ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline" -if test "x$ac_cv_func_readline" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE 1 -_ACEOF - -fi -done - - if test "yes" = "$ac_cv_func_readline" - then - READLINE_LIB="$readline" - break - fi - for lib in -lterminfo -ltermcap -lncurses -lcurses - do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline $lib" >&5 -$as_echo "$as_me: checking for readline with $readline $lib" >&6;} - unset ac_cv_func_readline - LIBS="$readline $lib" - for ac_func in readline -do : - ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline" -if test "x$ac_cv_func_readline" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE 1 -_ACEOF - -fi -done - - if test "yes" = "$ac_cv_func_readline" - then - READLINE_LIB="$readline $lib" - break - fi - done - if test "yes" = "$ac_cv_func_readline" - then - break - fi - done - if test "auto" != "$use_readline" && - test "X$READLINE_LIB" = "X" - then - as_fn_error $? "The readline library was not found." "$LINENO" 5 - fi - LIBS="$saved_LIBS" - ;; -esac -if test "yes" = "$ac_cv_func_readline" -then - case "$READLINE_LIB" in - *edit*) - for ac_header in editline/readline.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_editline_readline_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EDITLINE_READLINE_H 1 -_ACEOF - -fi - -done - - for ac_header in edit/readline/readline.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "edit/readline/readline.h" "ac_cv_header_edit_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_edit_readline_readline_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EDIT_READLINE_READLINE_H 1 -_ACEOF - -fi - -done - - for ac_header in edit/readline/history.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "edit/readline/history.h" "ac_cv_header_edit_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_edit_readline_history_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EDIT_READLINE_HISTORY_H 1 -_ACEOF - -fi - -done - - ;; - esac - for ac_header in readline/readline.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE_READLINE_H 1 -_ACEOF - -fi - -done - - for ac_header in readline/history.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE_HISTORY_H 1 -_ACEOF - -fi - -done - -fi - -# -# Use our own SPNEGO implementation? -# -# Check whether --enable-isc-spnego was given. -if test "${enable_isc_spnego+set}" = set; then : - enableval=$enable_isc_spnego; -fi - - -if test -n "$USE_GSSAPI" -then - case "$enable_isc_spnego" in - yes|'') - USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO' - DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O" - DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using SPNEGO from lib/dns" >&5 -$as_echo "using SPNEGO from lib/dns" >&6; } - ;; - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using SPNEGO from GSSAPI library" >&5 -$as_echo "using SPNEGO from GSSAPI library" >&6; } - ;; - esac -fi - - - - - - -# -# Security Stuff -# -# Note it is very recommended to *not* disable chroot(), -# this is only because chroot() was made obsolete by Posix. -# Check whether --enable-chroot was given. -if test "${enable_chroot+set}" = set; then : - enableval=$enable_chroot; -fi - -case "$enable_chroot" in - yes|'') - for ac_func in chroot -do : - ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot" -if test "x$ac_cv_func_chroot" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CHROOT 1 -_ACEOF - -fi -done - - ;; - no) - ;; -esac - -LIBCAP_LIBS="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Linux capabilities" >&5 -$as_echo_n "checking whether to enable Linux capabilities... " >&6; } -# Check whether --enable-linux-caps was given. -if test "${enable_linux_caps+set}" = set; then : - enableval=$enable_linux_caps; -else - case $host in #( - *-linux*) : - enable_linux_caps=yes ;; #( - *) : - enable_linux_caps=no ;; -esac -fi - - -if test "$enable_linux_caps" = "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - for ac_header in sys/capability.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_capability_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_CAPABILITY_H 1 -_ACEOF - -else - as_fn_error $? "sys/capability.h header is required for Linux capabilities support. Either install libcap or use --disable-linux-caps." "$LINENO" 5 -fi - -done - - - - CCASFLAGS_cap_ax_save_flags=$CCASFLAGS - - - - CFLAGS_cap_ax_save_flags=$CFLAGS - - - - CPPFLAGS_cap_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_cap_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_cap_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_cap_ax_save_flags=$FCFLAGS - - - - FCLIBS_cap_ax_save_flags=$FCLIBS - - - - FFLAGS_cap_ax_save_flags=$FFLAGS - - - - FLIBS_cap_ax_save_flags=$FLIBS - - - - GCJFLAGS_cap_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_cap_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_cap_ax_save_flags=$LDFLAGS - - - - LIBS_cap_ax_save_flags=$LIBS - - - - OBJCFLAGS_cap_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_cap_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_cap_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_cap_ax_save_flags=$VALAFLAGS - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cap_set_proc" >&5 -$as_echo_n "checking for library containing cap_set_proc... " >&6; } -if ${ac_cv_search_cap_set_proc+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cap_set_proc (); -int -main () -{ -return cap_set_proc (); - ; - return 0; -} -_ACEOF -for ac_lib in '' cap; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_cap_set_proc=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_cap_set_proc+:} false; then : - break -fi -done -if ${ac_cv_search_cap_set_proc+:} false; then : - -else - ac_cv_search_cap_set_proc=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cap_set_proc" >&5 -$as_echo "$ac_cv_search_cap_set_proc" >&6; } -ac_res=$ac_cv_search_cap_set_proc -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - LIBCAP_LIBS="$ac_cv_search_cap_set_proc" -else - as_fn_error $? "libcap is required for Linux capabilities support. Either install libcap or use --disable-linux-caps." "$LINENO" 5 -fi - - - CCASFLAGS=$CCASFLAGS_cap_ax_save_flags - - - CFLAGS=$CFLAGS_cap_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_cap_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_cap_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_cap_ax_save_flags - - - FCFLAGS=$FCFLAGS_cap_ax_save_flags - - - FCLIBS=$FCLIBS_cap_ax_save_flags - - - FFLAGS=$FFLAGS_cap_ax_save_flags - - - FLIBS=$FLIBS_cap_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_cap_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_cap_ax_save_flags - - - LDFLAGS=$LDFLAGS_cap_ax_save_flags - - - LIBS=$LIBS_cap_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_cap_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_cap_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_cap_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_cap_ax_save_flags - - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -for ac_header in sys/un.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UN_H 1 -_ACEOF - ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1" - -else - ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH" - -fi - -done - - - -case "$host" in -*-solaris*) - -$as_echo "#define NEED_SECURE_DIRECTORY 1" >>confdefs.h - - ;; -esac - -# -# Time Zone Stuff -# -for ac_func in tzset -do : - ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" -if test "x$ac_cv_func_tzset" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TZSET 1 -_ACEOF - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optarg declaration" >&5 -$as_echo_n "checking for optarg declaration... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int -main () -{ -optarg = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -GEN_NEED_OPTARG="-DNEED_OPTARG=1" - -$as_echo "#define NEED_OPTARG 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# Check for nanoseconds in file stats -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_mtim.tv_nsec" >&5 -$as_echo_n "checking for st_mtim.tv_nsec... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct stat s; - return(s.st_mtim.tv_nsec); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_STAT_NSEC 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# Check for if_nametoindex() for IPv6 scoped addresses support -# -for ac_func in if_nametoindex -do : - ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" -if test "x$ac_cv_func_if_nametoindex" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_IF_NAMETOINDEX 1 -_ACEOF - -fi -done - - -for ac_func in nanosleep usleep explicit_bzero -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ISC_ATOMIC_LIBS="" -for ac_header in stdatomic.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default" -if test "x$ac_cv_header_stdatomic_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDATOMIC_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory model aware atomic operations" >&5 -$as_echo_n "checking for memory model aware atomic operations... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: stdatomic.h" >&5 -$as_echo "stdatomic.h" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -latomic is needed for 64-bit stdatomic.h functions" >&5 -$as_echo_n "checking whether -latomic is needed for 64-bit stdatomic.h functions... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - ISC_ATOMIC_LIBS="-latomic" - - - CCASFLAGS_atomic_ax_save_flags=$CCASFLAGS - - - - CFLAGS_atomic_ax_save_flags=$CFLAGS - - - - CPPFLAGS_atomic_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_atomic_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_atomic_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_atomic_ax_save_flags=$FCFLAGS - - - - FCLIBS_atomic_ax_save_flags=$FCLIBS - - - - FFLAGS_atomic_ax_save_flags=$FFLAGS - - - - FLIBS_atomic_ax_save_flags=$FLIBS - - - - GCJFLAGS_atomic_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_atomic_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_atomic_ax_save_flags=$LDFLAGS - - - - LIBS_atomic_ax_save_flags=$LIBS - - - - OBJCFLAGS_atomic_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_atomic_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_atomic_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_atomic_ax_save_flags=$VALAFLAGS - - - - LIBS="$LIBS $ISC_ATOMIC_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "libatomic needed, but linking with -latomic failed, please fix your toolchain. -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - CCASFLAGS=$CCASFLAGS_atomic_ax_save_flags - - - CFLAGS=$CFLAGS_atomic_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_atomic_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_atomic_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_atomic_ax_save_flags - - - FCFLAGS=$FCFLAGS_atomic_ax_save_flags - - - FCLIBS=$FCLIBS_atomic_ax_save_flags - - - FFLAGS=$FFLAGS_atomic_ax_save_flags - - - FLIBS=$FLIBS_atomic_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_atomic_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_atomic_ax_save_flags - - - LDFLAGS=$LDFLAGS_atomic_ax_save_flags - - - LIBS=$LIBS_atomic_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_atomic_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_atomic_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_atomic_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_atomic_ax_save_flags - - - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "stdatomic.h header found, but compilation failed, please fix your toolchain. -See \`config.log' for more details" "$LINENO" 5; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory model aware atomic operations" >&5 -$as_echo_n "checking for memory model aware atomic operations... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int32_t val = 0; __atomic_fetch_add(&val, 1, __ATOMIC_RELAXED); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: __atomic builtins" >&5 -$as_echo "__atomic builtins" >&6; } - -$as_echo "#define HAVE___ATOMIC 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -latomic is needed for 64-bit __atomic builtins" >&5 -$as_echo_n "checking whether -latomic is needed for 64-bit __atomic builtins... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int64_t val = 0; __atomic_fetch_add(&val, 1, __ATOMIC_RELAXED); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - ISC_ATOMIC_LIBS="-latomic" - - - CCASFLAGS_atomic_ax_save_flags=$CCASFLAGS - - - - CFLAGS_atomic_ax_save_flags=$CFLAGS - - - - CPPFLAGS_atomic_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_atomic_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_atomic_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_atomic_ax_save_flags=$FCFLAGS - - - - FCLIBS_atomic_ax_save_flags=$FCLIBS - - - - FFLAGS_atomic_ax_save_flags=$FFLAGS - - - - FLIBS_atomic_ax_save_flags=$FLIBS - - - - GCJFLAGS_atomic_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_atomic_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_atomic_ax_save_flags=$LDFLAGS - - - - LIBS_atomic_ax_save_flags=$LIBS - - - - OBJCFLAGS_atomic_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_atomic_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_atomic_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_atomic_ax_save_flags=$VALAFLAGS - - - - LIBS="$LIBS $ISC_ATOMIC_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int64_t val = 0; __atomic_fetch_add(&val, 1, __ATOMIC_RELAXED); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "libatomic needed, but linking with -latomic failed, please fix your toolchain. -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - CCASFLAGS=$CCASFLAGS_atomic_ax_save_flags - - - CFLAGS=$CFLAGS_atomic_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_atomic_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_atomic_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_atomic_ax_save_flags - - - FCFLAGS=$FCFLAGS_atomic_ax_save_flags - - - FCLIBS=$FCLIBS_atomic_ax_save_flags - - - FFLAGS=$FFLAGS_atomic_ax_save_flags - - - FLIBS=$FLIBS_atomic_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_atomic_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_atomic_ax_save_flags - - - LDFLAGS=$LDFLAGS_atomic_ax_save_flags - - - LIBS=$LIBS_atomic_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_atomic_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_atomic_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_atomic_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_atomic_ax_save_flags - - - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: __sync builtins" >&5 -$as_echo "__sync builtins" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -done - -LIBS="$LIBS $ISC_ATOMIC_LIBS" - -for ac_header in stdalign.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdalign.h" "ac_cv_header_stdalign_h" "$ac_includes_default" -if test "x$ac_cv_header_stdalign_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDALIGN_H 1 -_ACEOF - -fi - -done - - -for ac_header in uchar.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "uchar.h" "ac_cv_header_uchar_h" "$ac_includes_default" -if test "x$ac_cv_header_uchar_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UCHAR_H 1 -_ACEOF - -fi - -done - - -# -# Check for __builtin_unreachable -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for __builtin_unreachable()" >&5 -$as_echo_n "checking compiler support for __builtin_unreachable()... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -__builtin_unreachable(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_BUILTIN_UNREACHABLE 1" >>confdefs.h - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -# -# Check for __builtin_expect -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for __builtin_expect" >&5 -$as_echo_n "checking compiler support for __builtin_expect... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - return (__builtin_expect(1, 1) ? 1 : 0); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - have_builtin_expect=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - have_builtin_expect=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "yes" = "$have_builtin_expect"; then - -$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h - -fi - -# -# Check for __builtin_clz -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for __builtin_clz" >&5 -$as_echo_n "checking compiler support for __builtin_clz... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - return (__builtin_clz(0xff) == 24 ? 1 : 0); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - have_builtin_clz=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - have_builtin_clz=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "yes" = "$have_builtin_clz"; then - -$as_echo "#define HAVE_BUILTIN_CLZ 1" >>confdefs.h - -fi - -# -# Activate "rrset-order fixed" or not? -# -# Check whether --enable-fixed-rrset was given. -if test "${enable_fixed_rrset+set}" = set; then : - enableval=$enable_fixed_rrset; enable_fixed="$enableval" -else - enable_fixed="no" -fi - -case "$enable_fixed" in - yes) - -$as_echo "#define DNS_RDATASET_FIXED 1" >>confdefs.h - - ;; - no) - ;; - *) - ;; -esac - -# -# Activate dnstap? -# -# Check whether --enable-dnstap was given. -if test "${enable_dnstap+set}" = set; then : - enableval=$enable_dnstap; use_dnstap=$enableval -else - use_dnstap=no -fi - - -DNSTAP= -DNSTAPSRCS= -DNSTAPOBJS= -DNSTAPTARGETS= -if test "x$use_dnstap" != "xno"; then - -# Check whether --with-protobuf-c was given. -if test "${with_protobuf_c+set}" = set; then : - withval=$with_protobuf_c; - # workaround for protobuf-c includes at old dir - # before protobuf-c-1.0.0 - if test -f $withval/include/google/protobuf-c/protobuf-c.h - then - CFLAGS="$CFLAGS -I$withval/include/google" - else - CFLAGS="$CFLAGS -I$withval/include" - fi - LDFLAGS="$LDFLAGS -L$withval/lib" - # Extract the first word of "protoc-c", so it can be a program name with args. -set dummy protoc-c; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PROTOC_C+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PROTOC_C in - [\\/]* | ?:[\\/]*) - ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR$withval/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PROTOC_C=$ac_cv_path_PROTOC_C -if test -n "$PROTOC_C"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5 -$as_echo "$PROTOC_C" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -else - - # workaround for protobuf-c includes at old dir - # before protobuf-c-1.0.0 - if test -f /usr/include/google/protobuf-c/protobuf-c.h - then - CFLAGS="$CFLAGS -I/usr/include/google" - else - if test -f /usr/local/include/google/protobuf-c/protobuf-c.h - then - CFLAGS="$CFLAGS -I/usr/local/include/google" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - fi - fi - # Extract the first word of "protoc-c", so it can be a program name with args. -set dummy protoc-c; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PROTOC_C+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PROTOC_C in - [\\/]* | ?:[\\/]*) - ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PROTOC_C=$ac_cv_path_PROTOC_C -if test -n "$PROTOC_C"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5 -$as_echo "$PROTOC_C" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -fi - - if test -z "$PROTOC_C"; then - as_fn_error $? "The protoc-c program was not found." "$LINENO" 5 - fi - -# Check whether --with-libfstrm was given. -if test "${with_libfstrm+set}" = set; then : - withval=$with_libfstrm; - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - # Extract the first word of "fstrm_capture", so it can be a program name with args. -set dummy fstrm_capture; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_FSTRM_CAPTURE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $FSTRM_CAPTURE in - [\\/]* | ?:[\\/]*) - ac_cv_path_FSTRM_CAPTURE="$FSTRM_CAPTURE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR$withval/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_FSTRM_CAPTURE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -FSTRM_CAPTURE=$ac_cv_path_FSTRM_CAPTURE -if test -n "$FSTRM_CAPTURE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FSTRM_CAPTURE" >&5 -$as_echo "$FSTRM_CAPTURE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -else - - # Extract the first word of "fstrm_capture", so it can be a program name with args. -set dummy fstrm_capture; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_FSTRM_CAPTURE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $FSTRM_CAPTURE in - [\\/]* | ?:[\\/]*) - ac_cv_path_FSTRM_CAPTURE="$FSTRM_CAPTURE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_FSTRM_CAPTURE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -FSTRM_CAPTURE=$ac_cv_path_FSTRM_CAPTURE -if test -n "$FSTRM_CAPTURE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FSTRM_CAPTURE" >&5 -$as_echo "$FSTRM_CAPTURE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5 -$as_echo_n "checking for library containing fstrm_iothr_init... " >&6; } -if ${ac_cv_search_fstrm_iothr_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fstrm_iothr_init (); -int -main () -{ -return fstrm_iothr_init (); - ; - return 0; -} -_ACEOF -for ac_lib in '' fstrm; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_fstrm_iothr_init=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_fstrm_iothr_init+:} false; then : - break -fi -done -if ${ac_cv_search_fstrm_iothr_init+:} false; then : - -else - ac_cv_search_fstrm_iothr_init=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5 -$as_echo "$ac_cv_search_fstrm_iothr_init" >&6; } -ac_res=$ac_cv_search_fstrm_iothr_init -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5 -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5 -$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; } -if ${ac_cv_search_protobuf_c_message_pack+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char protobuf_c_message_pack (); -int -main () -{ -return protobuf_c_message_pack (); - ; - return 0; -} -_ACEOF -for ac_lib in '' protobuf-c; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_protobuf_c_message_pack=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_protobuf_c_message_pack+:} false; then : - break -fi -done -if ${ac_cv_search_protobuf_c_message_pack+:} false; then : - -else - ac_cv_search_protobuf_c_message_pack=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5 -$as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; } -ac_res=$ac_cv_search_protobuf_c_message_pack -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5 -fi - - - -$as_echo "#define HAVE_DNSTAP 1" >>confdefs.h - - DNSTAP=dnstap - DNSTAPSRCS='${DNSTAPSRCS}' - DNSTAPOBJS='${DNSTAPOBJS}' - DNSTAPTARGETS='${DNSTAPTARGETS}' -fi - - - - - -# -# The following sets up how non-blocking i/o is established. -# cygwin and solaris 2.x (x<5) require special handling. -# -case "$host" in -*-cygwin*) $as_echo "#define PORT_NONBLOCK O_NDELAY" >>confdefs.h -;; -*-solaris2.[01234]) - $as_echo "#define PORT_NONBLOCK O_NONBLOCK" >>confdefs.h - - -$as_echo "#define USE_FIONBIO_IOCTL 1" >>confdefs.h - - ;; -*) -$as_echo "#define PORT_NONBLOCK O_NONBLOCK" >>confdefs.h - - ;; -esac -# -# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. -# This prevents the source address being set. -# -case "$host" in -*-solaris2.[012345]|*-solaris2.5.1) - -$as_echo "#define BROKEN_TCP_BIND_BEFORE_CONNECT 1" >>confdefs.h - - ;; -esac -# -# The following sections deal with tools used for formatting -# the documentation. They are all optional, unless you are -# a developer editing the documentation source. -# - -# -# Look for TeX. -# - -for ac_prog in latex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $LATEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LATEX=$ac_cv_path_LATEX -if test -n "$LATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5 -$as_echo "$LATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LATEX" && break -done -test -n "$LATEX" || LATEX="latex" - - - -for ac_prog in pdflatex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PDFLATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PDFLATEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_PDFLATEX="$PDFLATEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PDFLATEX=$ac_cv_path_PDFLATEX -if test -n "$PDFLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 -$as_echo "$PDFLATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PDFLATEX" && break -done -test -n "$PDFLATEX" || PDFLATEX="pdflatex" - - - -for ac_prog in dblatex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DBLATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $DBLATEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_DBLATEX="$DBLATEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_DBLATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -DBLATEX=$ac_cv_path_DBLATEX -if test -n "$DBLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBLATEX" >&5 -$as_echo "$DBLATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DBLATEX" && break -done -test -n "$DBLATEX" || DBLATEX="dblatex" - - - -# -# Look for w3m -# - -for ac_prog in w3m -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_W3M+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $W3M in - [\\/]* | ?:[\\/]*) - ac_cv_path_W3M="$W3M" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_W3M="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -W3M=$ac_cv_path_W3M -if test -n "$W3M"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $W3M" >&5 -$as_echo "$W3M" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$W3M" && break -done -test -n "$W3M" || W3M="w3m" - - - -# -# Look for pandoc -# -# Extract the first word of "pandoc", so it can be a program name with args. -set dummy pandoc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PANDOC+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PANDOC in - [\\/]* | ?:[\\/]*) - ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PANDOC" && ac_cv_path_PANDOC="pandoc" - ;; -esac -fi -PANDOC=$ac_cv_path_PANDOC -if test -n "$PANDOC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 -$as_echo "$PANDOC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -# -# Look for xsltproc (libxslt) -# - -# Extract the first word of "xsltproc", so it can be a program name with args. -set dummy xsltproc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XSLTPROC+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $XSLTPROC in - [\\/]* | ?:[\\/]*) - ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="xsltproc" - ;; -esac -fi -XSLTPROC=$ac_cv_path_XSLTPROC -if test -n "$XSLTPROC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 -$as_echo "$XSLTPROC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# Look for xmllint (libxml2) -# - -# Extract the first word of "xmllint", so it can be a program name with args. -set dummy xmllint; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XMLLINT+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $XMLLINT in - [\\/]* | ?:[\\/]*) - ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT="xmllint" - ;; -esac -fi -XMLLINT=$ac_cv_path_XMLLINT -if test -n "$XMLLINT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 -$as_echo "$XMLLINT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# Look for Doxygen -# - -# Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DOXYGEN+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $DOXYGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="doxygen" - ;; -esac -fi -DOXYGEN=$ac_cv_path_DOXYGEN -if test -n "$DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 -$as_echo "$DOXYGEN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# Look for curl -# - -# Extract the first word of "curl", so it can be a program name with args. -set dummy curl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CURL+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CURL in - [\\/]* | ?:[\\/]*) - ac_cv_path_CURL="$CURL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="curl" - ;; -esac -fi -CURL=$ac_cv_path_CURL -if test -n "$CURL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5 -$as_echo "$CURL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# -# Subroutine for searching for an ordinary file (e.g., a stylesheet) -# in a number of directories: -# -# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES) -# -# If the file FILENAME is found in one of the DIRECTORIES, the shell -# variable VARIABLE is defined to its absolute pathname. Otherwise, -# it is set to FILENAME, with no directory prefix (that's not terribly -# useful, but looks less confusing in substitutions than leaving it -# empty). The variable VARIABLE will be substituted into output files. -# - - - -# -# Look for Docbook-XSL stylesheets. Location probably varies by system. -# If it's not explicitly specified, guess where it might be found, based on -# where SGML stuff lives on some systems (FreeBSD is the only one we're sure -# of at the moment). -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Docbook-XSL path" >&5 -$as_echo_n "checking for Docbook-XSL path... " >&6; } - -# Check whether --with-docbook-xsl was given. -if test "${with_docbook_xsl+set}" = set; then : - withval=$with_docbook_xsl; docbook_path="$withval" -else - docbook_path="auto" -fi - -case "$docbook_path" in -auto) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5 -$as_echo "auto" >&6; } - docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook-ns /usr/local/share/xsl/docbook /usr/share/xsl/docbook /usr/share/sgml/docbook/xsl-stylesheets /opt/local/share/xsl/docbook-xsl /opt/local/share/xsl/docbook-xsl-nons /usr/share/xml/docbook/stylesheet/docbook-xsl" - ;; -*) - docbook_xsl_trees="$withval" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docbook_xsl_trees" >&5 -$as_echo "$docbook_xsl_trees" >&6; } - ;; -esac - -# -# Look for stylesheets we need. -# - - -XSLT_DOCBOOK_STYLE_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/docbook.xsl" >&5 -$as_echo_n "checking for html/docbook.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/docbook.xsl - if test -f $f - then - XSLT_DOCBOOK_STYLE_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_STYLE_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_STYLE_HTML=html/docbook.xsl -fi - - - -XSLT_DOCBOOK_STYLE_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/docbook.xsl" >&5 -$as_echo_n "checking for xhtml/docbook.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/docbook.xsl - if test -f $f - then - XSLT_DOCBOOK_STYLE_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_STYLE_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_STYLE_XHTML=xhtml/docbook.xsl -fi - - - -XSLT_DOCBOOK_STYLE_MAN="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for manpages/docbook.xsl" >&5 -$as_echo_n "checking for manpages/docbook.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/manpages/docbook.xsl - if test -f $f - then - XSLT_DOCBOOK_STYLE_MAN=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_STYLE_MAN" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_STYLE_MAN=manpages/docbook.xsl -fi - - - -XSLT_DOCBOOK_CHUNK_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/chunk.xsl" >&5 -$as_echo_n "checking for html/chunk.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/chunk.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNK_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNK_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNK_HTML=html/chunk.xsl -fi - - - -XSLT_DOCBOOK_CHUNK_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/chunk.xsl" >&5 -$as_echo_n "checking for xhtml/chunk.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/chunk.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNK_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNK_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNK_XHTML=xhtml/chunk.xsl -fi - - - -XSLT_DOCBOOK_CHUNKTOC_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/chunktoc.xsl" >&5 -$as_echo_n "checking for html/chunktoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/chunktoc.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNKTOC_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNKTOC_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNKTOC_HTML=html/chunktoc.xsl -fi - - - -XSLT_DOCBOOK_CHUNKTOC_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/chunktoc.xsl" >&5 -$as_echo_n "checking for xhtml/chunktoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/chunktoc.xsl - if test -f $f - then - XSLT_DOCBOOK_CHUNKTOC_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_CHUNKTOC_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_CHUNKTOC_XHTML=xhtml/chunktoc.xsl -fi - - - -XSLT_DOCBOOK_MAKETOC_HTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for html/maketoc.xsl" >&5 -$as_echo_n "checking for html/maketoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/html/maketoc.xsl - if test -f $f - then - XSLT_DOCBOOK_MAKETOC_HTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_MAKETOC_HTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_MAKETOC_HTML=html/maketoc.xsl -fi - - - -XSLT_DOCBOOK_MAKETOC_XHTML="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xhtml/maketoc.xsl" >&5 -$as_echo_n "checking for xhtml/maketoc.xsl... " >&6; } -for d in $docbook_xsl_trees -do - f=$d/xhtml/maketoc.xsl - if test -f $f - then - XSLT_DOCBOOK_MAKETOC_XHTML=$f - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $f" >&5 -$as_echo "$f" >&6; } - break - fi -done -if test "X$XSLT_DOCBOOK_MAKETOC_XHTML" = "X" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not found\"" >&5 -$as_echo "\"not found\"" >&6; }; - XSLT_DOCBOOK_MAKETOC_XHTML=xhtml/maketoc.xsl -fi - - - -# -# IDN support using libidn2 -# - -LIBIDN2_CFLAGS= -LIBIDN2_LDFLAGS= -LIBIDN2_LIBS= - -# Check whether --with-libidn2 was given. -if test "${with_libidn2+set}" = set; then : - withval=$with_libidn2; with_libidn2="$withval" -else - with_libidn2="no" -fi - -case $with_libidn2 in #( - yes) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn2" >&5 -$as_echo_n "checking for libidn2... " >&6; } - -if test -n "$LIBIDN2_CFLAGS"; then - pkg_cv_LIBIDN2_CFLAGS="$LIBIDN2_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn2\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libidn2") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBIDN2_CFLAGS=`$PKG_CONFIG --cflags "libidn2" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LIBIDN2_LIBS"; then - pkg_cv_LIBIDN2_LIBS="$LIBIDN2_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn2\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libidn2") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBIDN2_LIBS=`$PKG_CONFIG --libs "libidn2" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBIDN2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libidn2" 2>&1` - else - LIBIDN2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libidn2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBIDN2_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libidn2) were not met: - -$LIBIDN2_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables LIBIDN2_CFLAGS -and LIBIDN2_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "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. - -Alternatively, you may set the environment variables LIBIDN2_CFLAGS -and LIBIDN2_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - LIBIDN2_CFLAGS=$pkg_cv_LIBIDN2_CFLAGS - LIBIDN2_LIBS=$pkg_cv_LIBIDN2_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_LIBIDN2 1" >>confdefs.h - -fi ;; #( - no) : - ;; #( - *) : - - - CCASFLAGS_libidn2_ax_save_flags=$CCASFLAGS - - - - CFLAGS_libidn2_ax_save_flags=$CFLAGS - - - - CPPFLAGS_libidn2_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_libidn2_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_libidn2_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_libidn2_ax_save_flags=$FCFLAGS - - - - FCLIBS_libidn2_ax_save_flags=$FCLIBS - - - - FFLAGS_libidn2_ax_save_flags=$FFLAGS - - - - FLIBS_libidn2_ax_save_flags=$FLIBS - - - - GCJFLAGS_libidn2_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_libidn2_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_libidn2_ax_save_flags=$LDFLAGS - - - - LIBS_libidn2_ax_save_flags=$LIBS - - - - OBJCFLAGS_libidn2_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_libidn2_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_libidn2_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_libidn2_ax_save_flags=$VALAFLAGS - - - - LIBIDN2_CFLAGS="-I$with_libidn2/include" - LIBIDN2_LDFLAGS="-L$with_libidn2/lib" - CFLAGS="$LIBIDN2_CFLAGS $CFLAGS" - CPPFLAGS="$LIBIDN2_CFLAGS $CPPFLAGS" - LDFLAGS="$LIBIDN2_LDFLAGS $LDFLAGS" - for ac_header in idn2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "idn2.h" "ac_cv_header_idn2_h" "$ac_includes_default" -if test "x$ac_cv_header_idn2_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_IDN2_H 1 -_ACEOF - -else - as_fn_error $? "idn2.h not found" "$LINENO" 5 -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing idn2_to_ascii_lz" >&5 -$as_echo_n "checking for library containing idn2_to_ascii_lz... " >&6; } -if ${ac_cv_search_idn2_to_ascii_lz+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char idn2_to_ascii_lz (); -int -main () -{ -return idn2_to_ascii_lz (); - ; - return 0; -} -_ACEOF -for ac_lib in '' idn2; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_idn2_to_ascii_lz=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_idn2_to_ascii_lz+:} false; then : - break -fi -done -if ${ac_cv_search_idn2_to_ascii_lz+:} false; then : - -else - ac_cv_search_idn2_to_ascii_lz=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_idn2_to_ascii_lz" >&5 -$as_echo "$ac_cv_search_idn2_to_ascii_lz" >&6; } -ac_res=$ac_cv_search_idn2_to_ascii_lz -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - LIBIDN2_LIBS="$ac_cv_search_idn2_to_ascii_lz" - -$as_echo "#define HAVE_LIBIDN2 1" >>confdefs.h - -else - as_fn_error $? "libidn2 requested, but not found" "$LINENO" 5 -fi - - - CCASFLAGS=$CCASFLAGS_libidn2_ax_save_flags - - - CFLAGS=$CFLAGS_libidn2_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_libidn2_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_libidn2_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_libidn2_ax_save_flags - - - FCFLAGS=$FCFLAGS_libidn2_ax_save_flags - - - FCLIBS=$FCLIBS_libidn2_ax_save_flags - - - FFLAGS=$FFLAGS_libidn2_ax_save_flags - - - FLIBS=$FLIBS_libidn2_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_libidn2_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_libidn2_ax_save_flags - - - LDFLAGS=$LDFLAGS_libidn2_ax_save_flags - - - LIBS=$LIBS_libidn2_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_libidn2_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_libidn2_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_libidn2_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_libidn2_ax_save_flags - - - ;; #( - *) : - ;; -esac - - - - -# -# Check whether to build with cmocka unit testing framework -# - - -# Check whether --with-cmocka was given. -if test "${with_cmocka+set}" = set; then : - withval=$with_cmocka; -else - with_cmocka=detect -fi - - -case $with_cmocka in #( - no) : - ;; #( - detect) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmocka >= 1.0.0" >&5 -$as_echo_n "checking for cmocka >= 1.0.0... " >&6; } - -if test -n "$CMOCKA_CFLAGS"; then - pkg_cv_CMOCKA_CFLAGS="$CMOCKA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cmocka >= 1.0.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cmocka >= 1.0.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CMOCKA_CFLAGS=`$PKG_CONFIG --cflags "cmocka >= 1.0.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CMOCKA_LIBS"; then - pkg_cv_CMOCKA_LIBS="$CMOCKA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cmocka >= 1.0.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cmocka >= 1.0.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CMOCKA_LIBS=`$PKG_CONFIG --libs "cmocka >= 1.0.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CMOCKA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cmocka >= 1.0.0" 2>&1` - else - CMOCKA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cmocka >= 1.0.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CMOCKA_PKG_ERRORS" >&5 - - with_cmocka=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - with_cmocka=no -else - CMOCKA_CFLAGS=$pkg_cv_CMOCKA_CFLAGS - CMOCKA_LIBS=$pkg_cv_CMOCKA_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_CMOCKA 1" >>confdefs.h - - UNITTESTS=tests -fi ;; #( - yes) : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmocka >= 1.0.0" >&5 -$as_echo_n "checking for cmocka >= 1.0.0... " >&6; } - -if test -n "$CMOCKA_CFLAGS"; then - pkg_cv_CMOCKA_CFLAGS="$CMOCKA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cmocka >= 1.0.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cmocka >= 1.0.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CMOCKA_CFLAGS=`$PKG_CONFIG --cflags "cmocka >= 1.0.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CMOCKA_LIBS"; then - pkg_cv_CMOCKA_LIBS="$CMOCKA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cmocka >= 1.0.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cmocka >= 1.0.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CMOCKA_LIBS=`$PKG_CONFIG --libs "cmocka >= 1.0.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CMOCKA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cmocka >= 1.0.0" 2>&1` - else - CMOCKA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cmocka >= 1.0.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CMOCKA_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (cmocka >= 1.0.0) were not met: - -$CMOCKA_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables CMOCKA_CFLAGS -and CMOCKA_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "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. - -Alternatively, you may set the environment variables CMOCKA_CFLAGS -and CMOCKA_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - CMOCKA_CFLAGS=$pkg_cv_CMOCKA_CFLAGS - CMOCKA_LIBS=$pkg_cv_CMOCKA_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_CMOCKA 1" >>confdefs.h - -fi - UNITTESTS=tests ;; #( - *) : - as_fn_error $? "Use PKG_CONFIG_PATH to specify path to CMocka library" "$LINENO" 5 - ;; -esac - - - - -# -# Check for kyua execution engine if CMocka was requested -# and bail out if execution engine was not found -# - -if test "$with_cmocka" != "no"; then : - for ac_prog in kyua -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_KYUA+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $KYUA in - [\\/]* | ?:[\\/]*) - ac_cv_path_KYUA="$KYUA" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_KYUA="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -KYUA=$ac_cv_path_KYUA -if test -n "$KYUA"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KYUA" >&5 -$as_echo "$KYUA" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$KYUA" && break -done - - if test -z "$KYUA"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: kyua test execution engine not found" >&5 -$as_echo "$as_me: WARNING: kyua test execution engine not found" >&2;} -fi -fi - - - -# -# Check for -Wl,--wrap= support -# - -LD_WRAP_TESTS=false -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker support for --wrap option" >&5 -$as_echo_n "checking for linker support for --wrap option... " >&6; } - - - CCASFLAGS_wrap_ax_save_flags=$CCASFLAGS - - - - CFLAGS_wrap_ax_save_flags=$CFLAGS - - - - CPPFLAGS_wrap_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_wrap_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_wrap_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_wrap_ax_save_flags=$FCFLAGS - - - - FCLIBS_wrap_ax_save_flags=$FCLIBS - - - - FFLAGS_wrap_ax_save_flags=$FFLAGS - - - - FLIBS_wrap_ax_save_flags=$FLIBS - - - - GCJFLAGS_wrap_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_wrap_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_wrap_ax_save_flags=$LDFLAGS - - - - LIBS_wrap_ax_save_flags=$LIBS - - - - OBJCFLAGS_wrap_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_wrap_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_wrap_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_wrap_ax_save_flags=$VALAFLAGS - - - -LDFLAGS="-Wl,-wrap,exit" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - void __real_exit (int status); - void __wrap_exit (int status) { __real_exit (status); } - -int -main () -{ -exit (1); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - LD_WRAP_TESTS=true - -$as_echo "#define LD_WRAP 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - CCASFLAGS=$CCASFLAGS_wrap_ax_save_flags - - - CFLAGS=$CFLAGS_wrap_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_wrap_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_wrap_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_wrap_ax_save_flags - - - FCFLAGS=$FCFLAGS_wrap_ax_save_flags - - - FCLIBS=$FCLIBS_wrap_ax_save_flags - - - FFLAGS=$FFLAGS_wrap_ax_save_flags - - - FLIBS=$FLIBS_wrap_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_wrap_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_wrap_ax_save_flags - - - LDFLAGS=$LDFLAGS_wrap_ax_save_flags - - - LIBS=$LIBS_wrap_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_wrap_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_wrap_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_wrap_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_wrap_ax_save_flags - - - - - - -WRAP_INTERPOSE= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker support for '-z interpose' option" >&5 -$as_echo_n "checking for linker support for '-z interpose' option... " >&6; } - - - CCASFLAGS_interpose_ax_save_flags=$CCASFLAGS - - - - CFLAGS_interpose_ax_save_flags=$CFLAGS - - - - CPPFLAGS_interpose_ax_save_flags=$CPPFLAGS - - - - CXXFLAGS_interpose_ax_save_flags=$CXXFLAGS - - - - ERLCFLAGS_interpose_ax_save_flags=$ERLCFLAGS - - - - FCFLAGS_interpose_ax_save_flags=$FCFLAGS - - - - FCLIBS_interpose_ax_save_flags=$FCLIBS - - - - FFLAGS_interpose_ax_save_flags=$FFLAGS - - - - FLIBS_interpose_ax_save_flags=$FLIBS - - - - GCJFLAGS_interpose_ax_save_flags=$GCJFLAGS - - - - JAVACFLAGS_interpose_ax_save_flags=$JAVACFLAGS - - - - LDFLAGS_interpose_ax_save_flags=$LDFLAGS - - - - LIBS_interpose_ax_save_flags=$LIBS - - - - OBJCFLAGS_interpose_ax_save_flags=$OBJCFLAGS - - - - OBJCXXFLAGS_interpose_ax_save_flags=$OBJCXXFLAGS - - - - UPCFLAGS_interpose_ax_save_flags=$UPCFLAGS - - - - VALAFLAGS_interpose_ax_save_flags=$VALAFLAGS - - - -LDFLAGS="-Wl,-z,interpose" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - WRAP_INTERPOSE="-Wl,-z,interpose" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - CCASFLAGS=$CCASFLAGS_interpose_ax_save_flags - - - CFLAGS=$CFLAGS_interpose_ax_save_flags - - - CPPFLAGS=$CPPFLAGS_interpose_ax_save_flags - - - CXXFLAGS=$CXXFLAGS_interpose_ax_save_flags - - - ERLCFLAGS=$ERLCFLAGS_interpose_ax_save_flags - - - FCFLAGS=$FCFLAGS_interpose_ax_save_flags - - - FCLIBS=$FCLIBS_interpose_ax_save_flags - - - FFLAGS=$FFLAGS_interpose_ax_save_flags - - - FLIBS=$FLIBS_interpose_ax_save_flags - - - GCJFLAGS=$GCJFLAGS_interpose_ax_save_flags - - - JAVACFLAGS=$JAVACFLAGS_interpose_ax_save_flags - - - LDFLAGS=$LDFLAGS_interpose_ax_save_flags - - - LIBS=$LIBS_interpose_ax_save_flags - - - OBJCFLAGS=$OBJCFLAGS_interpose_ax_save_flags - - - OBJCXXFLAGS=$OBJCXXFLAGS_interpose_ax_save_flags - - - UPCFLAGS=$UPCFLAGS_interpose_ax_save_flags - - - VALAFLAGS=$VALAFLAGS_interpose_ax_save_flags - - - - - - -WRAP_NAME='' -case $host in #( - *-darwin*) : - WRAP_NAME='${WRAP_NAME}' ;; #( - *) : - ;; -esac - - -# -# Check for i18n -# -for ac_header in locale.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALE_H 1 -_ACEOF - -fi - -done - -for ac_func in setlocale -do : - ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SETLOCALE 1 -_ACEOF - -fi -done - - -# -# was --with-tuning specified? -# - -# Check whether --with-tuning was given. -if test "${with_tuning+set}" = set; then : - withval=$with_tuning; -else - with_tuning=no -fi - - -case $with_tuning in #( - small) : - { $as_echo "$as_me:${as_lineno-$LINENO}: using small system tuning" >&5 -$as_echo "$as_me: using small system tuning" >&6;} ;; #( - *) : - -$as_echo "#define TUNE_LARGE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: using default system tuning" >&5 -$as_echo "$as_me: using default system tuning" >&6;} ;; -esac - -# -# was --enable-querytrace specified? -# -# Check whether --enable-querytrace was given. -if test "${enable_querytrace+set}" = set; then : - enableval=$enable_querytrace; want_querytrace="$enableval" -else - want_querytrace="no" -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable query trace logging" >&5 -$as_echo_n "checking whether to enable query trace logging... " >&6; } -case "$want_querytrace" in -yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define WANT_QUERYTRACE 1" >>confdefs.h - - ;; -no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; -*) - as_fn_error $? "\"--enable-querytrace requires yes or no\"" "$LINENO" 5 - ;; -esac - -# -# Was --disable-auto-validation specified? -# -validation_default=auto -# Check whether --enable-auto-validation was given. -if test "${enable_auto_validation+set}" = set; then : - enableval=$enable_auto_validation; : -else - enable_auto_validation=yes -fi - -if test "$enable_auto_validation" = "no"; then : - validation_default=yes -fi - -cat >>confdefs.h <<_ACEOF -#define VALIDATION_DEFAULT "$validation_default" -_ACEOF - - -# -# Substitutions -# - -BIND9_TOP_BUILDDIR=`pwd` - - - - - - - - -if test "X$srcdir" != "X"; then - BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include" - BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include" - BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include" - BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include" - BIND9_NS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/ns/include" - BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include" - BIND9_IRS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/irs/include" -else - BIND9_ISC_BUILDINCLUDE="" - BIND9_ISCCC_BUILDINCLUDE="" - BIND9_ISCCFG_BUILDINCLUDE="" - BIND9_DNS_BUILDINCLUDE="" - BIND9_NS_BUILDINCLUDE="" - BIND9_BIND9_BUILDINCLUDE="" - BIND9_IRS_BUILDINCLUDE="" -fi - - -BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes - - -BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules - -. "$srcdir/version" -BIND9_PRODUCT="PRODUCT=\"${PRODUCT}\"" - -BIND9_DESCRIPTION="DESCRIPTION=\"${DESCRIPTION}\"" - -BIND9_VERSION="${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}" - -BIND9_MAJOR="MAJOR=${MAJORVER}.${MINORVER}" - -BIND9_VERSIONSTRING="${PRODUCT} ${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}${DESCRIPTION:+ }${DESCRIPTION}" - -BIND9_VERSIONSHORT="${PRODUCT} ${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}" - - -BIND9_SRCID="SRCID=unset_id" -if test -f "${srcdir}/srcid"; then - . "${srcdir}/srcid" - BIND9_SRCID="SRCID=$SRCID" -elif test -d "${srcdir}/.git"; then - BIND9_SRCID="SRCID="`(cd "${srcdir}";git rev-parse --short HEAD)` -fi - - - -if test -z "$ac_configure_args"; then - BIND9_CONFIGARGS="defaults" -else - for a in $ac_configure_args - do - BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a" - done -fi -BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`" -BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}" - - - -LIBISC_API="$srcdir/lib/isc/api" - - -LIBISCCC_API="$srcdir/lib/isccc/api" - - -LIBISCCFG_API="$srcdir/lib/isccfg/api" - - -LIBDNS_API="$srcdir/lib/dns/api" - - -LIBDNS_MAPAPI="$srcdir/lib/dns/mapapi" - - -LIBBIND9_API="$srcdir/lib/bind9/api" - - -LIBIRS_API="$srcdir/lib/irs/api" - - -LIBNS_API="$srcdir/lib/ns/api" - -# -# Configure any DLZ drivers. -# -# If config.dlz.in selects one or more DLZ drivers, it will set -# CONTRIB_DLZ to a non-empty value, which will be our clue to -# build DLZ drivers in contrib. -# -# This section has to come after the libtool stuff because it needs to -# know how to name the driver object files. -# - -CONTRIB_DLZ="" -DLZ_DRIVER_INCLUDES="" -DLZ_DRIVER_LIBS="" -DLZ_DRIVER_SRCS="" -DLZ_DRIVER_OBJS="" -DLZ_SYSTEM_TEST="" -DLZ_DRIVER_MYSQL_INCLUDES="" -DLZ_DRIVER_MYSQL_LIBS="" - -# -# Configure support for building a shared library object -# -# Even when libtool is available it can't always be relied upon -# to build an object that can be dlopen()'ed, but this is necessary -# for building the dlzexternal system test, so we'll try it the -# old-fashioned way. -# -SO="so" -SO_CFLAGS="" -SO_LDFLAGS="" -SO_LD="" -SO_TARGETS="" -SO_STRIP="cat" - - -# Check whether --with-dlopen was given. -if test "${with_dlopen+set}" = set; then : - withval=$with_dlopen; -else - with_dlopen="auto" -fi - - - -# -# If PIC is disabled, dlopen must also be -# -if test "$pic_mode" = "no"; then : - case $with_dlopen in #( - auto) : - with_dlopen="no" ;; #( - yes) : - as_fn_error $? "--with-dlopen requires PIC" "$LINENO" 5 ;; #( - *) : - ;; -esac -fi - -case $with_dlopen in #( - auto|yes) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -$as_echo_n "checking for library containing dlopen... " >&6; } -if ${ac_cv_search_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_dlopen=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_dlopen+:} false; then : - break -fi -done -if ${ac_cv_search_dlopen+:} false; then : - -else - ac_cv_search_dlopen=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -$as_echo "$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - for ac_func in dlopen dlclose dlsym -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - with_dlopen="yes" -else - with_dlopen="no" -fi -done - - ;; #( - *) : - ;; -esac - -if test "$with_dlopen" = "yes"; then : - case $host in #( - *-linux*|*-gnu*) : - - LDFLAGS="${LDFLAGS} -Wl,--export-dynamic" - SO_CFLAGS="-fPIC" - SO_LDFLAGS="" - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - ;; #( - *-freebsd*|*-openbsd*|*-netbsd*) : - - LDFLAGS="${LDFLAGS} -Wl,-E" - SO_CFLAGS="-fpic" - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - ;; #( - *-darwin*) : - - SO_CFLAGS="-fPIC" - SO_LD="${CC}" - SO_LDFLAGS="-Xcompiler -dynamiclib -undefined dynamic_lookup" - ;; #( - *-solaris*) : - - SO_CFLAGS="-KPIC" - SO_LDFLAGS="-G -z text" - SO_LD="ld" - ;; #( - ia64-hp-hpux*) : - - SO_CFLAGS="+z" - SO_LDFLAGS="-b" - SO_LD="${CC}" - ;; #( - *) : - - SO_CFLAGS="-fPIC" - ;; -esac - if test "$GCC" = "yes"; then : - SO_CFLAGS="-fPIC" - if test -z "$SO_LD"; then : - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - -fi - -fi - # If we still don't know how to make shared objects, don't make any. - if test -n "$SO_LD"; then : - SO_TARGETS="\${SO_TARGETS}" - -$as_echo "#define ISC_DLZ_DLOPEN 1" >>confdefs.h - - -fi - -fi - -CFLAGS="$CFLAGS $SO_CFLAGS" - - - - - - - - -# -# Response policy rewriting using DNS Response Policy Service (DNSRPS) -# interface. -# -# DNSRPS can be compiled into BIND everywhere with a reasonably -# modern C compiler. It is enabled on systems with dlopen() and librpz.so. -# -dnsrps_avail=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for librpz __attribute__s" >&5 -$as_echo_n "checking for librpz __attribute__s... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - extern void f(char *p __attribute__((unused)), ...) - __attribute__((format(printf,1,2))) __attribute__((__noreturn__)); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - librpz_have_attr=yes - -$as_echo "#define LIBRPZ_HAVE_ATTR 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - librpz_have_attr=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# Check whether --enable-dnsrps-dl was given. -if test "${enable_dnsrps_dl+set}" = set; then : - enableval=$enable_dnsrps_dl; enable_librpz_dl="$enableval" -else - enable_librpz_dl="$with_dlopen" -fi - - -if test "$enable_librpz_dl" = "yes" -a "$with_dlopen" = "no"; then : - as_fn_error $? "DNS Response Policy Service delayed link requires dlopen to be enabled" "$LINENO" 5 -fi - - -# Check whether --with-dnsrps-libname was given. -if test "${with_dnsrps_libname+set}" = set; then : - withval=$with_dnsrps_libname; librpz_name="$withval" -else - librpz_name="librpz.so" -fi - - -# Check whether --with-dnsrps-dir was given. -if test "${with_dnsrps_dir+set}" = set; then : - withval=$with_dnsrps_dir; librpz_path="$withval/$librpz_name" -else - librpz_path="$librpz_name" -fi - - -cat >>confdefs.h <<_ACEOF -#define DNSRPS_LIBRPZ_PATH "$librpz_path" -_ACEOF - -if test "$enable_librpz_dl" = "yes"; then : - - dnsrps_lib_open=2 - -else - - dnsrps_lib_open=1 - # Add librpz.so to linked libraries if we are not using dlopen() - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing librpz_client_create" >&5 -$as_echo_n "checking for library containing librpz_client_create... " >&6; } -if ${ac_cv_search_librpz_client_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char librpz_client_create (); -int -main () -{ -return librpz_client_create (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rpz; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_librpz_client_create=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_librpz_client_create+:} false; then : - break -fi -done -if ${ac_cv_search_librpz_client_create+:} false; then : - -else - ac_cv_search_librpz_client_create=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_librpz_client_create" >&5 -$as_echo "$ac_cv_search_librpz_client_create" >&6; } -ac_res=$ac_cv_search_librpz_client_create -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - dnsrps_lib_open=0 - dnsrps_avail=no -fi - - -fi - -cat >>confdefs.h <<_ACEOF -#define DNSRPS_LIB_OPEN $dnsrps_lib_open -_ACEOF - - -# Check whether --enable-dnsrps was given. -if test "${enable_dnsrps+set}" = set; then : - enableval=$enable_dnsrps; enable_dnsrps=$enableval -else - enable_dnsrps=no -fi - - -if test "$enable_dnsrps" != "no"; then : - - if test "$dnsrps_avail" != "yes"; then : - as_fn_error $? "dlopen and librpz.so needed for DNSRPS" "$LINENO" 5 -fi - if test "$dnsrps_lib_open" = "0"; then : - as_fn_error $? "dlopen and librpz.so needed for DNSRPS" "$LINENO" 5 -fi - -$as_echo "#define USE_DNSRPS 1" >>confdefs.h - - -fi - -# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC") -# -# Permission to use, copy, modify, and distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -# PERFORMANCE OF THIS SOFTWARE. - -# -# Shorthand. Note quoting: DLZ_DRIVER_DIR expanded in Makefile, not here. -# -dlzdir='${DLZ_DRIVER_DIR}' - -# -# Private autoconf macro to simplify configuring drivers: -# -# DLZ_ADD_DRIVER(DEFINE, DRIVER, INCLUDES, LIBS) -# -# where: -# DEFINE is FOO (to define -DDLZ_FOO) -# DRIVER is dlz_foo_driver (sources without the .c) -# INCLUDES is any necessary include definitions -# LIBS is any necessary library definitions -# - - -# -# Check for the various DLZ drivers -# - -# -# Was --with-dlz-postgres specified? -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Postgres DLZ driver" >&5 -$as_echo_n "checking for Postgres DLZ driver... " >&6; } - -# Check whether --with-dlz_postgres was given. -if test "${with_dlz_postgres+set}" = set; then : - withval=$with_dlz_postgres; use_dlz_postgres="$withval" -else - use_dlz_postgres="no" -fi - - -if test "$use_dlz_postgres" != "no" -then - if test "$use_dlz_postgres" != "yes" - then - for ac_prog in pg_config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $use_dlz_postgres/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PG_CONFIG=$ac_cv_path_PG_CONFIG -if test -n "$PG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5 -$as_echo "$PG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PG_CONFIG" && break -done -test -n "$PG_CONFIG" || PG_CONFIG="not found" - - else - for ac_prog in pg_config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PG_CONFIG=$ac_cv_path_PG_CONFIG -if test -n "$PG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5 -$as_echo "$PG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PG_CONFIG" && break -done -test -n "$PG_CONFIG" || PG_CONFIG="not found" - - fi - - if test "$PG_CONFIG" != "not found" - then - use_dlz_postgres=`$PG_CONFIG --includedir` - use_dlz_postgres_lib=`$PG_CONFIG --libdir` - else - pgprefix="$use_dlz_postgres" - use_dlz_postgres="$pgprefix/include" - use_dlz_postgres_lib="$pgprefix/lib" - fi -fi - -if test "$use_dlz_postgres" = "yes/include" -then - # User did not specify path and Postgres didn't say - guess it - pgdirs="/usr /usr/local /usr/local/pgsql /usr/pkg" - for d in $pgdirs - do - if test -f $d/include/libpq-fe.h - then - use_dlz_postgres=$d/include - use_dlz_postgres_lib=$d/lib - break - fi - done -fi - -if test "$use_dlz_postgres" = "yes/include" -then - # Still no joy, give up - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "No pg_config and PostgreSQL was not found in any of $pgdirs; use --with-dlz-postgres=/path or put pg_config in your path" "$LINENO" 5 -fi - -case "$use_dlz_postgres" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_POSTGRES" - for i in dlz_postgres_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "-I$use_dlz_postgres" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES -I$use_dlz_postgres" - DLZ_DRIVER_POSTGRES_INCLUDES="-I$use_dlz_postgres" - fi - if test -n "-L$use_dlz_postgres_lib -lpq" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS -L$use_dlz_postgres_lib -lpq" - DLZ_DRIVER_POSTGRES_LIBS="-L$use_dlz_postgres_lib -lpq" - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using PostgreSQL from $use_dlz_postgres_lib and $use_dlz_postgres" >&5 -$as_echo "using PostgreSQL from $use_dlz_postgres_lib and $use_dlz_postgres" >&6; } - ;; -esac - - -# -# Was --with-dlz-mysql specified? -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL DLZ driver" >&5 -$as_echo_n "checking for MySQL DLZ driver... " >&6; } - -# Check whether --with-dlz_mysql was given. -if test "${with_dlz_mysql+set}" = set; then : - withval=$with_dlz_mysql; use_dlz_mysql="$withval" -else - use_dlz_mysql="no" -fi - - -mysql_include="" -mysql_lib="" -if test "$use_dlz_mysql" = "yes" -then - for ac_prog in mysql_config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MYSQL_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MYSQL_CONFIG"; then - ac_cv_prog_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MYSQL_CONFIG="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MYSQL_CONFIG=$ac_cv_prog_MYSQL_CONFIG -if test -n "$MYSQL_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5 -$as_echo "$MYSQL_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$MYSQL_CONFIG" && break -done - - if test -n "$MYSQL_CONFIG" - then - mysql_include=`${MYSQL_CONFIG} --include` - mysql_lib=`${MYSQL_CONFIG} --libs` - use_dlz_mysql="config" - - else - # User did not specify a path - guess it - mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg" - for d in $mysqldirs - do - if test -f $d/include/mysql/mysql.h - then - use_dlz_mysql=$d - mysql_include=$d/include/mysql - break - elif test -f $d/include/mysql.h - then - use_dlz_mysql=$d - mysql_include=$d/include - break - fi - done - fi -elif test "$use_dlz_mysql" != "no" -then - d=$use_dlz_mysql - if test -f $d/include/mysql/mysql.h - then - mysql_include=$d/include/mysql - elif test -f $d/include/mysql.h - then - mysql_include=$d/include - fi -fi - -if test "$use_dlz_mysql" = "yes" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "MySQL was not found in any of $mysqldirs; use --with-dlz-mysql=/path" "$LINENO" 5 -fi - -case "$use_dlz_mysql" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - config) - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_MYSQL" - for i in dlz_mysql_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "${mysql_include}" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES ${mysql_include}" - DLZ_DRIVER_MYSQL_INCLUDES="${mysql_include}" - fi - if test -n "${mysql_lib}" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS ${mysql_lib}" - DLZ_DRIVER_MYSQL_LIBS="${mysql_lib}" - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using mysql with libs ${mysql_lib} and includes ${mysql_include}" >&5 -$as_echo "using mysql with libs ${mysql_lib} and includes ${mysql_include}" >&6; } - ;; - *) - if test -d "$use_dlz_mysql/lib/mysql" - then - mysql_lib="$use_dlz_mysql/lib/mysql" - else - mysql_lib="$use_dlz_mysql/lib" - fi - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_MYSQL" - for i in dlz_mysql_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "-I${mysql_include}" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES -I${mysql_include}" - DLZ_DRIVER_MYSQL_INCLUDES="-I${mysql_include}" - fi - if test -n "-L${mysql_lib} -lmysqlclient -lz -lcrypt -lm" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS -L${mysql_lib} -lmysqlclient -lz -lcrypt -lm" - DLZ_DRIVER_MYSQL_LIBS="-L${mysql_lib} -lmysqlclient -lz -lcrypt -lm" - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using mysql from ${mysql_lib} and ${mysql_include}" >&5 -$as_echo "using mysql from ${mysql_lib} and ${mysql_include}" >&6; } - ;; -esac - - -# -# Was --with-dlz-bdb specified? -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB DLZ driver..." >&5 -$as_echo_n "checking for Berkeley DB DLZ driver...... " >&6; } - -# Check whether --with-dlz_bdb was given. -if test "${with_dlz_bdb+set}" = set; then : - withval=$with_dlz_bdb; use_dlz_bdb="$withval" -else - use_dlz_bdb="no" -fi - - -case "$use_dlz_bdb" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - if test "$use_dlz_bdb" = "yes" - then - # User did not specify a path - guess directories - bdbdirs="/usr/local /usr/pkg /usr" - elif test -d "$use_dlz_bdb" - then - # User specified directory and it exists - bdbdirs="$use_dlz_bdb" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "path $use_dlz_bdb does not exist" "$LINENO" 5 - bdbdirs="" - fi - - # Use path we were given or guessed. This is insanely - # complicated because we have to search for a bunch of - # platform-specific variations and have to check - # separately for include and library directories. - - # Set both to yes, so we can check them later - dlz_bdb_inc="yes" - dlz_bdb_libs="yes" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } - for dd in $bdbdirs - do - # Skip nonexistent directories - if test ! -d "$dd" - then - continue - fi - - # Check other locations for includes. - # Order is important (sigh). - - bdb_incdirs="/db53 /db51 /db48 /db47 /db46 /db45 /db44 /db43 /db42 /db41 /db4 /db" - # include a blank element first - for d in "" $bdb_incdirs - do - if test -f "$dd/include${d}/db.h" - then - dlz_bdb_inc="-I$dd/include${d}" - break - fi - done - - # Give up on this directory if we couldn't - # find the include subdir - - if test "$dlz_bdb_inc" = "yes" - then - continue - fi - - # Look for libname other than libdb.so. - # Order is important (sigh). - - bdb_libnames="db53 db-5.3 db51 db-5.1 db48 db-4.8 db47 db-4.7 db46 db-4.6 db45 db-4.5 db44 db-4.4 db43 db-4.3 db42 db-4.2 db41 db-4.1 db" - for d in $bdb_libnames - do - if test "$dd" = "/usr" - then - as_ac_Lib=`$as_echo "ac_cv_lib_$d''_db_create" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_create in -l$d" >&5 -$as_echo_n "checking for db_create in -l$d... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$d $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char db_create (); -int -main () -{ -return db_create (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - dlz_bdb_libs="-l${d}" -fi - - if test $dlz_bdb_libs != "yes" - then - break - fi - elif test -f "$dd/lib/lib${d}.so" - then - dlz_bdb_libs="-L${dd}/lib -l${d}" - break - fi - done - - # If we found both incdir and lib, we're done - if test "$dlz_bdb_libs" != "yes" - then - break - fi - - # Otherwise, we're starting over - - dlz_bdb_inc="yes" - dlz_bdb_libs="yes" - done - - # Done searching, now make sure we got everything. - - if test "$dlz_bdb_inc" = "yes" - then - as_fn_error $? "could not find Berkeley DB include directory" "$LINENO" 5 - fi - - if test "$dlz_bdb_libs" = "yes" - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "could not find Berkeley DB library" "$LINENO" 5 - fi - - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_BDB" - for i in dlz_bdb_driver dlz_bdbhpt_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "$dlz_bdb_inc" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES $dlz_bdb_inc" - DLZ_DRIVER_BDB_INCLUDES="$dlz_bdb_inc" - fi - if test -n "$dlz_bdb_libs" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS $dlz_bdb_libs" - DLZ_DRIVER_BDB_LIBS="$dlz_bdb_libs" - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Berkeley DB: $dlz_bdb_inc $dlz_bdb_libs" >&5 -$as_echo "using Berkeley DB: $dlz_bdb_inc $dlz_bdb_libs" >&6; } - - ac_config_files="$ac_config_files contrib/dlz/bin/dlzbdb/Makefile" - - ;; -esac - - -# -# Was --with-dlz-filesystem specified? -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file system DLZ driver" >&5 -$as_echo_n "checking for file system DLZ driver... " >&6; } - -# Check whether --with-dlz_filesystem was given. -if test "${with_dlz_filesystem+set}" = set; then : - withval=$with_dlz_filesystem; use_dlz_filesystem="$withval" -else - use_dlz_filesystem="no" -fi - - -case "$use_dlz_filesystem" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_FILESYSTEM" - for i in dlz_filesystem_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES " - DLZ_DRIVER_FILESYSTEM_INCLUDES="" - fi - if test -n "" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS " - DLZ_DRIVER_FILESYSTEM_LIBS="" - fi - - DLZ_SYSTEM_TEST=filesystem - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; -esac - - -# -# Was --with-dlz-ldap specified? -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP DLZ driver" >&5 -$as_echo_n "checking for LDAP DLZ driver... " >&6; } - -# Check whether --with-dlz_ldap was given. -if test "${with_dlz_ldap+set}" = set; then : - withval=$with_dlz_ldap; use_dlz_ldap="$withval" -else - use_dlz_ldap="no" -fi - - -if test "$use_dlz_ldap" = "yes" -then - # User did not specify a path - guess it - ldapdirs="/usr /usr/local /usr/pkg" - for d in $ldapdirs - do - if test -f $d/include/ldap.h - then - use_dlz_ldap=$d - break - fi - done -fi - -if test "$use_dlz_ldap" = "yes" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "LDAP headers were not found in any of $ldapdirs; use --with-dlz-ldap=/path" "$LINENO" 5 -fi - -case "$use_dlz_ldap" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_LDAP" - for i in dlz_ldap_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "-I$use_dlz_ldap/include" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES -I$use_dlz_ldap/include" - DLZ_DRIVER_LDAP_INCLUDES="-I$use_dlz_ldap/include" - fi - if test -n "-L$use_dlz_ldap/lib -lldap -llber" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS -L$use_dlz_ldap/lib -lldap -llber" - DLZ_DRIVER_LDAP_LIBS="-L$use_dlz_ldap/lib -lldap -llber" - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include" >&5 -$as_echo "using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include" >&6; } - ;; -esac - - -# -# Was --with-dlz-odbc specified? -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ODBC DLZ driver" >&5 -$as_echo_n "checking for ODBC DLZ driver... " >&6; } - -# Check whether --with-dlz_odbc was given. -if test "${with_dlz_odbc+set}" = set; then : - withval=$with_dlz_odbc; use_dlz_odbc="$withval" -else - use_dlz_odbc="no" -fi - - -if test "$use_dlz_odbc" = "yes" -then - # User did not specify a path - guess it - libodbc_found=no - sql_h_found=no - ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default" -if test "x$ac_cv_header_sql_h" = xyes; then : - sql_h_found=yes -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLConnect in -lodbc" >&5 -$as_echo_n "checking for SQLConnect in -lodbc... " >&6; } -if ${ac_cv_lib_odbc_SQLConnect+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lodbc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SQLConnect (); -int -main () -{ -return SQLConnect (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_odbc_SQLConnect=yes -else - ac_cv_lib_odbc_SQLConnect=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLConnect" >&5 -$as_echo "$ac_cv_lib_odbc_SQLConnect" >&6; } -if test "x$ac_cv_lib_odbc_SQLConnect" = xyes; then : - libodbc_found=yes -fi - - - if test $libodbc_found = "yes" -o $sql_h_found = "yes" - then - use_dlz_odbc=system - dlz_odbc_include="" - dlz_odbc_libs="-lodbc" - else - odbcdirs="/usr /usr/local /usr/pkg" - for d in $odbcdirs - do - if test -f $d/include/sql.h -a -f $d/lib/libodbc.a - then - use_dlz_odbc=$d - dlz_odbc_include="-I$use_dlz_odbc/include" - dlz_odbc_libs="-L$use_dlz_odbc/lib -lodbc" - break - fi - done - fi -fi - -case "$use_dlz_odbc" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "ODBC headers were not found in any of $odbcdirs; use --with-dlz-odbc=/path" "$LINENO" 5 - ;; - *) - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_ODBC" - for i in dlz_odbc_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "$dlz_odbc_include" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES $dlz_odbc_include" - DLZ_DRIVER_ODBC_INCLUDES="$dlz_odbc_include" - fi - if test -n "$dlz_odbc_libs" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS $dlz_odbc_libs" - DLZ_DRIVER_ODBC_LIBS="$dlz_odbc_libs" - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ODBC from $use_dlz_odbc" >&5 -$as_echo "using ODBC from $use_dlz_odbc" >&6; } - ;; -esac - - -# -# Was --with-dlz-stub specified? -# - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stub DLZ driver" >&5 -$as_echo_n "checking for stub DLZ driver... " >&6; } - -# Check whether --with-dlz_stub was given. -if test "${with_dlz_stub+set}" = set; then : - withval=$with_dlz_stub; use_dlz_stub="$withval" -else - use_dlz_stub="no" -fi - - -case "$use_dlz_stub" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - - - CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_STUB" - for i in dlz_stub_driver - do - DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c" - DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O" - done - if test -n "" - then - DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES " - DLZ_DRIVER_STUB_INCLUDES="" - fi - if test -n "" - then - DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS " - DLZ_DRIVER_STUB_LIBS="" - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; -esac - -# Add any additional DLZ drivers here. - -# -# Finally, some generic stuff that applies to all drivers, assuming -# we're compiling contrib DLZ drivers at all. -# -if test -n "$CONTRIB_DLZ" -then - CONTRIB_DLZ="-DCONTRIB_DLZ $CONTRIB_DLZ" - - # - # Where to find DLZ driver header files. - # - DLZ_DRIVER_INCLUDES="-I$dlzdir/include $DLZ_DRIVER_INCLUDES" - - # - # Initialization and shutdown wrappers, helper functions. - # - DLZ_DRIVER_SRCS="$dlzdir/dlz_drivers.c $dlzdir/sdlz_helper.c $DLZ_DRIVER_SRCS" - DLZ_DRIVER_OBJS="dlz_drivers.$O sdlz_helper.$O $DLZ_DRIVER_OBJS" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking contributed DLZ drivers" >&5 -$as_echo_n "checking contributed DLZ drivers... " >&6; } - -if test -n "$CONTRIB_DLZ" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DLZ_DRIVER_RULES=contrib/dlz/drivers/rules - ac_config_files="$ac_config_files $DLZ_DRIVER_RULES contrib/dlz/modules/mysql/Makefile contrib/dlz/modules/mysqldyn/Makefile" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - DLZ_DRIVER_RULES=/dev/null -fi - - - - - - - - - - - -for ac_header in glob.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default" -if test "x$ac_cv_header_glob_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GLOB_H 1 -_ACEOF - -fi - -done - - -if test "yes" = "$cross_compiling"; then - if test -z "$BUILD_CC"; then - as_fn_error $? "BUILD_CC not set" "$LINENO" 5 - fi - BUILD_CFLAGS="$BUILD_CFLAGS" - BUILD_CPPFLAGS="$BUILD_CPPFLAGS" - BUILD_LDFLAGS="$BUILD_LDFLAGS" - BUILD_LIBS="$BUILD_LIBS" -else - BUILD_CC="$CC" - BUILD_CFLAGS="$CFLAGS" - BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG" - BUILD_LDFLAGS="$LDFLAGS" - BUILD_LIBS="$LIBS" -fi - -NEWFLAGS="" -for e in $BUILD_LDFLAGS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -BUILD_LDFLAGS="$NEWFLAGS" - -NEWFLAGS="" -for e in $DNS_GSSAPI_LIBS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -DNS_GSSAPI_LIBS="$NEWFLAGS" - -NEWFLAGS="" -for e in $ISC_OPENSSL_LIBS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -ISC_OPENSSL_LIBS="$NEWFLAGS" - -NEWFLAGS="" -for e in $DNS_CRYPTO_LIBS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -DNS_CRYPTO_LIBS="$NEWFLAGS" - - - - - - - -# -# Commands to run at the end of config.status. -# Don't just put these into configure, it won't work right if somebody -# runs config.status directly (which autoconf allows). -# - -ac_config_commands="$ac_config_commands chmod" - - -# -# Files to configure. These are listed here because we used to -# specify them as arguments to AC_OUTPUT. It's (now) ok to move these -# elsewhere if there's a good reason for doing so. -# - -ac_config_files="$ac_config_files Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/plugins/Makefile bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl fuzz/Makefile lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/netmgr/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/tests/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccc/tests/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall make/Makefile make/mkdep unit/unittest.sh util/check-make-install" - - -# -# Do it -# - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by BIND $as_me 9.17, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to . -BIND home page: ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -BIND config.status 9.17 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "make/rules") CONFIG_FILES="$CONFIG_FILES make/rules" ;; - "make/includes") CONFIG_FILES="$CONFIG_FILES make/includes" ;; - "contrib/dlz/bin/dlzbdb/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dlz/bin/dlzbdb/Makefile" ;; - "$DLZ_DRIVER_RULES") CONFIG_FILES="$CONFIG_FILES $DLZ_DRIVER_RULES" ;; - "contrib/dlz/modules/mysql/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dlz/modules/mysql/Makefile" ;; - "contrib/dlz/modules/mysqldyn/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dlz/modules/mysqldyn/Makefile" ;; - "chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS chmod" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; - "bin/check/Makefile") CONFIG_FILES="$CONFIG_FILES bin/check/Makefile" ;; - "bin/confgen/Makefile") CONFIG_FILES="$CONFIG_FILES bin/confgen/Makefile" ;; - "bin/confgen/unix/Makefile") CONFIG_FILES="$CONFIG_FILES bin/confgen/unix/Makefile" ;; - "bin/delv/Makefile") CONFIG_FILES="$CONFIG_FILES bin/delv/Makefile" ;; - "bin/dig/Makefile") CONFIG_FILES="$CONFIG_FILES bin/dig/Makefile" ;; - "bin/dnssec/Makefile") CONFIG_FILES="$CONFIG_FILES bin/dnssec/Makefile" ;; - "bin/named/Makefile") CONFIG_FILES="$CONFIG_FILES bin/named/Makefile" ;; - "bin/named/unix/Makefile") CONFIG_FILES="$CONFIG_FILES bin/named/unix/Makefile" ;; - "bin/nsupdate/Makefile") CONFIG_FILES="$CONFIG_FILES bin/nsupdate/Makefile" ;; - "bin/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES bin/pkcs11/Makefile" ;; - "bin/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES bin/plugins/Makefile" ;; - "bin/rndc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/rndc/Makefile" ;; - "bin/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/Makefile" ;; - "bin/tests/headerdep_test.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/headerdep_test.sh" ;; - "bin/tests/optional/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/optional/Makefile" ;; - "bin/tests/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/pkcs11/Makefile" ;; - "bin/tests/pkcs11/benchmarks/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/pkcs11/benchmarks/Makefile" ;; - "bin/tests/system/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/Makefile" ;; - "bin/tests/system/conf.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/system/conf.sh" ;; - "bin/tests/system/dlzexternal/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dlzexternal/Makefile" ;; - "bin/tests/system/dlzexternal/ns1/dlzs.conf") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dlzexternal/ns1/dlzs.conf" ;; - "bin/tests/system/dyndb/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dyndb/Makefile" ;; - "bin/tests/system/dyndb/driver/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dyndb/driver/Makefile" ;; - "bin/tests/system/pipelined/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/pipelined/Makefile" ;; - "bin/tests/system/rndc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/rndc/Makefile" ;; - "bin/tests/system/rpz/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/rpz/Makefile" ;; - "bin/tests/system/rsabigexponent/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/rsabigexponent/Makefile" ;; - "bin/tests/system/tkey/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/tkey/Makefile" ;; - "bin/tools/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tools/Makefile" ;; - "contrib/scripts/check-secure-delegation.pl") CONFIG_FILES="$CONFIG_FILES contrib/scripts/check-secure-delegation.pl" ;; - "contrib/scripts/zone-edit.sh") CONFIG_FILES="$CONFIG_FILES contrib/scripts/zone-edit.sh" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "doc/arm/Makefile") CONFIG_FILES="$CONFIG_FILES doc/arm/Makefile" ;; - "doc/arm/noteversion.xml") CONFIG_FILES="$CONFIG_FILES doc/arm/noteversion.xml" ;; - "doc/arm/pkgversion.xml") CONFIG_FILES="$CONFIG_FILES doc/arm/pkgversion.xml" ;; - "doc/arm/releaseinfo.xml") CONFIG_FILES="$CONFIG_FILES doc/arm/releaseinfo.xml" ;; - "doc/doxygen/Doxyfile") CONFIG_FILES="$CONFIG_FILES doc/doxygen/Doxyfile" ;; - "doc/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES doc/doxygen/Makefile" ;; - "doc/doxygen/doxygen-input-filter") CONFIG_FILES="$CONFIG_FILES doc/doxygen/doxygen-input-filter" ;; - "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; - "doc/tex/Makefile") CONFIG_FILES="$CONFIG_FILES doc/tex/Makefile" ;; - "doc/tex/armstyle.sty") CONFIG_FILES="$CONFIG_FILES doc/tex/armstyle.sty" ;; - "doc/xsl/Makefile") CONFIG_FILES="$CONFIG_FILES doc/xsl/Makefile" ;; - "doc/xsl/isc-docbook-chunk.xsl") CONFIG_FILES="$CONFIG_FILES doc/xsl/isc-docbook-chunk.xsl" ;; - "doc/xsl/isc-docbook-html.xsl") CONFIG_FILES="$CONFIG_FILES doc/xsl/isc-docbook-html.xsl" ;; - "doc/xsl/isc-manpage.xsl") CONFIG_FILES="$CONFIG_FILES doc/xsl/isc-manpage.xsl" ;; - "doc/xsl/isc-notes-html.xsl") CONFIG_FILES="$CONFIG_FILES doc/xsl/isc-notes-html.xsl" ;; - "fuzz/Makefile") CONFIG_FILES="$CONFIG_FILES fuzz/Makefile" ;; - "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "lib/bind9/Makefile") CONFIG_FILES="$CONFIG_FILES lib/bind9/Makefile" ;; - "lib/bind9/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/bind9/include/Makefile" ;; - "lib/bind9/include/bind9/Makefile") CONFIG_FILES="$CONFIG_FILES lib/bind9/include/bind9/Makefile" ;; - "lib/dns/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dns/Makefile" ;; - "lib/dns/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dns/include/Makefile" ;; - "lib/dns/include/dns/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dns/include/dns/Makefile" ;; - "lib/dns/include/dst/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dns/include/dst/Makefile" ;; - "lib/dns/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dns/tests/Makefile" ;; - "lib/irs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/irs/Makefile" ;; - "lib/irs/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/irs/include/Makefile" ;; - "lib/irs/include/irs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/irs/include/irs/Makefile" ;; - "lib/irs/include/irs/netdb.h") CONFIG_FILES="$CONFIG_FILES lib/irs/include/irs/netdb.h" ;; - "lib/irs/include/irs/platform.h") CONFIG_FILES="$CONFIG_FILES lib/irs/include/irs/platform.h" ;; - "lib/irs/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/irs/tests/Makefile" ;; - "lib/isc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/Makefile" ;; - "lib/isc/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/Makefile" ;; - "lib/isc/include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/isc/Makefile" ;; - "lib/isc/include/isc/platform.h") CONFIG_FILES="$CONFIG_FILES lib/isc/include/isc/platform.h" ;; - "lib/isc/include/pk11/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/pk11/Makefile" ;; - "lib/isc/include/pkcs11/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/include/pkcs11/Makefile" ;; - "lib/isc/netmgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/netmgr/Makefile" ;; - "lib/isc/pthreads/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/pthreads/Makefile" ;; - "lib/isc/pthreads/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/pthreads/include/Makefile" ;; - "lib/isc/pthreads/include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/pthreads/include/isc/Makefile" ;; - "lib/isc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/tests/Makefile" ;; - "lib/isc/unix/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/Makefile" ;; - "lib/isc/unix/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/Makefile" ;; - "lib/isc/unix/include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isc/unix/include/isc/Makefile" ;; - "lib/isccc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccc/Makefile" ;; - "lib/isccc/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccc/include/Makefile" ;; - "lib/isccc/include/isccc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccc/include/isccc/Makefile" ;; - "lib/isccc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccc/tests/Makefile" ;; - "lib/isccfg/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccfg/Makefile" ;; - "lib/isccfg/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccfg/include/Makefile" ;; - "lib/isccfg/include/isccfg/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccfg/include/isccfg/Makefile" ;; - "lib/isccfg/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/isccfg/tests/Makefile" ;; - "lib/ns/Makefile") CONFIG_FILES="$CONFIG_FILES lib/ns/Makefile" ;; - "lib/ns/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/ns/include/Makefile" ;; - "lib/ns/include/ns/Makefile") CONFIG_FILES="$CONFIG_FILES lib/ns/include/ns/Makefile" ;; - "lib/ns/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/ns/tests/Makefile" ;; - "lib/samples/Makefile") CONFIG_FILES="$CONFIG_FILES lib/samples/Makefile" ;; - "lib/samples/Makefile-postinstall") CONFIG_FILES="$CONFIG_FILES lib/samples/Makefile-postinstall" ;; - "make/Makefile") CONFIG_FILES="$CONFIG_FILES make/Makefile" ;; - "make/mkdep") CONFIG_FILES="$CONFIG_FILES make/mkdep" ;; - "unit/unittest.sh") CONFIG_FILES="$CONFIG_FILES unit/unittest.sh" ;; - "util/check-make-install") CONFIG_FILES="$CONFIG_FILES util/check-make-install" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - -if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then - ac_cs_awk_getline=: - ac_cs_awk_pipe_init= - ac_cs_awk_read_file=' - while ((getline aline < (F[key])) > 0) - print(aline) - close(F[key])' - ac_cs_awk_pipe_fini= -else - ac_cs_awk_getline=false - ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" - ac_cs_awk_read_file=' - print "|#_!!_#|" - print "cat " F[key] " &&" - '$ac_cs_awk_pipe_init - # The final `:' finishes the AND list. - ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' -fi -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - -# Create commands to substitute file output variables. -{ - echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && - echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && - echo "_ACAWK" && - echo "_ACEOF" -} >conf$$files.sh && -. ./conf$$files.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -rm -f conf$$files.sh - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - \$ac_cs_awk_pipe_init -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - if (nfields == 3 && !substed) { - key = field[2] - if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { - \$ac_cs_awk_read_file - next - } - } - print line -} -\$ac_cs_awk_pipe_fini -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | -if $ac_cs_awk_getline; then - $AWK -f "$ac_tmp/subs.awk" -else - $AWK -f "$ac_tmp/subs.awk" | $SHELL -fi \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "chmod":C) chmod a+x doc/doxygen/doxygen-input-filter ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -# -# Now that the Makefiles exist we can ensure that everything is rebuilt. -# - -# Check whether --with-make-clean was given. -if test "${with_make_clean+set}" = set; then : - withval=$with_make_clean; make_clean="$withval" -else - make_clean="yes" -fi - -case "$make_clean" in -yes) - if test "yes" != "$no_create" - then - if test "yes" = "$silent" - then - make clean > /dev/null - else - make clean - fi - fi - ;; -esac - -# Check whether --enable-full-report was given. -if test "${enable_full_report+set}" = set; then : - enableval=$enable_full_report; -fi - - -report() { - echo "===============================================================================" - echo "Configuration summary:" - echo "-------------------------------------------------------------------------------" - echo "Optional features enabled:" - if test "yes" = "$enable_full_report" -o "standard" = "$with_locktype"; then - echo " Mutex lock type: $with_locktype" - fi - test "small" = "$with_tuning" && echo " Small-system tuning (--with-tuning)" - test "no" = "$use_dnstap" || \ - echo " Allow 'dnstap' packet logging (--enable-dnstap)" - test -z "$MAXMINDDB_LIBS" || echo " GeoIP2 access control (--enable-geoip)" - test "no" = "$use_gssapi" || echo " GSS-API (--with-gssapi)" - - # these lines are only printed if run with --enable-full-report - if test "yes" = "$enable_full_report"; then - test "no" = "$found_ipv6" || echo " IPv6 support (--enable-ipv6)" - test "X$PYTHON" = "X" || echo " Python tools (--with-python)" - test "X$LIBXML2_LIBS" = "X" || echo " XML statistics (--with-libxml2)" - test "X$JSON_C_LIBS" = "X" || echo " JSON statistics (--with-json-c): $JSON_C_CFLAGS $JSON_C_LIBS" - test "X$ZLIB_LIBS" = "X" || echo " HTTP zlib compression (--with-zlib)" - test "X$NZD_TOOLS" = "X" || echo " LMDB database to store configuration for 'addzone' zones (--with-lmdb)" - test "no" = "$with_libidn2" || echo " IDN support (--with-libidn2)" - fi - - test "yes" = "$enable_dnsrps" && \ - echo " DNS Response Policy Service interface (--enable-dnsrps)" - test "yes" = "$enable_fixed" && \ - echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)" - test "yes" = "$enable_backtrace" && \ - echo " Print backtrace on crash (--enable-backtrace)" - test "yes" = "$want_querytrace" && \ - echo " Very verbose query trace logging (--enable-querytrace)" - test "no" = "$with_cmocka" || echo " CMocka Unit Testing Framework (--with-cmocka)" - - test "auto" = "$validation_default" && echo " DNSSEC validation active by default (--enable-auto-validation)" - - test "$CRYPTO" = "pkcs11" && ( - echo " Using PKCS#11 for Public-Key Cryptography (--with-native-pkcs11)" - echo " PKCS#11 module (--with-pkcs11): $with_pkcs11" - ) - - echo " Dynamically loadable zone (DLZ) drivers:" - test "no" = "$use_dlz_bdb" || \ - echo " Berkeley DB (--with-dlz-bdb)" - test "no" = "$use_dlz_ldap" || \ - echo " LDAP (--with-dlz-ldap)" - test "no" = "$use_dlz_mysql" || \ - echo " MySQL (--with-dlz-mysql)" - test "no" = "$use_dlz_odbc" || \ - echo " ODBC (--with-dlz-odbc)" - test "no" = "$use_dlz_postgres" || \ - echo " Postgres (--with-dlz-postgres)" - test "no" = "$use_dlz_filesystem" || \ - echo " Filesystem (--with-dlz-filesystem)" - test "no" = "$use_dlz_stub" || \ - echo " Stub (--with-dlz-stub)" - test "$use_dlz_bdb $use_dlz_ldap $use_dlz_mysql $use_dlz_odbc $use_dlz_postgres $use_dlz_filesystem $use_dlz_stub" = "no no no no no no no" && echo " None" - - echo "-------------------------------------------------------------------------------" - - echo "Features disabled or unavailable on this platform:" - test "no" = "$found_ipv6" && echo " IPv6 support (--enable-ipv6)" - test "small" = "$with_tuning" || echo " Small-system tuning (--with-tuning)" - - test "no" = "$use_dnstap" && \ - echo " Allow 'dnstap' packet logging (--enable-dnstap)" - test -z "$MAXMINDDB_LIBS" && echo " GeoIP2 access control (--enable-geoip)" - test "no" = "$use_gssapi" && echo " GSS-API (--with-gssapi)" - - test "no" = "$enable_dnsrps" && \ - echo " DNS Response Policy Service interface (--enable-dnsrps)" - - test "yes" = "$enable_fixed" || \ - echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)" - - test "yes" = "$validation_default" && echo " DNSSEC validation requires configuration (--enablee-auto-validation)" - - test "$CRYPTO" = "pkcs11" || ( - echo " Using PKCS#11 for Public-Key Cryptography (--with-native-pkcs11)" - ) - - test "yes" = "$enable_backtrace" || \ - echo " Print backtrace on crash (--enable-backtrace)" - test "yes" = "$want_querytrace" || \ - echo " Very verbose query trace logging (--enable-querytrace)" - - test "no" = "$with_cmocka" && echo " CMocka Unit Testing Framework (--with-cmocka)" - - test "X$PYTHON" = "X" && echo " Python tools (--with-python)" - test "X$LIBXML2_LIBS" = "X" && echo " XML statistics (--with-libxml2)" - test "X$JSON_C_LIBS" = "X" && echo " JSON statistics (--with-json-c)" - test "X$ZLIB_LIBS" = "X" && echo " HTTP zlib compression (--with-zlib)" - test "X$NZD_TOOLS" = "X" && echo " LMDB database to store configuration for 'addzone' zones (--with-lmdb)" - test "no" = "$with_libidn2" && echo " IDN support (--with-libidn2)" - - echo "-------------------------------------------------------------------------------" - echo "Configured paths:" - echo " prefix: $prefix" - echo " sysconfdir: $sysconfdir" - echo " localstatedir: $localstatedir" - echo "-------------------------------------------------------------------------------" - echo "Compiler: $CC" - $CC --version 2>&1 | sed 's/^/ /' - - if test "X$ac_unrecognized_opts" != "X"; then - echo "Unrecognized options:" - echo " $ac_unrecognized_opts" - fi - - if test "yes" != "$enable_full_report"; then - echo "-------------------------------------------------------------------------------" - echo "For more detail, use --enable-full-report." - fi - echo "===============================================================================" -} - -if test "yes" != "$silent"; then - report -fi - -# Tell Emacs to edit this file in shell mode. -# Local Variables: -# mode: sh -# End: diff --git a/contrib/dlz/bin/dlzbdb/Makefile.in b/contrib/dlz/bin/dlzbdb/Makefile.in deleted file mode 100644 index a6892b9a89..0000000000 --- a/contrib/dlz/bin/dlzbdb/Makefile.in +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 1998-2001, 2016 Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -DLZINCLUDES = @DLZ_DRIVER_INCLUDES@ - -CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \ - ${ISC_INCLUDES} ${DLZINCLUDES} - -CDEFINES = @CONTRIB_DLZ@ -CWARNINGS = - -DLZLIBS = @DLZ_DRIVER_LIBS@ -ISCLIBS = ../../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -DEPLIBS = ${ISCDEPLIBS} - -LIBS = ${ISCLIBS} ${DLZLIBS} @LIBS@ - -TARGETS = dlzbdb - -SRCS = dlzbdb.c - -#MANPAGES = - -#HTMLPAGES = - -#MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -dlzbdb.@O@: dlzbdb.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \ - -c ${srcdir}/dlzbdb.c - -dlzbdb: dlzbdb.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ dlzbdb.@O@ ${LIBS} - -doc man:: ${MANOBJS} - -#docclean manclean maintainer-clean:: -# rm -f ${MANOBJS} - -clean distclean maintainer-clean:: - rm -f ${TARGETS} - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} -# $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 - -install:: dlzbdb installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} dlzbdb ${DESTDIR}${sbindir} diff --git a/contrib/dlz/modules/mysql/Makefile.in b/contrib/dlz/modules/mysql/Makefile.in deleted file mode 100644 index 5ab31be516..0000000000 --- a/contrib/dlz/modules/mysql/Makefile.in +++ /dev/null @@ -1,21 +0,0 @@ -prefix = /usr -libdir = $(prefix)/lib/bind9 - -CFLAGS=-fPIC -Wall -g -I../include @DLZ_DRIVER_MYSQL_INCLUDES@ -MYSQL_LIBS=@DLZ_DRIVER_MYSQL_LIBS@ - -all: dlz_mysql_dynamic.so - -dlz_dbi.o: ../common/dlz_dbi.c - $(CC) $(CFLAGS) -c ../common/dlz_dbi.c - -dlz_mysql_dynamic.so: dlz_mysql_dynamic.c dlz_dbi.o - $(CC) $(CFLAGS) -shared -o dlz_mysql_dynamic.so \ - dlz_mysql_dynamic.c dlz_dbi.o $(MYSQL_LIBS) - -clean: - rm -f dlz_mysql_dynamic.so *.o - -install: dlz_mysql_dynamic.so - mkdir -p $(DESTDIR)$(libdir) - install dlz_mysql_dynamic.so $(DESTDIR)$(libdir) diff --git a/contrib/dlz/modules/mysqldyn/Makefile.in b/contrib/dlz/modules/mysqldyn/Makefile.in deleted file mode 100644 index 248e3dafec..0000000000 --- a/contrib/dlz/modules/mysqldyn/Makefile.in +++ /dev/null @@ -1,21 +0,0 @@ -prefix = /usr -libdir = $(prefix)/lib/bind9 - -CFLAGS=-fPIC -Wall -g -I../include @DLZ_DRIVER_MYSQL_INCLUDES@ -MYSQL_LIBS=@DLZ_DRIVER_MYSQL_LIBS@ - -all: dlz_mysqldyn_mod.so - -dlz_dbi.o: ../common/dlz_dbi.c - $(CC) $(CFLAGS) -c ../common/dlz_dbi.c - -dlz_mysqldyn_mod.so: dlz_mysqldyn_mod.c dlz_dbi.o - $(CC) $(CFLAGS) -shared -o dlz_mysqldyn_mod.so \ - dlz_mysqldyn_mod.c dlz_dbi.o $(MYSQL_LIBS) - -clean: - rm -f dlz_mysqldyn_mod.so *.o - -install: dlz_mysqldyn_mod.so - mkdir -p $(DESTDIR)$(libdir) - install dlz_mysqldyn_mod.so $(DESTDIR)$(libdir) diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index 760dde41da..0000000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# This Makefile is a placeholder. It exists merely to make -# sure that its directory gets created in the object directory -# tree when doing a build using separate object directories. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = arm misc xsl doxygen tex -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/doc/arm/Makefile.in b/doc/arm/Makefile.in deleted file mode 100644 index 6a71171698..0000000000 --- a/doc/arm/Makefile.in +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_RULES@ - -MANOBJS = Bv9ARM.html notes.html - -TXTOBJS = notes.txt - -PDFOBJS = Bv9ARM.pdf notes.pdf - -NOTESXML = notes-download.xml notes-eol.xml notes-intro.xml notes-license.xml \ - notes-platforms.xml notes-thankyou.xml \ - notes-9.17.2.xml \ - notes-9.17.1.xml \ - notes-9.17.0.xml \ - notes.xml - -doc man:: ${MANOBJS} ${TXTOBJS} ${PDFOBJS} - -clean:: - rm -f Bv9ARM.aux Bv9ARM.brf Bv9ARM.glo Bv9ARM.idx Bv9ARM.toc - rm -f Bv9ARM.log Bv9ARM.out - rm -f notes.aux notes.brf notes.glo notes.idx notes.toc - rm -f notes.log notes.out - -docclean manclean maintainer-clean:: clean - rm -f *.html ${PDFOBJS} - -maintainer-clean distclean:: - rm -f releaseinfo.xml - rm -f pkgversion.xml - rm -f noteversion.xml - -# use xmllint to process include -notes.html: notes-wrapper.xml ${NOTESXML} releaseinfo.xml pkgversion.xml noteversion.xml - expand notes-wrapper.xml | ${XMLLINT} --xinclude - | \ - ${XSLTPROC} --stringparam generate.toc "" ../xsl/isc-notes-html.xsl - > notes.html - -notes.pdf: notes-wrapper.xml ${NOTESXML} releaseinfo.xml pkgversion.xml noteversion.xml - ${XSLTPROC} ${top_srcdir}/doc/xsl/pre-latex.xsl notes-wrapper.xml | \ - ${DBLATEX} -c notes.conf -Pdoc.layout="mainmatter" -o notes.pdf - - -# Produce notes.txt from notes.html using w3m, with some post-processing: -# -# - remove trailing spaces from every line, -# - remove empty lines from the end of the document, -# - prevent GitLab issue/MR identifiers from being split across two lines. -notes.txt: notes.html - ${W3M} -dump -cols 75 -O ascii -T text/html < notes.html | \ - sed 's/ *$$//' | \ - sed -e :a -e '/^\n*$$/{$$d;N;};/\n$$/ba' | \ - sed '/ [!#]$$/{N;s| \([!#]\)\(\n[[:space:]]*\)\([0-9][0-9]*\)|\2\1\3|;};' > notes.txt - -# use xmllint to process include -Bv9ARM.html: Bv9ARM-book.xml ${NOTESXML} releaseinfo.xml pkgversion.xml noteversion.xml - expand Bv9ARM-book.xml | ${XMLLINT} --xinclude - | \ - ${XSLTPROC} --stringparam root.filename Bv9ARM \ - ${top_srcdir}/doc/xsl/isc-docbook-chunk.xsl - - -# use xmllint to process include -Bv9ARM-all.html: Bv9ARM-book.xml ${NOTESXML} releaseinfo.xml pkgversion.xml noteversion.xml - expand Bv9ARM-book.xml | ${XMLLINT} --xinclude - |\ - ${XSLTPROC} -o Bv9ARM-all.html ../xsl/isc-docbook-html.xsl - - -Bv9ARM.pdf: Bv9ARM-book.xml ${NOTESXML} releaseinfo.xml pkgversion.xml noteversion.xml - expand Bv9ARM-book.xml | \ - ${XSLTPROC} ${top_srcdir}/doc/xsl/pre-latex.xsl - | \ - ${DBLATEX} -c Bv9ARM.conf -o Bv9ARM.pdf - diff --git a/doc/doxygen/Makefile.in b/doc/doxygen/Makefile.in deleted file mode 100644 index 5cb250222d..0000000000 --- a/doc/doxygen/Makefile.in +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -VERSION=@BIND9_VERSION@ - -# Until and unless we decide to ship all umptyzillion Doxygen output -# files, distclean for this directory implies docclean. - -doc docclean distclean:: - rm -rf html xml - -doc:: - BIND9_VERSION='${VERSION}' @DOXYGEN@ - -distclean:: - rm -f Doxyfile doxygen-input-filter diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in deleted file mode 100644 index be4371eda6..0000000000 --- a/doc/misc/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_MAKE_RULES@ - -PERL = @PERL@ - -MANOBJS = options - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f options - -# Do not make options depend on ../../bin/tests/cfg_test, doing so -# will cause excessively clever versions of make to attempt to build -# that program right here, right now, if it is missing, which will -# cause make doc to bomb. - -CFG_TEST = ../../bin/tests/cfg_test - -options: FORCE - if test -x ${CFG_TEST} ; \ - then \ - ${CFG_TEST} --named --grammar > $@.raw ; \ - ${PERL} ${srcdir}/sort-options.pl < $@.raw > $@.sorted ; \ - ${PERL} ${srcdir}/format-options.pl < $@.sorted > $@.new ; \ - mv -f $@.new $@ ; \ - ${CFG_TEST} --named --grammar --active > $@.raw ; \ - ${PERL} ${srcdir}/sort-options.pl < $@.raw > $@.sorted ; \ - ${PERL} ${srcdir}/format-options.pl < $@.sorted > $@.new ; \ - mv -f $@.new $@.active ; \ - rm -f $@.raw $@.sorted ; \ - ${CFG_TEST} --zonegrammar master --active > master.zoneopt ; \ - ${CFG_TEST} --zonegrammar slave --active > slave.zoneopt ; \ - ${CFG_TEST} --zonegrammar mirror --active > mirror.zoneopt ; \ - ${CFG_TEST} --zonegrammar forward --active > forward.zoneopt ; \ - ${CFG_TEST} --zonegrammar hint --active > hint.zoneopt ; \ - ${CFG_TEST} --zonegrammar stub --active > stub.zoneopt ; \ - ${CFG_TEST} --zonegrammar static-stub --active > static-stub.zoneopt ; \ - ${CFG_TEST} --zonegrammar redirect --active > redirect.zoneopt ; \ - ${CFG_TEST} --zonegrammar delegation-only --active > delegation-only.zoneopt ; \ - ${CFG_TEST} --zonegrammar in-view --active > in-view.zoneopt ; \ - else \ - rm -f $@.new $@.raw $@.sorted ; \ - fi - -docbook: options - ${PERL} docbook-options.pl options.active > ${top_srcdir}/bin/named/named.conf.docbook - ${PERL} docbook-zoneopt.pl master.zoneopt > ${top_srcdir}/doc/arm/master.zoneopt.xml - ${PERL} docbook-zoneopt.pl slave.zoneopt > ${top_srcdir}/doc/arm/slave.zoneopt.xml - ${PERL} docbook-zoneopt.pl mirror.zoneopt > ${top_srcdir}/doc/arm/mirror.zoneopt.xml - ${PERL} docbook-zoneopt.pl forward.zoneopt > ${top_srcdir}/doc/arm/forward.zoneopt.xml - ${PERL} docbook-zoneopt.pl hint.zoneopt > ${top_srcdir}/doc/arm/hint.zoneopt.xml - ${PERL} docbook-zoneopt.pl stub.zoneopt > ${top_srcdir}/doc/arm/stub.zoneopt.xml - ${PERL} docbook-zoneopt.pl static-stub.zoneopt > ${top_srcdir}/doc/arm/static-stub.zoneopt.xml - ${PERL} docbook-zoneopt.pl redirect.zoneopt > ${top_srcdir}/doc/arm/redirect.zoneopt.xml - ${PERL} docbook-zoneopt.pl delegation-only.zoneopt > ${top_srcdir}/doc/arm/delegation-only.zoneopt.xml - ${PERL} docbook-zoneopt.pl in-view.zoneopt > ${top_srcdir}/doc/arm/in-view.zoneopt.xml - ${PERL} docbook-grammars.pl options.active acl > ${top_srcdir}/doc/arm/acl.grammar.xml - ${PERL} docbook-grammars.pl options.active controls > ${top_srcdir}/doc/arm/controls.grammar.xml - ${PERL} docbook-grammars.pl options.active key > ${top_srcdir}/doc/arm/key.grammar.xml - ${PERL} docbook-grammars.pl options.active logging > ${top_srcdir}/doc/arm/logging.grammar.xml - ${PERL} docbook-grammars.pl options.active masters > ${top_srcdir}/doc/arm/masters.grammar.xml - ${PERL} docbook-grammars.pl options.active options > ${top_srcdir}/doc/arm/options.grammar.xml - ${PERL} docbook-grammars.pl options.active server > ${top_srcdir}/doc/arm/server.grammar.xml - ${PERL} docbook-grammars.pl options.active statistics-channels > ${top_srcdir}/doc/arm/statistics-channels.grammar.xml - ${PERL} docbook-grammars.pl options.active trust-anchors > ${top_srcdir}/doc/arm/trust-anchors.grammar.xml - ${PERL} docbook-grammars.pl options.active managed-keys > ${top_srcdir}/doc/arm/managed-keys.grammar.xml - ${PERL} docbook-grammars.pl options.active trusted-keys > ${top_srcdir}/doc/arm/trusted-keys.grammar.xml diff --git a/doc/tex/Makefile.in b/doc/tex/Makefile.in deleted file mode 100644 index c4bb60384a..0000000000 --- a/doc/tex/Makefile.in +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -distclean:: - rm -f armstyle.sty diff --git a/doc/xsl/Makefile.in b/doc/xsl/Makefile.in deleted file mode 100644 index 3138c29cd5..0000000000 --- a/doc/xsl/Makefile.in +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -distclean:: - rm -f isc-docbook-chunk.xsl isc-docbook-html.xsl \ - isc-manpage.xsl isc-notes-html.xsl diff --git a/fuzz/Makefile.in b/fuzz/Makefile.in deleted file mode 100644 index 26ad5eebe5..0000000000 --- a/fuzz/Makefile.in +++ /dev/null @@ -1,44 +0,0 @@ -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ -abs_srcdir = @abs_srcdir@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. -I.. ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} -CDEFINES = -DFUZZDIR=\"$(abs_srcdir)\" - -ISCLIBS = ../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCDEPLIBS = ../lib/isc/libisc.@A@ -DNSLIBS = ../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -DNSDEPLIBS = ../lib/dns/libdns.@A@ - -LIBS = @LIBS@ - -OBJS = main.@O@ -SRCS = main.c dns_name_fromtext_target.c dns_rdata_fromwire_text.c - -SUBDIRS = -TARGETS = dns_name_fromtext_target@EXEEXT@ \ - dns_rdata_fromwire_text@EXEEXT@ - -@BIND9_MAKE_RULES@ - -dns_name_fromtext_target@EXEEXT@: dns_name_fromtext_target.@O@ main.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - dns_name_fromtext_target.@O@ main.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS} - -dns_rdata_fromwire_text@EXEEXT@: dns_rdata_fromwire_text.@O@ main.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - dns_rdata_fromwire_text.@O@ main.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS} - -check: ${TARGETS} - for fuzzer in ${TARGETS}; do \ - ./$${fuzzer} ; \ - done - -oss-fuzz: ${TARGETS} - -clean distclean:: - rm -f ${TARGETS} diff --git a/install-sh b/install-sh deleted file mode 100755 index 058b26c82d..0000000000 --- a/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/lib/Makefile.in b/lib/Makefile.in deleted file mode 100644 index ffa2d5a524..0000000000 --- a/lib/Makefile.in +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -# Note: the order of SUBDIRS is important. -# Attempt to disable parallel processing. -.NOTPARALLEL: -.NO_PARALLEL: -SUBDIRS = isc isccc dns ns isccfg bind9 irs samples -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/bind9/Makefile.in b/lib/bind9/Makefile.in deleted file mode 100644 index 1e038e1285..0000000000 --- a/lib/bind9/Makefile.in +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@LIBBIND9_API@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${ISCCFG_INCLUDES} ${NS_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -NSLIBS = ../../lib/ns/libns.@A@ - -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ -DNSDEPLIBS = ../../lib/dns/libdns.@A@ - -LIBS = @LIBS@ - -SUBDIRS = include - -# Alphabetically -OBJS = check.@O@ getaddresses.@O@ version.@O@ - -# Alphabetically -SRCS = check.c getaddresses.c version.c - -TARGETS = timestamp - -@BIND9_MAKE_RULES@ - -version.@O@: version.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DLIBINTERFACE=${LIBINTERFACE} \ - -DLIBREVISION=${LIBREVISION} \ - -DLIBAGE=${LIBAGE} \ - -c ${srcdir}/version.c - -libbind9.@SA@: ${OBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} - ${RANLIB} $@ - -libbind9.la: ${OBJS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libbind9.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${NSLIBS} ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} \ - @DNS_CRYPTO_LIBS@ ${LIBS} - -timestamp: libbind9.@A@ - touch timestamp - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} - -install:: timestamp installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libbind9.@A@ ${DESTDIR}${libdir} - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libbind9.@A@ - -clean distclean:: - rm -f libbind9.@A@ timestamp diff --git a/lib/bind9/include/Makefile.in b/lib/bind9/include/Makefile.in deleted file mode 100644 index b2b35623d0..0000000000 --- a/lib/bind9/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = bind9 -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/bind9/include/bind9/Makefile.in b/lib/bind9/include/bind9/Makefile.in deleted file mode 100644 index 247fbc59f2..0000000000 --- a/lib/bind9/include/bind9/Makefile.in +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -# -# Only list headers that are to be installed and are not -# machine generated. The latter are handled specially in the -# install target below. -# -HEADERS = check.h getaddresses.h version.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/bind9 - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/bind9 || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/bind9/$$i || exit 1; \ - done diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in deleted file mode 100644 index 6c206e571b..0000000000 --- a/lib/dns/Makefile.in +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -# Attempt to disable parallel processing. -.NOTPARALLEL: -.NO_PARALLEL: - -VERSION=@BIND9_VERSION@ -@BIND9_MAJOR@ - -@LIBDNS_MAPAPI@ - -@LIBDNS_API@ - -@BIND9_MAKE_INCLUDES@ - -USE_ISC_SPNEGO = @USE_ISC_SPNEGO@ - -CINCLUDES = -I. -I${top_srcdir}/lib/dns -Iinclude ${DNS_INCLUDES} \ - ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} @DST_GSSAPI_INC@ \ - ${JSON_C_CFLAGS} \ - ${LIBXML2_CFLAGS} \ - ${LMDB_CFLAGS} \ - ${MAXMINDDB_CFLAGS} - -CDEFINES = @USE_GSSAPI@ ${USE_ISC_SPNEGO} - -CWARNINGS = - -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -ISCDEPLIBS = ../../lib/isc/libisc.@A@ - -LIBS = ${MAXMINDDB_LIBS} ${LMDB_LIBS} @LIBS@ - -# Alphabetically - -DSTOBJS = @DST_EXTRA_OBJS@ \ - dst_api.@O@ dst_parse.@O@ dst_result.@O@ \ - gssapi_link.@O@ gssapictx.@O@ hmac_link.@O@ \ - openssl_link.@O@ openssldh_link.@O@ \ - opensslecdsa_link.@O@ openssleddsa_link.@O@ opensslrsa_link.@O@ \ - pkcs11rsa_link.@O@ \ - pkcs11ecdsa_link.@O@ pkcs11eddsa_link.@O@ pkcs11.@O@ \ - key.@O@ - -GEOIP2LINKOBJS = geoip2.@O@ - -DNSTAPOBJS = dnstap.@O@ dnstap.pb-c.@O@ - -# Alphabetically -DNSOBJS = acl.@O@ adb.@O@ badcache.@O@ byaddr.@O@ \ - cache.@O@ callbacks.@O@ catz.@O@ clientinfo.@O@ compress.@O@ \ - db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \ - dlz.@O@ dns64.@O@ dnsrps.@O@ dnssec.@O@ ds.@O@ dyndb.@O@ \ - ecs.@O@ fixedname.@O@ forward.@O@ \ - ipkeylist.@O@ iptable.@O@ journal.@O@ kasp.@O@ keydata.@O@ \ - keymgr.@O@ keytable.@O@ lib.@O@ log.@O@ lookup.@O@ \ - master.@O@ masterdump.@O@ message.@O@ \ - name.@O@ ncache.@O@ nsec.@O@ nsec3.@O@ nta.@O@ \ - order.@O@ peer.@O@ portlist.@O@ private.@O@ \ - rbt.@O@ rbtdb.@O@ rcode.@O@ rdata.@O@ \ - rdatalist.@O@ rdataset.@O@ rdatasetiter.@O@ rdataslab.@O@ \ - request.@O@ resolver.@O@ result.@O@ rootns.@O@ \ - rpz.@O@ rrl.@O@ rriterator.@O@ sdb.@O@ \ - sdlz.@O@ soa.@O@ ssu.@O@ ssu_external.@O@ \ - stats.@O@ tcpmsg.@O@ time.@O@ timer.@O@ tkey.@O@ \ - tsec.@O@ tsig.@O@ ttl.@O@ update.@O@ validator.@O@ \ - version.@O@ view.@O@ xfrin.@O@ zone.@O@ zonekey.@O@ \ - zoneverify.@O@ zt.@O@ -PORTDNSOBJS = client.@O@ ecdb.@O@ - -OBJS= @DNSTAPOBJS@ ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS} \ - ${PORTDNSOBJS} @GEOIP2LINKOBJS@ - -DSTSRCS = @DST_EXTRA_SRCS@ @PKCS11LINKSRCS@ \ - dst_api.c dst_parse.c \ - dst_result.c gssapi_link.c gssapictx.c hmac_link.c \ - openssl_link.c openssldh_link.c \ - opensslecdsa_link.c openssleddsa_link.c opensslrsa_link.c \ - pkcs11rsa_link.c \ - pkcs11ecdsa_link.c pkcs11eddsa_link.c pkcs11.c \ - key.c - -GEOIPL2INKSRCS = geoip2.c - -DNSTAPSRCS = dnstap.c dnstap.pb-c.c - -DNSSRCS = acl.c adb.c badcache. byaddr.c \ - cache.c callbacks.c clientinfo.c compress.c \ - db.c dbiterator.c dbtable.c diff.c dispatch.c \ - dlz.c dns64.c dnsrps.c dnssec.c ds.c dyndb.c \ - ecs.c fixedname.c forward.c ipkeylist.c iptable.c \ - journal.c kasp.c keydata.c keymgr.c keytable.c \ - lib.c log.c lookup.c master.c masterdump.c message.c \ - name.c ncache.c nsec.c nsec3.c nta.c \ - order.c peer.c portlist.c \ - rbt.c rbtdb.c rcode.c rdata.c rdatalist.c \ - rdataset.c rdatasetiter.c rdataslab.c request.c \ - resolver.c result.c rootns.c rpz.c rrl.c rriterator.c \ - sdb.c sdlz.c soa.c ssu.c ssu_external.c \ - stats.c tcpmsg.c time.c timer.c tkey.c \ - tsec.c tsig.c ttl.c update.c validator.c \ - version.c view.c xfrin.c zone.c zoneverify.c \ - zonekey.c zt.c ${OTHERSRCS} -PORTDNSSRCS = client.c ecdb.c - -SRCS = ${DSTSRCS} ${DNSSRCS} \ - ${PORTDNSSRCS} @DNSTAPSRCS@ @GEOIP2LINKSRCS@ - -SUBDIRS = include -TARGETS = timestamp -TESTDIRS = @UNITTESTS@ - -DEPENDEXTRA = ./gen -F include/dns/rdatastruct.h \ - -s ${srcdir} -d >> Makefile ; - -@BIND9_MAKE_RULES@ - -PROTOC_C = @PROTOC_C@ - -version.@O@: version.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DMAJOR=\"${MAJOR}\" \ - -DMAPAPI=\"${MAPAPI}\" \ - -DLIBINTERFACE=${LIBINTERFACE} \ - -DLIBREVISION=${LIBREVISION} \ - -DLIBAGE=${LIBAGE} \ - -c ${srcdir}/version.c - -libdns.@SA@: ${OBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} - ${RANLIB} $@ - -libdns.la: ${OBJS} - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libdns.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ ${LIBS} - -include: gen - ${MAKE} include/dns/enumtype.h - ${MAKE} include/dns/enumclass.h - ${MAKE} include/dns/rdatastruct.h - ${MAKE} code.h - -include/dns/enumtype.h: gen - ./gen -s ${srcdir} -t > $@ || { rm -f $@ ; exit 1; } - -include/dns/enumclass.h: gen - ./gen -s ${srcdir} -c > $@ || { rm -f $@ ; exit 1; } - -include/dns/rdatastruct.h: gen \ - ${srcdir}/rdata/rdatastructpre.h \ - ${srcdir}/rdata/rdatastructsuf.h - ./gen -s ${srcdir} -i \ - -P ${srcdir}/rdata/rdatastructpre.h \ - -S ${srcdir}/rdata/rdatastructsuf.h > $@ || \ - { rm -f $@ ; exit 1; } - -code.h: gen - ./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; } - -gen: gen.c - ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ - ${LFS_CFLAGS} ${LFS_LDFLAGS} \ - ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \ - ${BUILD_LIBS} ${LFS_LIBS} - -timestamp: include libdns.@A@ - touch timestamp - -testdirs: libdns.@A@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} - -install:: timestamp installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libdns.@A@ ${DESTDIR}${libdir} - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libdns.@A@ - -clean distclean:: - rm -f libdns.@A@ timestamp - rm -f gen code.h include/dns/enumtype.h include/dns/enumclass.h - rm -f include/dns/rdatastruct.h - rm -f dnstap.pb-c.c dnstap.pb-c.h - -newrr:: - rm -f code.h include/dns/enumtype.h include/dns/enumclass.h - rm -f include/dns/rdatastruct.h - -rdata.@O@: include - -depend: include -subdirs: include -${OBJS}: include - -# dnstap -dnstap.@O@: dnstap.c dnstap.pb-c.c - -dnstap.pb-c.c dnstap.pb-c.h: dnstap.proto - $(PROTOC_C) --c_out=. --proto_path ${srcdir} dnstap.proto - -dnstap.pb-c.@O@: dnstap.pb-c.c - -spnego.@O@: spnego_asn1.c spnego.h diff --git a/lib/dns/include/Makefile.in b/lib/dns/include/Makefile.in deleted file mode 100644 index 5467ea1473..0000000000 --- a/lib/dns/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = dns dst -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/dns/include/dns/Makefile.in b/lib/dns/include/dns/Makefile.in deleted file mode 100644 index c10a3b372b..0000000000 --- a/lib/dns/include/dns/Makefile.in +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -HEADERS = acl.h adb.h badcache.h bit.h byaddr.h \ - cache.h callbacks.h catz.h cert.h \ - client.h clientinfo.h compress.h \ - db.h dbiterator.h dbtable.h diff.h dispatch.h \ - dlz.h dlz_dlopen.h dns64.h dnsrps.h dnssec.h ds.h dsdigest.h \ - dnstap.h dyndb.h ecs.h \ - edns.h ecdb.h events.h fixedname.h forward.h geoip.h \ - ipkeylist.h iptable.h \ - journal.h kasp.h keydata.h keyflags.h keymgr.h keytable.h \ - keyvalues.h lib.h librpz.h lookup.h log.h master.h \ - masterdump.h message.h name.h ncache.h nsec.h nsec3.h nta.h \ - opcode.h order.h peer.h portlist.h private.h \ - rbt.h rcode.h rdata.h rdataclass.h rdatalist.h \ - rdataset.h rdatasetiter.h rdataslab.h rdatatype.h request.h \ - resolver.h result.h rootns.h rpz.h rriterator.h rrl.h \ - sdb.h sdlz.h secalg.h secproto.h soa.h ssu.h stats.h \ - tcpmsg.h time.h timer.h tkey.h tsec.h tsig.h ttl.h types.h \ - update.h validator.h version.h view.h xfrin.h \ - zone.h zonekey.h zoneverify.h zt.h - -GENHEADERS = enumclass.h enumtype.h rdatastruct.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/dns - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/dns || exit 1; \ - done - for i in ${GENHEADERS}; do \ - ${INSTALL_DATA} $$i ${DESTDIR}${includedir}/dns || exit 1; \ - done - -uninstall:: - for i in ${GENHEADERS}; do \ - rm -f ${DESTDIR}${includedir}/dns/$$i || exit 1; \ - done - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/dns/$$i || exit 1; \ - done diff --git a/lib/dns/include/dst/Makefile.in b/lib/dns/include/dst/Makefile.in deleted file mode 100644 index a60d4a93ec..0000000000 --- a/lib/dns/include/dst/Makefile.in +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -HEADERS = dst.h gssapi.h result.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/dst - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/dst || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/dst/$$i || exit 1; \ - done diff --git a/lib/dns/tests/Makefile.in b/lib/dns/tests/Makefile.in deleted file mode 100644 index fd8ebb97f4..0000000000 --- a/lib/dns/tests/Makefile.in +++ /dev/null @@ -1,270 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. -Iinclude ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} ${MAXMINDDB_CFLAGS} @CMOCKA_CFLAGS@ -CDEFINES = -DTESTS="\"${top_builddir}/lib/dns/tests/\"" - -ISCLIBS = ../../isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCDEPLIBS = ../../isc/libisc.@A@ -DNSLIBS = ../libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -DNSDEPLIBS = ../libdns.@A@ - -LIBS = @LIBS@ @CMOCKA_LIBS@ - -OBJS = dnstest.@O@ -SRCS = acl_test.c \ - db_test.c \ - dbdiff_test.c \ - dbiterator_test.c \ - dh_test.c \ - dispatch_test.c \ - dnstap_test.c \ - dst_test.c \ - dnstest.c \ - geoip_test.c \ - keytable_test.c \ - master_test.c \ - name_test.c \ - nsec3_test.c \ - peer_test.c \ - private_test.c \ - rbt_test.c \ - rbt_serialize_test.c \ - rdata_test.c \ - rdataset_test.c \ - rdatasetstats_test.c \ - resolver_test.c \ - result_test.c \ - rsa_test.c \ - sigs_test.c \ - time_test.c \ - tsig_test.c \ - update_test.c \ - zonemgr_test.c \ - zt_test.c - -SUBDIRS = -TARGETS = acl_test@EXEEXT@ \ - db_test@EXEEXT@ \ - dbdiff_test@EXEEXT@ \ - dbiterator_test@EXEEXT@ \ - dbversion_test@EXEEXT@ \ - dh_test@EXEEXT@ \ - dispatch_test@EXEEXT@ \ - dnstap_test@EXEEXT@ \ - dst_test@EXEEXT@ \ - geoip_test@EXEEXT@ \ - keytable_test@EXEEXT@ \ - master_test@EXEEXT@ \ - name_test@EXEEXT@ \ - nsec3_test@EXEEXT@ \ - peer_test@EXEEXT@ \ - private_test@EXEEXT@ \ - rbt_test@EXEEXT@ \ - rbt_serialize_test@EXEEXT@ \ - rdata_test@EXEEXT@ \ - rdataset_test@EXEEXT@ \ - rdatasetstats_test@EXEEXT@ \ - resolver_test@EXEEXT@ \ - result_test@EXEEXT@ \ - rsa_test@EXEEXT@ \ - sigs_test@EXEEXT@ \ - time_test@EXEEXT@ \ - tsig_test@EXEEXT@ \ - update_test@EXEEXT@ \ - zonemgr_test@EXEEXT@ \ - zt_test@EXEEXT@ - -@BIND9_MAKE_RULES@ - -LD_WRAP_TESTS=@LD_WRAP_TESTS@ - -acl_test@EXEEXT@: acl_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ acl_test.@O@ dnstest.@O@ ${DNSLIBS} \ - ${ISCLIBS} ${LIBS} - -db_test@EXEEXT@: db_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ db_test.@O@ dnstest.@O@ ${DNSLIBS} \ - ${ISCLIBS} ${LIBS} - -dbdiff_test@EXEEXT@: dbdiff_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ dbdiff_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -dbiterator_test@EXEEXT@: dbiterator_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ dbiterator_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -dbversion_test@EXEEXT@: dbversion_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ dbversion_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -dh_test@EXEEXT@: dh_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ dh_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -dispatch_test@EXEEXT@: dispatch_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ dispatch_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -dnstap_test@EXEEXT@: dnstap_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ dnstap_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -dst_test@EXEEXT@: dst_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ dst_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -geoip_test@EXEEXT@: geoip_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ geoip_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -keytable_test@EXEEXT@: keytable_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ keytable_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -master_test@EXEEXT@: master_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - test -d testdata || mkdir testdata - test -d testdata/master || mkdir testdata/master - ${PERL} ${srcdir}/mkraw.pl < ${srcdir}/testdata/master/master12.data.in \ - > testdata/master/master12.data - ${PERL} ${srcdir}/mkraw.pl < ${srcdir}/testdata/master/master13.data.in \ - > testdata/master/master13.data - ${PERL} ${srcdir}/mkraw.pl < ${srcdir}/testdata/master/master14.data.in \ - > testdata/master/master14.data - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ master_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -name_test@EXEEXT@: name_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ name_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -nsec3_test@EXEEXT@: nsec3_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ nsec3_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -peer_test@EXEEXT@: peer_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ peer_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -private_test@EXEEXT@: private_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ private_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rbt_serialize_test@EXEEXT@: rbt_serialize_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ rbt_serialize_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rbt_test@EXEEXT@: rbt_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ rbt_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rdata_test@EXEEXT@: rdata_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ rdata_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rdataset_test@EXEEXT@: rdataset_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ rdataset_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rdatasetstats_test@EXEEXT@: rdatasetstats_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ rdatasetstats_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -resolver_test@EXEEXT@: resolver_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ resolver_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -result_test@EXEEXT@: result_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ result_test.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -rsa_test@EXEEXT@: rsa_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ rsa_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -sigs_test@EXEEXT@: sigs_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ sigs_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -time_test@EXEEXT@: time_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ time_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -WRAP_OPTIONS = \ - -Wl,--wrap=isc__mem_put \ - -Wl,--wrap=isc__mem_get \ - -Wl,--wrap=isc_mem_attach \ - -Wl,--wrap=isc_mem_detach \ - -Wl,--wrap=isc__mem_putanddetach - -tsig_test@EXEEXT@: tsig_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ tsig_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -update_test@EXEEXT@: update_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ update_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -zonemgr_test@EXEEXT@: zonemgr_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ zonemgr_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -zt_test@EXEEXT@: zt_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ zt_test.@O@ dnstest.@O@ \ - ${DNSLIBS} ${ISCLIBS} ${LIBS} - -unit:: - sh ${top_builddir}/unit/unittest.sh - -clean distclean:: - rm -f ${TARGETS} - rm -f atf.out - rm -f testdata/master/master12.data testdata/master/master13.data \ - testdata/master/master14.data - rm -f zone.bin diff --git a/lib/irs/Makefile.in b/lib/irs/Makefile.in deleted file mode 100644 index 0326121077..0000000000 --- a/lib/irs/Makefile.in +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@LIBIRS_API@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. -I./include -I${srcdir}/include \ - ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${ISCCFG_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -# Alphabetically -OBJS = context.@O@ \ - dnsconf.@O@ \ - gai_strerror.@O@ getaddrinfo.@O@ getnameinfo.@O@ \ - resconf.@O@ - -# Alphabetically -SRCS = context.c \ - dnsconf.c \ - gai_strerror.c getaddrinfo.c getnameinfo.c \ - resconf.c - -LIBS = @LIBS@ - -SUBDIRS = include -TESTDIRS = @UNITTESTS@ -TARGETS = timestamp - -@BIND9_MAKE_RULES@ - -version.@O@: version.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DLIBINTERFACE=${LIBINTERFACE} \ - -DLIBREVISION=${LIBREVISION} \ - -DLIBAGE=${LIBAGE} \ - -c ${srcdir}/version.c - -libirs.@SA@: ${OBJS} version.@O@ - ${AR} ${ARFLAGS} $@ ${OBJS} version.@O@ - ${RANLIB} $@ - -libirs.la: ${OBJS} version.@O@ - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libirs.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} version.@O@ ${LIBS} - -timestamp: libirs.@A@ - touch timestamp - -testdirs: libirs.@A@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} - -install:: timestamp installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libirs.@A@ ${DESTDIR}${libdir} - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libirs.@A@ - -clean distclean:: - rm -f libirs.@A@ libirs.la timestamp diff --git a/lib/irs/include/Makefile.in b/lib/irs/include/Makefile.in deleted file mode 100644 index 36013315d2..0000000000 --- a/lib/irs/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = irs -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/irs/include/irs/Makefile.in b/lib/irs/include/irs/Makefile.in deleted file mode 100644 index b0c5e1414c..0000000000 --- a/lib/irs/include/irs/Makefile.in +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -# -# Only list headers that are to be installed and are not -# machine generated. The latter are handled specially in the -# install target below. -# -HEADERS = context.h dnsconf.h resconf.h types.h version.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/irs - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/irs || exit 1; \ - done - ${INSTALL_DATA} netdb.h ${DESTDIR}${includedir}/irs - ${INSTALL_DATA} platform.h ${DESTDIR}${includedir}/irs - -uninstall:: - rm -f ${DESTDIR}${includedir}/irs/platform.h - rm -f ${DESTDIR}${includedir}/irs/netdb.h - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/irs/$$i || exit 1; \ - done - -distclean:: - rm -f netdb.h platform.h diff --git a/lib/irs/tests/Makefile.in b/lib/irs/tests/Makefile.in deleted file mode 100644 index 508c139a34..0000000000 --- a/lib/irs/tests/Makefile.in +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. -Iinclude -I../include ${ISC_INCLUDES} ${IRS_INCLUDES} @CMOCKA_CFLAGS@ -CDEFINES = -DTESTS="\"${top_builddir}/lib/irs/tests/\"" - -CFGLIBS = ../../isccfg/libisccfg.@A@ -CFGDEPLIBS = ../../isccfg/libisccfg.@A@ -DNSLIBS = ../../dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -DNSDEPLIBS = ../../dns/libdns.@A@ -ISCLIBS = ../../isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCDEPLIBS = ../../isc/libisc.@A@ -IRSLIBS = ../libirs.@A@ -IRSDEPLIBS = ../libirs.@A@ - -LIBS = ${IRSLIBS} ${CFGLIBS} ${DNSLIBS} ${ISCLIBS} @LIBS@ @CMOCKA_LIBS@ - -OBJS = -SRCS = resconf_test.c - -SUBDIRS = -TARGETS = resconf_test@EXEEXT@ - -@BIND9_MAKE_RULES@ - -resconf_test@EXEEXT@: resconf_test.@O@ ${CFGDEPLIBS} ${DNSDEPLIBS} ${IRSDEPLIBS} ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ resconf_test.@O@ ${LIBS} - -unit:: - sh ${top_builddir}/unit/unittest.sh - -clean distclean:: - rm -f ${TARGETS} - rm -f atf.out diff --git a/lib/irs/win32/Makefile.in b/lib/irs/win32/Makefile.in deleted file mode 100644 index 419cf9f875..0000000000 --- a/lib/irs/win32/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = include -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/irs/win32/include/Makefile.in b/lib/irs/win32/include/Makefile.in deleted file mode 100644 index 36013315d2..0000000000 --- a/lib/irs/win32/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = irs -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/irs/win32/include/irs/Makefile.in b/lib/irs/win32/include/irs/Makefile.in deleted file mode 100644 index f73058fbc0..0000000000 --- a/lib/irs/win32/include/irs/Makefile.in +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -HEADERS = -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/irs - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/irs || exit 1; \ - done diff --git a/lib/isc/Makefile.in b/lib/isc/Makefile.in deleted file mode 100644 index e9df8d1e17..0000000000 --- a/lib/isc/Makefile.in +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@LIBISC_API@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/unix/include \ - -I${srcdir}/pthreads/include \ - -I./include \ - -I${srcdir}/include ${DNS_INCLUDES} \ - ${OPENSSL_CFLAGS} \ - ${JSON_C_CFLAGS} \ - ${LIBXML2_CFLAGS} \ - ${ZLIB_CFLAGS} -CDEFINES = -CWARNINGS = - -# Alphabetically -UNIXOBJS = unix/pk11_api.@O@ \ - unix/dir.@O@ unix/errno.@O@ \ - unix/errno2result.@O@ unix/file.@O@ unix/fsaccess.@O@ \ - unix/interfaceiter.@O@ unix/meminfo.@O@ \ - unix/net.@O@ unix/os.@O@ unix/resource.@O@ unix/socket.@O@ \ - unix/stdio.@O@ unix/stdtime.@O@ \ - unix/syslog.@O@ unix/time.@O@ - -THREADOBJS = pthreads/condition.@O@ pthreads/mutex.@O@ pthreads/thread.@O@ - -WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/errno.@O@ \ - win32/file.@O@ win32/fsaccess.@O@ \ - win32/meminfo.@O@ win32/once.@O@ \ - win32/stdtime.@O@ win32/thread.@O@ win32/time.@O@ - -# Alphabetically -OBJS = pk11.@O@ pk11_result.@O@ \ - aes.@O@ app.@O@ assertions.@O@ astack.@O@ \ - backtrace.@O@ base32.@O@ base64.@O@ \ - bind9.@O@ buffer.@O@ bufferlist.@O@ \ - commandline.@O@ counter.@O@ crc64.@O@ error.@O@ entropy.@O@ \ - event.@O@ glob.@O@ hash.@O@ ht.@O@ heap.@O@ hex.@O@ \ - hmac.@O@ hp.@O@ httpd.@O@ iterated_hash.@O@ \ - lex.@O@ lfsr.@O@ lib.@O@ log.@O@ \ - md.@O@ mem.@O@ mutexblock.@O@ \ - netmgr/netmgr.@O@ netmgr/tcp.@O@ netmgr/udp.@O@ \ - netmgr/tcpdns.@O@ netmgr/uverr2result.@O@ netmgr/uv-compat.@O@ \ - netaddr.@O@ netscope.@O@ nonce.@O@ openssl_shim.@O@ pool.@O@ \ - parseint.@O@ portset.@O@ queue.@O@ quota.@O@ \ - radix.@O@ random.@O@ ratelimiter.@O@ \ - region.@O@ regex.@O@ result.@O@ rwlock.@O@ \ - safe.@O@ serial.@O@ siphash.@O@ sockaddr.@O@ stats.@O@ \ - string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \ - tm.@O@ timer.@O@ version.@O@ \ - ${UNIXOBJS} ${THREADOBJS} - -# Alphabetically -SRCS = pk11.c pk11_result.c \ - aes.c app.c assertions.c astack.c \ - backtrace.c base32.c base64.c bind9.c \ - buffer.c bufferlist.c commandline.c counter.c crc64.c \ - entropy.c error.c event.c glob.c hash.c ht.c heap.c \ - hex.c hmac.c hp.c httpd.c iterated_hash.c \ - lex.c lfsr.c lib.c log.c \ - md.c mem.c mutexblock.c \ - netaddr.c netscope.c nonce.c openssl_shim.c pool.c \ - parseint.c portset.c queue.c quota.c radix.c random.c \ - ratelimiter.c region.c regex.c result.c rwlock.c \ - safe.c serial.c siphash.c sockaddr.c stats.c string.c \ - symtab.c task.c taskpool.c timer.c \ - tm.c version.c - -LIBS = ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} @LIBS@ - -# Note: the order of SUBDIRS is important. -# Attempt to disable parallel processing. -.NOTPARALLEL: -.NO_PARALLEL: -SUBDIRS = include netmgr unix pthreads -TARGETS = timestamp -TESTDIRS = @UNITTESTS@ - -@BIND9_MAKE_RULES@ - -version.@O@: version.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DLIBINTERFACE=${LIBINTERFACE} \ - -DLIBREVISION=${LIBREVISION} \ - -DLIBAGE=${LIBAGE} \ - -c ${srcdir}/version.c - -libisc.@SA@: ${OBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} - ${RANLIB} $@ - -libisc-nosymtbl.@SA@: ${OBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} - ${RANLIB} $@ - -libisc.la: ${OBJS} - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${LIBS} - -libisc-nosymtbl.la: ${OBJS} - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc-nosymtbl.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${LIBS} - -timestamp: libisc.@A@ libisc-nosymtbl.@A@ - touch timestamp - -testdirs: libisc.@A@ libisc-nosymtbl.@A@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} - -install:: timestamp installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libisc.@A@ ${DESTDIR}${libdir} - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libisc.@A@ - -clean distclean:: - rm -f libisc.@A@ libisc-nosymtbl.@A@ libisc.la \ - libisc-nosymtbl.la timestamp diff --git a/lib/isc/include/Makefile.in b/lib/isc/include/Makefile.in deleted file mode 100644 index 3b21e6e0b0..0000000000 --- a/lib/isc/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = isc pk11 pkcs11 -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/isc/include/isc/Makefile.in b/lib/isc/include/isc/Makefile.in deleted file mode 100644 index 9f63cfd199..0000000000 --- a/lib/isc/include/isc/Makefile.in +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -# -# Only list headers that are to be installed and are not -# machine generated. The latter are handled specially in the -# install target below. -# -HEADERS = aes.h app.h assertions.h astack.h atomic.h backtrace.h \ - base32.h base64.h bind9.h buffer.h bufferlist.h \ - commandline.h counter.h crc64.h deprecated.h endian.h \ - errno.h error.h event.h eventclass.h file.h \ - formatcheck.h fsaccess.h fuzz.h glob.h hash.h heap.h \ - hex.h hmac.h hp.h ht.h httpd.h interfaceiter.h \ - iterated_hash.h lang.h lex.h lfsr.h lib.h likely.h \ - list.h log.h magic.h md.h mem.h meminfo.h \ - mutexatomic.h mutexblock.h netaddr.h netmgr.h \ - netscope.h nonce.h os.h parseint.h pool.h portset.h \ - print.h queue.h quota.h radix.h random.h ratelimiter.h \ - refcount.h regex.h region.h resource.h result.h \ - resultclass.h rwlock.h safe.h serial.h siphash.h \ - sockaddr.h socket.h stats.h stdio.h strerr.h string.h \ - symtab.h task.h taskpool.h timer.h tm.h types.h util.h \ - version.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/isc - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/isc || exit 1; \ - done - ${INSTALL_DATA} platform.h ${DESTDIR}${includedir}/isc - -uninstall:: - rm -f ${DESTDIR}${includedir}/isc/platform.h - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/isc/$$i || exit 1; \ - done - -distclean:: - rm -f platform.h diff --git a/lib/isc/include/pk11/Makefile.in b/lib/isc/include/pk11/Makefile.in deleted file mode 100644 index 395c92435c..0000000000 --- a/lib/isc/include/pk11/Makefile.in +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -# -# Only list headers that are to be installed and are not -# machine generated. The latter are handled specially in the -# install target below. -# -HEADERS = constants.h internal.h pk11.h result.h site.h -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/pk11 - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/pk11 || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/pk11/$$i || exit 1; \ - done diff --git a/lib/isc/include/pkcs11/Makefile.in b/lib/isc/include/pkcs11/Makefile.in deleted file mode 100644 index 79a1583759..0000000000 --- a/lib/isc/include/pkcs11/Makefile.in +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -# -# Only list headers that are to be installed and are not -# machine generated. The latter are handled specially in the -# install target below. -# -HEADERS = pkcs11.h -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/pkcs11 - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/pkcs11 || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/pkcs11/$$i || exit 1; \ - done diff --git a/lib/isc/netmgr/Makefile.in b/lib/isc/netmgr/Makefile.in deleted file mode 100644 index f58caf5071..0000000000 --- a/lib/isc/netmgr/Makefile.in +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -CINCLUDES = -I${srcdir}/include \ - -I${srcdir}/../unix/include \ - -I${srcdir}/../pthreads/include \ - -I../include \ - -I${srcdir}/../include \ - -I${srcdir}/.. \ - ${OPENSSL_CFLAGS} \ - ${JSON_C_CFLAGS} \ - ${LIBXML2_CFLAGS} - -CDEFINES = -CWARNINGS = - -# Alphabetically -OBJS = netmgr.@O@ tcp.@O@ udp.@O@ tcpdns.@O@ uverr2result.@O@ uv-compat.@O@ - -# Alphabetically -SRCS = netmgr.c tcp.c udp.c tcpdns.c uverr2result.c uv-compat.c - -TARGETS = ${OBJS} - -@BIND9_MAKE_RULES@ diff --git a/lib/isc/pthreads/Makefile.in b/lib/isc/pthreads/Makefile.in deleted file mode 100644 index af4fd6ec29..0000000000 --- a/lib/isc/pthreads/Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -CINCLUDES = -I${srcdir}/include \ - -I${srcdir}/../unix/include \ - -I../include \ - -I${srcdir}/../include \ - -I${srcdir}/.. - -CDEFINES = -CWARNINGS = - -OBJS = condition.@O@ mutex.@O@ thread.@O@ - -SRCS = condition.c mutex.c thread.c - -SUBDIRS = include -TARGETS = ${OBJS} - -@BIND9_MAKE_RULES@ diff --git a/lib/isc/pthreads/include/Makefile.in b/lib/isc/pthreads/include/Makefile.in deleted file mode 100644 index d33c0fcb2c..0000000000 --- a/lib/isc/pthreads/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = isc -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/isc/pthreads/include/isc/Makefile.in b/lib/isc/pthreads/include/isc/Makefile.in deleted file mode 100644 index 185534f97e..0000000000 --- a/lib/isc/pthreads/include/isc/Makefile.in +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -HEADERS = condition.h mutex.h once.h thread.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/isc - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} $(srcdir)/$$i ${DESTDIR}${includedir}/isc || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/isc/$$i || exit 1; \ - done diff --git a/lib/isc/tests/Makefile.in b/lib/isc/tests/Makefile.in deleted file mode 100644 index 6f70b6d301..0000000000 --- a/lib/isc/tests/Makefile.in +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. -Iinclude ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} @CMOCKA_CFLAGS@ \ - ${JSON_C_CFLAGS} \ - ${LIBXML2_CFLAGS} \ - ${ZLIB_CFLAGS} -CDEFINES = -DTESTS="\"${top_builddir}/lib/isc/tests/\"" - -ISCLIBS = ../libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCDEPLIBS = ../libisc.@A@ - -LIBS = @LIBS@ @CMOCKA_LIBS@ - -OBJS = isctest.@O@ - -SRCS = isctest.c aes_test.c buffer_test.c \ - counter_test.c crc64_test.c errno_test.c file_test.c hash_test.c \ - heap_test.c hmac_test.c ht_test.c lex_test.c \ - mem_test.c md_test.c netaddr_test.c parse_test.c pool_test.c \ - quota_test.c radix_test.c random_test.c \ - regex_test.c result_test.c safe_test.c siphash_test.c sockaddr_test.c \ - socket_test.c socket_test.c symtab_test.c task_test.c \ - taskpool_test.c time_test.c timer_test.c - -SUBDIRS = -TARGETS = aes_test@EXEEXT@ buffer_test@EXEEXT@ \ - counter_test@EXEEXT@ crc64_test@EXEEXT@ \ - errno_test@EXEEXT@ file_test@EXEEXT@ \ - hash_test@EXEEXT@ heap_test@EXEEXT@ hmac_test@EXEEXT@ \ - ht_test@EXEEXT@ \ - lex_test@EXEEXT@ mem_test@EXEEXT@ md_test@EXEEXT@ \ - netaddr_test@EXEEXT@ parse_test@EXEEXT@ pool_test@EXEEXT@ \ - quota_test@EXEEXT@ radix_test@EXEEXT@ \ - random_test@EXEEXT@ regex_test@EXEEXT@ result_test@EXEEXT@ \ - safe_test@EXEEXT@ siphash_test@EXEEXT@ sockaddr_test@EXEEXT@ socket_test@EXEEXT@ \ - socket_test@EXEEXT@ symtab_test@EXEEXT@ task_test@EXEEXT@ \ - taskpool_test@EXEEXT@ time_test@EXEEXT@ timer_test@EXEEXT@ - -@BIND9_MAKE_RULES@ - -aes_test@EXEEXT@: aes_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ aes_test.@O@ \ - ${ISCLIBS} ${LIBS} - -buffer_test@EXEEXT@: buffer_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ buffer_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -counter_test@EXEEXT@: counter_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ counter_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -crc64_test@EXEEXT@: crc64_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ crc64_test.@O@ \ - ${ISCLIBS} ${LIBS} - -errno_test@EXEEXT@: errno_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ errno_test.@O@ \ - ${ISCLIBS} ${LIBS} - -file_test@EXEEXT@: file_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ file_test.@O@ \ - ${ISCLIBS} ${LIBS} - -hash_test@EXEEXT@: hash_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ hash_test.@O@ \ - ${ISCLIBS} ${LIBS} - -heap_test@EXEEXT@: heap_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ heap_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -hmac_test@EXEEXT@: hmac_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ hmac_test.@O@ \ - ${ISCLIBS} ${LIBS} - -ht_test@EXEEXT@: ht_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ ht_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -lex_test@EXEEXT@: lex_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ lex_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -md_test@EXEEXT@: md_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ md_test.@O@ \ - ${ISCLIBS} ${LIBS} - -mem_test@EXEEXT@: mem_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ mem_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -netaddr_test@EXEEXT@: netaddr_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ netaddr_test.@O@ \ - ${ISCLIBS} ${LIBS} - -parse_test@EXEEXT@: parse_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ parse_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -pool_test@EXEEXT@: pool_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ pool_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -quota_test@EXEEXT@: quota_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ quota_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -radix_test@EXEEXT@: radix_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ radix_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -random_test@EXEEXT@: random_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ random_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} -lm - -regex_test@EXEEXT@: regex_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ regex_test.@O@ \ - ${ISCLIBS} ${LIBS} - -result_test@EXEEXT@: result_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ result_test.@O@ \ - ${ISCLIBS} ${LIBS} - -safe_test@EXEEXT@: safe_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ safe_test.@O@ \ - ${ISCLIBS} ${LIBS} - -siphash_test@EXEEXT@: siphash_test.@O@ ../siphash.c ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ siphash_test.@O@ \ - ${ISCLIBS} ${LIBS} - -socket_test@EXEEXT@: socket_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ socket_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -sockaddr_test@EXEEXT@: sockaddr_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ sockaddr_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -symtab_test@EXEEXT@: symtab_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ symtab_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -task_test@EXEEXT@: task_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ task_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -taskpool_test@EXEEXT@: taskpool_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ taskpool_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -time_test@EXEEXT@: time_test.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ time_test.@O@ \ - ${ISCLIBS} ${LIBS} - -timer_test@EXEEXT@: timer_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ timer_test.@O@ isctest.@O@ \ - ${ISCLIBS} ${LIBS} - -unit:: - sh ${top_builddir}/unit/unittest.sh - -clean distclean:: - rm -f ${TARGETS} - rm -f atf.out diff --git a/lib/isc/unix/Makefile.in b/lib/isc/unix/Makefile.in deleted file mode 100644 index 5fd4f65f45..0000000000 --- a/lib/isc/unix/Makefile.in +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -CINCLUDES = -I${srcdir}/include \ - -I${srcdir}/../pthreads/include \ - -I../include \ - -I${srcdir}/../include \ - -I${srcdir}/.. \ - ${OPENSSL_CFLAGS} \ - ${JSON_C_CFLAGS} \ - ${LIBXML2_CFLAGS} - -CDEFINES = -CWARNINGS = - -# Alphabetically -OBJS = pk11_api.@O@ \ - dir.@O@ errno.@O@ errno2result.@O@ \ - file.@O@ fsaccess.@O@ interfaceiter.@O@ \ - meminfo.@O@ \ - net.@O@ os.@O@ resource.@O@ socket.@O@ stdio.@O@ stdtime.@O@ \ - syslog.@O@ time.@O@ - -# Alphabetically -SRCS = pk11_api.c \ - dir.c errno.c errno2result.c \ - file.c fsaccess.c interfaceiter.c meminfo.c \ - net.c os.c resource.c socket.c stdio.c stdtime.c \ - syslog.c time.c - -SUBDIRS = include -TARGETS = ${OBJS} - -@BIND9_MAKE_RULES@ - -interfaceiter.@O@: interfaceiter.c ifiter_getifaddrs.c diff --git a/lib/isc/unix/include/Makefile.in b/lib/isc/unix/include/Makefile.in deleted file mode 100644 index d33c0fcb2c..0000000000 --- a/lib/isc/unix/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = isc -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/isc/unix/include/isc/Makefile.in b/lib/isc/unix/include/isc/Makefile.in deleted file mode 100644 index 91387c74e7..0000000000 --- a/lib/isc/unix/include/isc/Makefile.in +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -HEADERS = align.h dir.h net.h netdb.h offset.h stat.h \ - stdatomic.h stdtime.h syslog.h time.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/isc - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} $(srcdir)/$$i ${DESTDIR}${includedir}/isc || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/isc/$$i || exit 1; \ - done diff --git a/lib/isc/win32/Makefile.in b/lib/isc/win32/Makefile.in deleted file mode 100644 index eb509b62ee..0000000000 --- a/lib/isc/win32/Makefile.in +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -CINCLUDES = -I${srcdir}/.. \ - -I./include \ - -I${srcdir}/include \ - -I${srcdir}/../include -CDEFINES = -CWARNINGS = - -# Alphabetically -OBJS = condition.@O@ dir.@O@ errno.@O@ file.@O@ \ - meminfo.@O@ fsaccess.@O@ \ - once.@O@ stdtime.@O@ thread.@O@ time.@O@ pk11_api.@O@ - -# Alphabetically -SRCS = condition.c dir.c errno.c file.c \ - meminfo.c once.c fsaccess.c \ - stdtime.c thread.c time.c pk11_api.c - -SUBDIRS = include -TARGETS = ${OBJS} - -@BIND9_MAKE_RULES@ diff --git a/lib/isc/win32/include/Makefile.in b/lib/isc/win32/include/Makefile.in deleted file mode 100644 index d33c0fcb2c..0000000000 --- a/lib/isc/win32/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = isc -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/isc/win32/include/isc/Makefile.in b/lib/isc/win32/include/isc/Makefile.in deleted file mode 100644 index 51b7a3aa4a..0000000000 --- a/lib/isc/win32/include/isc/Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -HEADERS = dir.h mutex.h net.h netdb.h once.h \ - stat.h stdtime.h thread.h time.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}\isc - -install:: installdirs - for i in $(HEADERS); do \ - $(INSTALL_DATA) $(srcdir)\$$i $(includedir)\isc || exit 1; \ - done diff --git a/lib/isccc/Makefile.in b/lib/isccc/Makefile.in deleted file mode 100644 index 78cf99dbd0..0000000000 --- a/lib/isccc/Makefile.in +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@LIBISCCC_API@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${ISCCC_INCLUDES} \ - ${OPENSSL_CFLAGS} - -CDEFINES = -CWARNINGS = - -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCCCLIBS = ../../lib/isccc/libisccc.@A@ - -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCCCDEPLIBS = libisccc.@A@ - -LIBS = @LIBS@ - -SUBDIRS = include - -# Alphabetically -OBJS = alist.@O@ base64.@O@ cc.@O@ ccmsg.@O@ \ - result.@O@ sexpr.@O@ symtab.@O@ version.@O@ - -# Alphabetically -SRCS = alist.c base64.c cc.c ccmsg.c \ - result.c sexpr.c symtab.c version.c - - -TARGETS = timestamp -TESTDIRS = @UNITTESTS@ - -@BIND9_MAKE_RULES@ - -version.@O@: version.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DLIBINTERFACE=${LIBINTERFACE} \ - -DLIBREVISION=${LIBREVISION} \ - -DLIBAGE=${LIBAGE} \ - -c ${srcdir}/version.c - -libisccc.@SA@: ${OBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} - ${RANLIB} $@ - -libisccc.la: ${OBJS} - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisccc.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${ISCLIBS} ${LIBS} - -timestamp: libisccc.@A@ - touch timestamp - -testdirs: libisccc.@A@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} - -install:: timestamp installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libisccc.@A@ ${DESTDIR}${libdir} - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libisccc.@A@ - -clean distclean:: - rm -f libisccc.@A@ timestamp diff --git a/lib/isccc/include/Makefile.in b/lib/isccc/include/Makefile.in deleted file mode 100644 index aea49d7502..0000000000 --- a/lib/isccc/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = isccc -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/isccc/include/isccc/Makefile.in b/lib/isccc/include/isccc/Makefile.in deleted file mode 100644 index d15e7ddb52..0000000000 --- a/lib/isccc/include/isccc/Makefile.in +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -# -# Only list headers that are to be installed and are not -# machine generated. The latter are handled specially in the -# install target below. -# -HEADERS = alist.h base64.h cc.h ccmsg.h events.h result.h \ - sexpr.h symtab.h symtype.h types.h util.h version.h -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/isccc - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/isccc || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/isccc/$$i || exit 1; \ - done diff --git a/lib/isccc/tests/Makefile.in b/lib/isccc/tests/Makefile.in deleted file mode 100644 index 67448f1a73..0000000000 --- a/lib/isccc/tests/Makefile.in +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -# Attempt to disable parallel processing. -.NOTPARALLEL: -.NO_PARALLEL: - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. -Iinclude ${ISCCC_INCLUDES} ${ISC_INCLUDES} @CMOCKA_CFLAGS@ -CDEFINES = - -ISCLIBS = ../../isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCDEPLIBS = ../../isc/libisc.@A@ -ISCCCLIBS = ../libisccc.@A@ -ISCCCDEPLIBS = ../libisccc.@A@ - -LIBS = @LIBS@ @CMOCKA_LIBS@ - -OBJS = -SRCS = result_test.c -SUBDIRS = -TARGETS = result_test@EXEEXT@ - -@BIND9_MAKE_RULES@ - -result_test@EXEEXT@: result_test.@O@ ${ISCDEPLIBS} ${ISCCCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ result_test.@O@ \ - ${ISCCCLIBS} ${ISCLIBS} ${LIBS} - -unit:: - sh ${top_builddir}/unit/unittest.sh - -clean distclean:: - rm -f ${TARGETS} - rm -f atf.out diff --git a/lib/isccfg/Makefile.in b/lib/isccfg/Makefile.in deleted file mode 100644 index d10ae8b4d0..0000000000 --- a/lib/isccfg/Makefile.in +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@LIBISCCFG_API@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} - -CDEFINES = -CWARNINGS = - -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCCFGLIBS = ../../lib/cfg/libisccfg.@A@ - -ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCCFGDEPLIBS = libisccfg.@A@ - -LIBS = @LIBS@ - -SUBDIRS = include -TESTDIRS = @UNITTESTS@ - -# Alphabetically -OBJS = aclconf.@O@ dnsconf.@O@ kaspconf.@O@ log.@O@ namedconf.@O@ \ - parser.@O@ version.@O@ - -# Alphabetically -SRCS = aclconf.c dnsconf.c kaspconf.c log.c namedconf.c \ - parser.c version.c - -TARGETS = timestamp - -@BIND9_MAKE_RULES@ - -version.@O@: version.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DLIBINTERFACE=${LIBINTERFACE} \ - -DLIBREVISION=${LIBREVISION} \ - -DLIBAGE=${LIBAGE} \ - -c ${srcdir}/version.c - -libisccfg.@SA@: ${OBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} - ${RANLIB} $@ - -libisccfg.la: ${OBJS} - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisccfg.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -timestamp: libisccfg.@A@ - touch timestamp - -testdirs: libisccfg.@A@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} - -install:: timestamp installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libisccfg.@A@ ${DESTDIR}${libdir} - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libisccfg.@A@ - -clean distclean:: - rm -f libisccfg.@A@ timestamp diff --git a/lib/isccfg/include/Makefile.in b/lib/isccfg/include/Makefile.in deleted file mode 100644 index b2d214722a..0000000000 --- a/lib/isccfg/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = isccfg -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/isccfg/include/isccfg/Makefile.in b/lib/isccfg/include/isccfg/Makefile.in deleted file mode 100644 index ecf6885e07..0000000000 --- a/lib/isccfg/include/isccfg/Makefile.in +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -# -# Only list headers that are to be installed and are not -# machine generated. The latter are handled specially in the -# install target below. -# -HEADERS = aclconf.h cfg.h dnsconf.h grammar.h log.h kaspconf.h \ - namedconf.h version.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/isccfg - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/isccfg || exit 1; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/isccfg/$$i || exit 1; \ - done diff --git a/lib/isccfg/tests/Makefile.in b/lib/isccfg/tests/Makefile.in deleted file mode 100644 index f0c4e6bf5f..0000000000 --- a/lib/isccfg/tests/Makefile.in +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I. -Iinclude \ - ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ - ${OPENSSL_CFLAGS} @CMOCKA_CFLAGS@ -CDEFINES = -DTESTS="\"${top_builddir}/lib/dns/tests/\"" - -ISCLIBS = ../../isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCDEPLIBS = ../../isc/libisc.@A@ -DNSLIBS = ../../dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -DNSDEPLIBS = ../../dns/libdns.@A@ -ISCCFGLIBS = ../libisccfg.@A@ -ISCCFGDEPLIBS = ../libisccfg.@A@ - -LIBS = @LIBS@ @CMOCKA_LIBS@ - -OBJS = -SRCS = duration_test.c parser_test.c - -SUBDIRS = -TARGETS = duration_test@EXEEXT@ parser_test@EXEEXT@ - -@BIND9_MAKE_RULES@ - -duration_test@EXEEXT@: duration_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ duration_test.@O@ \ - ${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -parser_test@EXEEXT@: parser_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} -o $@ parser_test.@O@ \ - ${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -unit:: - sh ${top_builddir}/unit/unittest.sh - -clean distclean:: - rm -f ${TARGETS} - rm -f atf.out diff --git a/lib/ns/Makefile.in b/lib/ns/Makefile.in deleted file mode 100644 index 97aaaf683c..0000000000 --- a/lib/ns/Makefile.in +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ -@BIND9_MAJOR@ - -@LIBNS_API@ - -@BIND9_MAKE_INCLUDES@ - -USE_ISC_SPNEGO = @USE_ISC_SPNEGO@ - -CINCLUDES = -I. -I${top_srcdir}/lib/ns -Iinclude \ - ${NS_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} @DST_GSSAPI_INC@ - -CDEFINES = -DNAMED_PLUGINDIR=\"${plugindir}\" - -CWARNINGS = - -ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} - -ISCDEPLIBS = ../../lib/isc/libisc.@A@ - -DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ - -DNSDEPLIBS = ../../lib/dns/libdns.@A@ - -LIBS = @LIBS@ - -# Alphabetically -OBJS = client.@O@ hooks.@O@ interfacemgr.@O@ lib.@O@ \ - listenlist.@O@ log.@O@ notify.@O@ query.@O@ \ - server.@O@ sortlist.@O@ stats.@O@ update.@O@ \ - version.@O@ xfrout.@O@ - -SRCS = client.c hooks.c interfacemgr.c lib.c listenlist.c \ - log.c notify.c query.c server.c sortlist.c stats.c \ - update.c version.c xfrout.c - -SUBDIRS = include -TESTDIRS = @UNITTESTS@ -TARGETS = timestamp - -SO_CFLAGS = @CFLAGS@ @SO_CFLAGS@ -SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@ - -@BIND9_MAKE_RULES@ - -version.@O@: version.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ - -DMAJOR=\"${MAJOR}\" \ - -DLIBINTERFACE=${LIBINTERFACE} \ - -DLIBREVISION=${LIBREVISION} \ - -DLIBAGE=${LIBAGE} \ - -c ${srcdir}/version.c - -libns.@SA@: ${OBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} - ${RANLIB} $@ - -libns.la: ${OBJS} - ${LIBTOOL_MODE_LINK} \ - ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libns.la -rpath ${libdir} \ - -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ ${LIBS} - -timestamp: libns.@A@ - touch timestamp - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} - -install:: timestamp installdirs - ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libns.@A@ \ - ${DESTDIR}${libdir} - -uninstall:: - ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libns.@A@ - -clean distclean:: - rm -f libns.@A@ timestamp diff --git a/lib/ns/include/Makefile.in b/lib/ns/include/Makefile.in deleted file mode 100644 index f2ba1dafdb..0000000000 --- a/lib/ns/include/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = ns -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/lib/ns/include/ns/Makefile.in b/lib/ns/include/ns/Makefile.in deleted file mode 100644 index 2009d9a73a..0000000000 --- a/lib/ns/include/ns/Makefile.in +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -HEADERS = client.h hooks.h interfacemgr.h lib.h listenlist.h log.h \ - notify.h query.h server.h sortlist.h stats.h \ - types.h update.h version.h xfrout.h -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/ns - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} ${srcdir}/$$i ${DESTDIR}${includedir}/ns || exit 1 ; \ - done - -uninstall:: - for i in ${HEADERS}; do \ - rm -f ${DESTDIR}${includedir}/ns/$$i || exit 1 ; \ - done diff --git a/lib/ns/tests/Makefile.in b/lib/ns/tests/Makefile.in deleted file mode 100644 index 70c77a44fa..0000000000 --- a/lib/ns/tests/Makefile.in +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -WRAP_INTERPOSE= @WRAP_INTERPOSE@ -WRAP_OPTIONS = -Wl,--wrap=isc_nmhandle_unref -WRAP_NAME = -Wl,-install_name,${top_builddir}/lib/ns/tests/$@ -WRAP_RPATH = -Wl,-rpath,${top_builddir}/lib/ns/tests -WRAP_LIB = -L${top_builddir}/lib/ns/tests -lwrap - -CINCLUDES = -I. -Iinclude ${NS_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \ - ${OPENSSL_CFLAGS} \ - @CMOCKA_CFLAGS@ -CDEFINES = -DTESTS="\"${top_builddir}/lib/ns/tests/\"" -DNAMED_PLUGINDIR=\"${plugindir}\" - -ISCLIBS = ../../isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCDEPLIBS = ../../isc/libisc.@A@ -DNSLIBS = ../../dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -DNSDEPLIBS = ../../dns/libdns.@A@ -NSLIBS = ../libns.@A@ -NSDEPLIBS = ../libns.@A@ - -LIBS = @LIBS@ @CMOCKA_LIBS@ - -SO_CFLAGS = @CFLAGS@ @SO_CFLAGS@ -SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@ - -SO_OBJS = wrap.@O@ -SO_SRCS = wrap.c -SO_TARGETS = libwrap.@SO@ - -OBJS = nstest.@O@ -SRCS = nstest.c \ - listenlist_test.c \ - notify_test.c \ - plugin_test.c \ - query_test.c - -SUBDIRS = -TARGETS = listenlist_test@EXEEXT@ \ - notify_test@EXEEXT@ \ - plugin_test@EXEEXT@ \ - query_test@EXEEXT@ \ - @SO_TARGETS@ - -LD_WRAP_TESTS=@LD_WRAP_TESTS@ - -@BIND9_MAKE_RULES@ - -libwrap.@SO@: wrap.@O@ - ${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} ${WRAP_INTERPOSE} @WRAP_NAME@ -o $@ wrap.@O@ ${LIBS} - -listenlist_test@EXEEXT@: listenlist_test.@O@ nstest.@O@ libwrap.@SO@ ${NSDEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS} - if test "${LD_WRAP_TESTS}" = true -a -z "${LIBTOOL}"; then WRAP="${WRAP_OPTIONS}"; fi; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} $${WRAP} ${WRAP_RPATH} -o $@ listenlist_test.@O@ nstest.@O@ \ - ${WRAP_LIB} ${NSLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -notify_test@EXEEXT@: notify_test.@O@ nstest.@O@ libwrap.@SO@ ${NSDEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS} - if test "${LD_WRAP_TESTS}" = true -a -z "${LIBTOOL}"; then WRAP="${WRAP_OPTIONS}"; fi; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} $${WRAP} ${WRAP_RPATH} -o $@ notify_test.@O@ nstest.@O@ \ - ${WRAP_LIB} ${NSLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -plugin_test@EXEEXT@: plugin_test.@O@ nstest.@O@ libwrap.@SO@ ${NSDEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS} - if test "${LD_WRAP_TESTS}" = true -a -z "${LIBTOOL}"; then WRAP="${WRAP_OPTIONS}"; fi; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} $${WRAP} ${WRAP_RPATH} -o $@ plugin_test.@O@ nstest.@O@ \ - ${WRAP_LIB} ${NSLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -query_test@EXEEXT@: query_test.@O@ nstest.@O@ libwrap.@SO@ ${NSDEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS} - if test "${LD_WRAP_TESTS}" = true -a -z "${LIBTOOL}"; then WRAP="${WRAP_OPTIONS}"; fi; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ - ${LDFLAGS} $${WRAP} ${WRAP_RPATH} -o $@ query_test.@O@ nstest.@O@ \ - ${WRAP_LIB} ${NSLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS} - -unit:: - sh ${top_builddir}/unit/unittest.sh - -clean distclean:: - rm -f ${TARGETS} - rm -f atf.out diff --git a/lib/samples/Makefile.in b/lib/samples/Makefile.in deleted file mode 100644 index 078d5ba1cb..0000000000 --- a/lib/samples/Makefile.in +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -VERSION=@BIND9_VERSION@ - -@BIND9_MAKE_INCLUDES@ - -CINCLUDES = -I${srcdir}/include -I../dns/include \ - ${DNS_INCLUDES} ${ISC_INCLUDES} \ - -I${top_srcdir}/lib/irs/include \ - -I../../lib/irs/include \ - ${OPENSSL_CFLAGS} - -CDEFINES = -DVERSION=\"${VERSION}\" \ - -DSYSCONFDIR=\"${sysconfdir}\" -CWARNINGS = - -ISCLIBS = ../isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -DNSLIBS = ../dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCCFGLIBS = ../isccfg/libisccfg.@A@ -IRSLIBS = ../irs/libirs.@A@ - -ISCDEPLIBS = ../isc/libisc.@A@ -DNSDEPLIBS = ../dns/libdns.@A@ -ISCCFGDEPLIBS = ../isccfg/libisccfg.@A@ -IRSDEPLIBS = ../irs/libirs.@A@ - -DEPLIBS = ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} - -LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ - -SUBDIRS = - -TARGETS = resolve@EXEEXT@ \ - sample-async@EXEEXT@ sample-gai@EXEEXT@ \ - sample-update@EXEEXT@ sample-request@EXEEXT@ nsprobe@EXEEXT@ - -OBJS = resolve.@O@ \ - sample-async.@O@ sample-gai.@O@ sample-update.@O@ \ - sample-request.@O@ nsprobe.@O@ - -UOBJS = - -SRCS = resolve.c \ - sample-async.c sample-gai.c sample-update.c \ - sample-request.c nsprobe.c - -MANPAGES = - -HTMLPAGES = - -MANOBJS = ${MANPAGES} ${HTMLPAGES} - -@BIND9_MAKE_RULES@ - -resolve@EXEEXT@: resolve.@O@ ${IRSDEPLIBS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - resolve.@O@ ${IRSLIBS} ${LIBS} - -sample-async@EXEEXT@: sample-async.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-async.@O@ ${LIBS} - -sample-gai@EXEEXT@: sample-gai.@O@ ${IRSDEPLIBS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-gai.@O@ ${IRSLIBS} ${LIBS} - -sample-update@EXEEXT@: sample-update.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-update.@O@ ${LIBS} - -sample-request@EXEEXT@: sample-request.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-request.@O@ ${LIBS} - -nsprobe@EXEEXT@: nsprobe.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - nsprobe.@O@ ${LIBS} - -doc man:: ${MANOBJS} - -docclean manclean maintainer-clean:: - rm -f ${MANOBJS} - -clean distclean maintainer-clean:: - rm -f ${TARGETS} - rm -f sample.key diff --git a/ltmain.sh b/ltmain.sh deleted file mode 100644 index 0f0a2da3f9..0000000000 --- a/ltmain.sh +++ /dev/null @@ -1,11147 +0,0 @@ -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 - -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES 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 . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: -# -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh -# -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - - -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! - -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac -fi - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () -{ - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result -} - - -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. - -: ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} - - -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## - -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s|\([`"$\\]\)|\\\1|g' - -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' - -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" - - -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: - -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath=$0 - -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` - -# Make sure we have an absolute progpath for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` - progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname - ;; - *) - _G_IFS=$IFS - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS=$_G_IFS - test -x "$progdir/$progname" && break - done - IFS=$_G_IFS - test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname - ;; -esac - - -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. - -opt_dry_run=false -opt_quiet=false -opt_verbose=false - -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: -} - - -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. - - -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. - - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd - - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd - - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT -# -------------------------------------------------------- -# Perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE -} - - -# func_grep EXPRESSION FILENAME -# ----------------------------- -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $debug_cmd - - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= - - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$_G_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - _G_dir_list=$_G_directory_path:$_G_dir_list - - # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` - done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$_G_dir" 2>/dev/null || : - done - IFS=$func_mkdir_p_IFS - - # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" - fi -} - - -# func_mktempdir [BASENAME] -# ------------------------- -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. -func_mktempdir () -{ - $debug_cmd - - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then - # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ - else - - # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - - if test ! -d "$_G_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ - - func_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" - fi - - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - - -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () -{ - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; - esac - - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" - ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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 . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; -# esac -# done -# -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll alse need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} - - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} - - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result -} - - -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () -{ - $debug_cmd - - func_parse_options_result= - - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; - - --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result -} - - -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () -{ - $debug_cmd - - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - func_run_hooks func_validate_options ${1+"$@"} - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result -} - - - -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. - - -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - - -# func_help -# --------- -# Echo long help message to standard output and exit. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message" - exit 0 -} - - -# func_missing_arg ARGNAME -# ------------------------ -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $debug_cmd - - func_error "Missing argument for '$1'." - exit_cmd=exit -} - - -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () -{ - $debug_cmd - - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} - - -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} - - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - - exit $? -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: - -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' - - -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. - -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' - - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi - - -# func_fatal_configuration ARG... -# ------------------------------- -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." -} - - -# func_config -# ----------- -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - - -# func_features -# ------------- -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test yes = "$build_libtool_libs"; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test yes = "$build_old_libs"; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - - -# func_enable_tag TAGNAME -# ----------------------- -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname=$1 - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf=/$re_begincf/,/$re_endcf/p - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -# func_check_version_match -# ------------------------ -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false - - nonopt= - preserve_args= - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result -} -func_add_hook func_options_prep libtool_options_prep - - -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () -{ - $debug_cmd - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - case $1 in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; - - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result -} -func_add_hook func_parse_options libtool_parse_options - - - -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift - fi - - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } - - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options - - -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift - - - -## ----------- ## -## Main. ## -## ----------- ## - -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if 'file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case $lalib_p_line in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test yes = "$lalib_p" -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $debug_cmd - - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# 'FILE.' does not work on cygwin managed mounts. -func_source () -{ - $debug_cmd - - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $debug_cmd - - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with '--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' - else - write_lobj=none - fi - - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $debug_cmd - - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $debug_cmd - - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $debug_cmd - - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $debug_cmd - - if test -z "$2" && test -n "$1"; then - func_error "Could not determine host file name corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result=$1 - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $debug_cmd - - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " '$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result=$3 - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $debug_cmd - - case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via '$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $debug_cmd - - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $debug_cmd - - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result=$1 -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via '$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $debug_cmd - - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $debug_cmd - - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result=$1 -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - -# func_mode_compile arg... -func_mode_compile () -{ - $debug_cmd - - # Get the compilation command and the source file. - base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg=$arg - arg_mode=normal - ;; - - target ) - libobj=$arg - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs=$IFS; IFS=, - for arg in $args; do - IFS=$save_ifs - func_append_quoted lastarg "$arg" - done - IFS=$save_ifs - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg=$srcfile - srcfile=$arg - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with '-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj=$func_basename_result - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from '$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name '$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test yes = "$build_old_libs"; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test yes = "$need_locks"; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test warn = "$need_locks"; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test no != "$pic_mode"; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test yes = "$compiler_c_o"; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test no != "$need_locks"; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a 'standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix '.c' with the -library object suffix, '.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to '-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the '--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE use a list of object files found in FILE to specify objects - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with '-') are ignored. - -Every other argument is treated as a filename. Files ending in '.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in '.la', then a libtool library is created, -only library objects ('.lo' files) may be specified, and '-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created -using 'ar' and 'ranlib', or on Windows using 'lib'. - -If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode '$opt_mode'" - ;; - esac - - echo - $ECHO "Try '$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test : = "$opt_help"; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - $SED '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $debug_cmd - - # The first argument is the command name. - cmd=$nonopt - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "'$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "'$file' was not linked with '-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir=$func_dirname_result - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir=$func_dirname_result - ;; - - *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic=$magic - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file=$progdir/$program - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file=$progdir/$program - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if $opt_dry_run; then - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - else - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd=\$cmd$args - fi -} - -test execute = "$opt_mode" && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $debug_cmd - - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "'$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument '$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the '-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the '$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the '$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the '$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $debug_cmd - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=false - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=: ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir=$func_dirname_result - destname=$func_basename_result - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "'$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir=$func_dirname_result - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking '$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname=$1 - shift - - srcname=$realname - test -n "$relink_command" && srcname=${realname}T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme=$stripme - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib=$destdir/$realname - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest=$destfile - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to '$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test yes = "$build_old_libs"; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext= - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=.exe - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" - - finalize=: - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test no = "$fast_install" && test -n "$relink_command"; then - $opt_dry_run || { - if $finalize; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink '$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file=$outputname - else - func_warning "cannot relink '$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name=$func_basename_result - - # Set up the ranlib parameters. - oldlib=$destdir/$name - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test install = "$opt_mode" && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms=${my_outputname}S.c - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* External symbol declarations for the compiler. */\ -" - - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp - $opt_dry_run || { - $RM $export_symbols - eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" - func_basename "$dlprefile" - name=$func_basename_result - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' - - # Transform the symbol file into the correct name. - symfileobj=$output_objdir/${my_outputname}S.$objext - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for '$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $debug_cmd - - win32_libid_type=unknown - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s|.*|import| - p - q - } - }'` - ;; - esac - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $debug_cmd - - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $debug_cmd - - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result= - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $debug_cmd - - my_gentop=$1; shift - my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib=$func_basename_result - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches; do - func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" - $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" - cd "unfat-$$/$darwin_base_archive-$darwin_arch" - func_extract_an_archive "`pwd`" "$darwin_base_archive" - cd "$darwin_curdir" - $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result=$my_oldobjs -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test yes = "$fast_install"; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - \$ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* declarations of non-ANSI functions */ -#if defined __MINGW32__ -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined __CYGWIN__ -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined other_platform || defined ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined _MSC_VER -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined __CYGWIN__ -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined other platforms ... */ -#endif - -#if defined PATH_MAX -# define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ -} while (0) - -#if defined LT_DEBUGWRAPPER -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - size_t tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined HAVE_DOS_BASED_FILE_SYSTEM - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined HAVE_DOS_BASED_FILE_SYSTEM - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = (size_t) (q - p); - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (STREQ (str, pat)) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - size_t len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - size_t orig_value_len = strlen (orig_value); - size_t add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - size_t len = strlen (new_value); - while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[--len] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $debug_cmd - - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $debug_cmd - - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # what system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - os2dllname= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=false - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module=$wl-single_module - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg=$1 - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir=$arg - prev= - continue - ;; - dlfiles|dlprefiles) - $preload || { - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=: - } - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test no = "$dlself"; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test dlprefiles = "$prev"; then - dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test dlfiles = "$prev"; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols=$arg - test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex=$arg - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - if test none != "$pic_object"; then - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - fi - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file '$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; - precious_regex) - precious_files_regex=$arg - prev= - continue - ;; - release) - release=-$arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test rpath = "$prev"; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds=$arg - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg=$arg - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test X-export-symbols = "X$arg"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" - else - func_fatal_error "need path for '-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test X-lc = "X$arg" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue - ;; - esac - elif test X-lc_r = "X$arg"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -mllvm) - prev=mllvm - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module=$wl-multi_module - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "'-no-install' is ignored for $host" - func_warning "assuming '-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -os2dllname) - prev=os2dllname - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -stdlib=* select c++ std lib with clang - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - test none = "$pic_object" || { - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - } - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test dlprefiles = "$prev"; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" - - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test lib = "$linkmode"; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=false - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test lib,link = "$linkmode,$pass"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs=$tmp_deplibs - fi - - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs - deplibs= - fi - if test prog = "$linkmode"; then - case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test lib,dlpreopen = "$linkmode,$pass"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs=$dlprefiles - fi - if test dlopen = "$pass"; then - # Collect dlpreopened libraries - save_deplibs=$deplibs - deplibs= - fi - - for deplib in $libs; do - lib= - found=false - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test lib = "$linkmode"; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib=$searchdir/lib$name$search_ext - if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: - else - found=false - fi - break 2 - fi - done - done - if $found; then - # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library"; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - *.ltframework) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test conv = "$pass" && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - if test scan = "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "'-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test link = "$pass"; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=false - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: - fi - ;; - pass_all) - valid_a_lib=: - ;; - esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - fi - ;; - esac - continue - ;; - prog) - if test link != "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=: - continue - ;; - esac # case $deplib - - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir=$func_dirname_result - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test conv = "$pass"; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib=$l - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - - # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" - if test -z "$dlname" || - test yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of '$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir - fi - ;; - esac - func_basename "$lib" - laname=$func_basename_result - - # Find the relevant object directory and library name. - if test yes = "$installed"; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir - else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir - fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir=$ladir - absdir=$abs_ladir - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" - fi - case $host in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test lib = "$linkmode"; then - deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test prog = "$linkmode" && test link != "$pass"; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if $linkalldeplibs; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test prog,link = "$linkmode,$pass"; then - if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then - # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then - use_static_libs=no - fi - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test no = "$installed"; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest - break - fi - done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then - echo - if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname=$1 - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname=$dlname - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - esac - eval soname=\"$soname_spec\" - else - soname=$realname - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot=$soname - func_basename "$soroot" - soname=$func_basename_result - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from '$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for '$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test prog = "$linkmode" || test relink != "$opt_mode"; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib - case $host in - *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; - *-*-sysv4*uw2*) add_dir=-L$dir ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add=$dir/$old_library - fi - elif test -n "$old_library"; then - add=$dir/$old_library - fi - fi - esac - elif test no = "$hardcode_minus_L"; then - case $host in - *-*-sunos*) add_shlibpath=$dir ;; - esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - relink) - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$absdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test yes != "$lib_linked"; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test prog = "$linkmode"; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test prog = "$linkmode" || test relink = "$opt_mode"; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add=-l$name - elif test yes = "$hardcode_automatic"; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib"; then - add=$inst_prefix_dir$libdir/$linklib - else - add=$libdir/$linklib - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - fi - - if test prog = "$linkmode"; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test prog = "$linkmode"; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test yes = "$build_libtool_libs"; then - # Not a shared library - if test pass_all != "$deplibs_check_method"; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test lib = "$linkmode"; then - if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs=$temp_deplibs - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test no != "$link_all_deplibs"; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path=$deplib ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of '$dir'" - absdir=$dir - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names"; then - for tmp in $deplibrary_names; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl"; then - depdepl=$absdir/$objdir/$depdepl - darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" - path= - fi - fi - ;; - *) - path=-L$absdir/$objdir - ;; - esac - else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test dlopen != "$pass"; then - test conv = "$pass" || { - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - } - - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" - else - vars=deplibs - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i= - ;; - esac - if test -n "$i"; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles - fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "'-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs=$output - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form 'libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" - - if test no != "$need_lib_prefix"; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" - - install_libdir=$1 - - oldlibs= - if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then - # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs=$IFS; IFS=: - set dummy $vinfo 0 0 0 - shift - IFS=$save_ifs - - test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major=$1 - number_minor=$2 - number_revision=$3 - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # that has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_minor - lt_irix_increment=no - ;; - esac - ;; - no) - current=$1 - revision=$2 - age=$3 - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT '$current' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION '$revision' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE '$age' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE '$age' is greater than the current interface number '$current'" - func_fatal_error "'$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac - ;; - - freebsd-aout) - major=.$current - versuffix=.$current.$revision - ;; - - freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - irix | nonstopux) - if test no = "$lt_irix_increment"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring=$verstring_prefix$major.$revision - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test 0 -ne "$loop"; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring_prefix$major.$iface:$verstring - done - - # Before this point, $major must not contain '.'. - major=.$major - versuffix=$major.$revision - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision - - # Add in all the interfaces that we are compatible with. - loop=$age - while test 0 -ne "$loop"; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring:$iface.0 - done - - # Make executables depend on our current version. - func_append verstring ":$current.0" - ;; - - qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current - ;; - - sunos) - major=.$current - versuffix=.$current.$revision - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - - *) - func_fatal_configuration "unknown library version type '$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring=0.0 - ;; - esac - if test no = "$need_version"; then - versuffix= - else - versuffix=.0.0 - fi - fi - - # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then - major= - versuffix= - verstring= - fi - - # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi - fi - else - # Don't allow undefined symbols. - allow_undefined_flag=$no_undefined_flag - fi - - fi - - func_generate_dlsyms "$libname" "$libname" : - func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= - - if test relink != "$opt_mode"; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles=$dlfiles - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test yes = "$build_libtool_libs"; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release= - versuffix= - major= - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib=$potent_lib - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib= - ;; - esac - fi - if test -n "$a_deplib"; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib=$potent_lib # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs= - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test none = "$deplibs_check_method"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test yes = "$droppeddeps"; then - if test yes = "$module"; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test no = "$allow_undefined"; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs=$new_libs - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test yes = "$hardcode_into_libs"; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname=$1 - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname=$realname - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib=$output_objdir/$realname - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols=$output_objdir/$libname.uexp - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols=$export_symbols - export_symbols= - always_export_symbols=yes - } - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs=$IFS; IFS='~' - for cmd1 in $cmds; do - IFS=$save_ifs - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test yes = "$try_normal_branch" \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=$output_objdir/$output_la.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs=$tmp_deplibs - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test : != "$skipped_export" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test yes = "$compiler_needs_object"; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test -z "$objlist" || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test 1 -eq "$k"; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-$k.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - } - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' - for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - ${skipped_export-false} && { - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - } - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs=$IFS; IFS='~' - for cmd in $cmds; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then - # On all known operating systems, these are identical. - dlname=$soname - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "'-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object '$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj=$output - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags - else - gentop=$output_objdir/${obj}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - - # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - - output=$obj - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - test yes = "$build_libtool_libs" || { - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - } - - if test -n "$pic_flag" || test default != "$pic_mode"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output=$libobj - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "'-release' is ignored for programs" - - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs=$new_libs - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath=$rpath - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath=$rpath - - if test -n "$libobjs" && test yes = "$build_old_libs"; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" false - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=: - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false - ;; - *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false - ;; - *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false - fi - ;; - esac - $wrappers_required || { - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' - fi - - exit $exit_status - } - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test yes = "$no_install"; then - # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource=$output_path/$objdir/lt-$output_name.c - cwrapper=$output_path/$output_name.exe - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host"; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience - build_libtool_libs=no - ;; - *) - oldobjs="$old_deplibs $non_pic_objects" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac - - if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase=$func_basename_result - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test -z "$oldobjs"; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test yes = "$installed"; then - if test -z "$install_libdir"; then - break - fi - output=$output_objdir/${outputname}i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name=$func_basename_result - func_resolve_sysroot "$deplib" - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs=$newdependency_libs - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles=$newdlprefiles - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles=$newdlprefiles - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that cannot go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $debug_cmd - - RM=$nonopt - files= - rmforce=false - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=: ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir - else - odir=$dir/$objdir - fi - func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir - - # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif $rmforce; then - continue - fi - - rmfiles=$file - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case $opt_mode in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test clean = "$opt_mode"; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the $objdir's in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi - -test -z "$opt_mode" && { - help=$generic_help - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/m4/libtool.m4 b/m4/libtool.m4 deleted file mode 100644 index a3bc337b79..0000000000 --- a/m4/libtool.m4 +++ /dev/null @@ -1,8369 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 . -]) - -# serial 58 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_PREPARE_CC_BASENAME -# ----------------------- -m4_defun([_LT_PREPARE_CC_BASENAME], [ -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} -])# _LT_PREPARE_CC_BASENAME - - -# _LT_CC_BASENAME(CC) -# ------------------- -# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -# but that macro is also expanded into generated libtool script, which -# arranges for $SED and $ECHO to be set by different means. -m4_defun([_LT_CC_BASENAME], -[m4_require([_LT_PREPARE_CC_BASENAME])dnl -AC_REQUIRE([_LT_DECL_SED])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -func_cc_basename $1 -cc_basename=$func_cc_basename_result -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl -m4_require([_LT_CMD_TRUNCATE])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from 'configure', and 'config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# 'config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain=$ac_aux_dir/ltmain.sh -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the 'libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to 'config.status' so that its -# declaration there will have the same value as in 'configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags='_LT_TAGS'dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into 'config.status', and then the shell code to quote escape them in -# for loops in 'config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# '#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test 0 = "$lt_write_fail" && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test 0 != $[#] -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -_LT_COPYING -_LT_LIBTOOL_TAGS - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -_LT_PREPARE_MUNGE_PATH_LIST -_LT_PREPARE_CC_BASENAME - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS=$save_LDFLAGS - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test yes = "$lt_cv_ld_force_load"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script that will find a shell with a builtin -# printf (that we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case $ECHO in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS -]) - -if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes = "$cross_compiling"; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links=nottested -if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test no = "$hard_links"; then - AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", - [Define to the sub-directory where libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then - - # We can hardcode non-existent directories. - if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && - test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || - test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_PREPARE_MUNGE_PATH_LIST -# --------------------------- -# Make sure func_munge_path_list() is defined correctly. -m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -[[# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} -]])# _LT_PREPARE_PATH_LIST - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -[User-defined run-time library search path.]) - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a[(]lib.so.V[)]' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], - [Detected run-time system search path for libraries]) -_LT_DECL([], [configure_time_lt_sys_library_path], [2], - [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program that can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program that can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi]) -rm -f conftest.i conftest2.i conftest.out]) -])# _LT_PATH_DD - - -# _LT_CMD_TRUNCATE -# ---------------- -# find command to truncate a binary pipe -m4_defun([_LT_CMD_TRUNCATE], -[m4_require([_LT_PATH_DD]) -AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], - [Command to truncate a binary pipe]) -])# _LT_CMD_TRUNCATE - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# _LT_DLL_DEF_P([FILE]) -# --------------------- -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with func_dll_def_p in the libtool script -AC_DEFUN([_LT_DLL_DEF_P], -[dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -])# _LT_DLL_DEF_P - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], - [Transform the output of nm into a list of symbols to manually relocate]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], - [The name lister interface]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test yes = "$GCC"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS=$save_LDFLAGS]) - if test yes = "$lt_cv_irix_exported_symbol"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(ld_shlibs, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - osf3*) - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting $shlibpath_var if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC=$CC -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report what library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC=$lt_save_CC -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - - _LT_TAGVAR(GCC, $1)=$GXX - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)=$prev$p - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)=$p - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)=$p - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$G77 - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code=$lt_simple_compile_test_code - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f "$lt_ac_sed" && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test 10 -lt "$lt_ac_count" && break - lt_ac_count=`expr $lt_ac_count + 1` - if test "$lt_ac_count" -gt "$lt_ac_max"; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine what file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 deleted file mode 100644 index 94b0829766..0000000000 --- a/m4/ltoptions.m4 +++ /dev/null @@ -1,437 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 8 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option '$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl 'shared' nor 'disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], - [_LT_WITH_AIX_SONAME([aix])]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the 'shared' and -# 'disable-shared' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the 'static' and -# 'disable-static' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the 'fast-install' -# and 'disable-fast-install' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_AIX_SONAME([DEFAULT]) -# ---------------------------------- -# implement the --with-aix-soname flag, and support the `aix-soname=aix' -# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -m4_define([_LT_WITH_AIX_SONAME], -[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[[5-9]]*,yes) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - AC_ARG_WITH([aix-soname], - [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], - [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], - [case $withval in - aix|svr4|both) - ;; - *) - AC_MSG_ERROR([Unknown argument to --with-aix-soname]) - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname], - [AC_CACHE_VAL([lt_cv_with_aix_soname], - [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) - with_aix_soname=$lt_cv_with_aix_soname]) - AC_MSG_RESULT([$with_aix_soname]) - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - -_LT_DECL([], [shared_archive_member_spec], [0], - [Shared archive member basename, for filename based shared library versioning on AIX])dnl -])# _LT_WITH_AIX_SONAME - -LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' -# LT_INIT options. -# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [pic_mode=m4_default([$1], [default])]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 deleted file mode 100644 index 48bc9344a4..0000000000 --- a/m4/ltsugar.m4 +++ /dev/null @@ -1,124 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59, which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 deleted file mode 100644 index fa04b52a3b..0000000000 --- a/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 4179 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 deleted file mode 100644 index c6b26f88f6..0000000000 --- a/m4/lt~obsolete.m4 +++ /dev/null @@ -1,99 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/make/Makefile.in b/make/Makefile.in deleted file mode 100644 index 1c2b35ee0b..0000000000 --- a/make/Makefile.in +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS= -TARGETS= - -@BIND9_MAKE_RULES@ - -distclean:: - rm -f rules mkdep includes diff --git a/util/copyrights b/util/copyrights index 52f9588a67..e132f70d0f 100644 --- a/util/copyrights +++ b/util/copyrights @@ -156,7 +156,6 @@ ./bin/dnssec/win32/verify.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/dnssec/win32/verify.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dnssec/win32/verify.vcxproj.user X 2013,2018,2019,2020 -./bin/named/Makefile.in MAKE 1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019 ./bin/named/bind9.xsl SGML 2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/bind9.xsl.h X 2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/builtin.c C 2001,2002,2003,2004,2005,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -2019,8 +2018,6 @@ ./lib/isc/hp.c C 2019,2020 ./lib/isc/ht.c C 2016,2017,2018,2019,2020 ./lib/isc/httpd.c C 2006,2007,2008,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/isc/include/Makefile.in MAKE 1998,1999,2000,2001,2004,2007,2012,2014,2016,2018,2019 -./lib/isc/include/isc/Makefile.in MAKE 1998,1999,2000,2001,2003,2004,2005,2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019 ./lib/isc/include/isc/aes.h C 2014,2016,2018,2019,2020 ./lib/isc/include/isc/app.h C 1999,2000,2001,2004,2005,2006,2007,2009,2013,2014,2015,2016,2018,2019,2020 ./lib/isc/include/isc/assertions.h C 1997,1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2016,2017,2018,2019,2020 @@ -2140,7 +2137,6 @@ ./lib/isc/pk11_result.c C 2014,2015,2016,2018,2019,2020 ./lib/isc/pool.c C 2013,2015,2016,2018,2019,2020 ./lib/isc/portset.c C 2008,2016,2017,2018,2019,2020 -./lib/isc/pthreads/Makefile.in MAKE 1998,1999,2000,2001,2004,2007,2009,2012,2016,2018,2019 ./lib/isc/pthreads/condition.c C 1998,1999,2000,2001,2004,2005,2007,2012,2016,2018,2019,2020 ./lib/isc/pthreads/include/isc/condition.h C 1998,1999,2000,2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isc/pthreads/include/isc/mutex.h C 1998,1999,2000,2001,2002,2004,2005,2007,2016,2018,2019,2020 @@ -2242,8 +2238,6 @@ ./lib/isc/win32/errno2result.h C 2000,2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isc/win32/file.c C 2000,2001,2002,2004,2007,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isc/win32/fsaccess.c C 2000,2001,2002,2004,2007,2013,2016,2017,2018,2019,2020 -./lib/isc/win32/include/Makefile.in MAKE 1999,2000,2001,2004,2007,2012,2014,2016,2018,2019 -./lib/isc/win32/include/isc/Makefile.in MAKE 1999,2000,2001,2004,2007,2012,2013,2014,2015,2016,2018,2019 ./lib/isc/win32/include/isc/align.h C 2019,2020 ./lib/isc/win32/include/isc/bind_registry.h C 2001,2004,2007,2016,2018,2019,2020 ./lib/isc/win32/include/isc/bindevt.h C 2001,2004,2007,2016,2018,2019,2020 From 978c7b2e89aa37a7ddfe2f6b6ba12ce73dd04528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 7 Aug 2018 16:46:53 +0200 Subject: [PATCH 3/3] Complete rewrite the BIND 9 build system The rewrite of BIND 9 build system is a large work and cannot be reasonable split into separate merge requests. Addition of the automake has a positive effect on the readability and maintainability of the build system as it is more declarative, it allows conditional and we are able to drop all of the custom make code that BIND 9 developed over the years to overcome the deficiencies of autoconf + custom Makefile.in files. This squashed commit contains following changes: - conversion (or rather fresh rewrite) of all Makefile.in files to Makefile.am by using automake - the libtool is now properly integrated with automake (the way we used it was rather hackish as the only official way how to use libtool is via automake - the dynamic module loading was rewritten from a custom patchwork to libtool's libltdl (which includes the patchwork to support module loading on different systems internally) - conversion of the unit test executor from kyua to automake parallel driver - conversion of the system test executor from custom make/shell to automake parallel driver - The GSSAPI has been refactored, the custom SPNEGO on the basis that all major KRB5/GSSAPI (mit-krb5, heimdal and Windows) implementations support SPNEGO mechanism. - The various defunct tests from bin/tests have been removed: bin/tests/optional and bin/tests/pkcs11 - The text files generated from the MD files have been removed, the MarkDown has been designed to be readable by both humans and computers - The xsl header is now generated by a simple sed command instead of perl helper - The header has been removed - cleanups of configure.ac script to make it more simpler, addition of multiple macros (there's still work to be done though) - the tarball can now be prepared with `make dist` - the system tests are partially able to run in oot build Here's a list of unfinished work that needs to be completed in subsequent merge requests: - `make distcheck` doesn't yet work (because of system tests oot run is not yet finished) - documentation is not yet built, there's a different merge request with docbook to sphinx-build rst conversion that needs to be rebased and adapted on top of the automake - msvc build is non functional yet and we need to decide whether we will just cross-compile bind9 using mingw-w64 or fix the msvc build - contributed dlz modules are not included neither in the autoconf nor automake --- .gitignore | 3 + .gitlab-ci.yml | 96 +- AUTHORS | 53 + CODE_OF_CONDUCT | 79 - CONTRIBUTING | 196 -- COPYING | 1 + ChangeLog | 1 + HISTORY | 615 ------ Kyuafile | 4 - Makefile.am | 11 + Makefile.tests | 10 + Makefile.top | 79 + NEWS | 1 + OPTIONS | 28 - PLATFORMS | 99 - README | 369 ---- README.md | 17 +- bin/Makefile.am | 5 + bin/check/Makefile.am | 34 + bin/check/named-checkconf.c | 7 +- bin/check/named-checkzone.c | 7 +- bin/confgen/Makefile.am | 30 + bin/confgen/ddns-confgen.c | 5 +- bin/confgen/rndc-confgen.c | 5 +- bin/confgen/util.h | 6 +- bin/delv/Makefile.am | 21 + bin/delv/delv.c | 8 +- bin/dig/Makefile.am | 30 + bin/dig/dig.c | 18 +- bin/dig/dighost.c | 2 +- bin/dig/{include/dig/dig.h => dighost.h} | 170 +- bin/dig/host.c | 9 +- bin/dig/nslookup.c | 9 +- bin/dnssec/Makefile.am | 38 + bin/dnssec/dnssec-cds.c | 7 +- bin/dnssec/dnssec-dsfromkey.c | 5 +- bin/dnssec/dnssec-importkey.c | 7 +- bin/dnssec/dnssec-keyfromlabel.c | 7 +- bin/dnssec/dnssec-keygen.c | 7 +- bin/dnssec/dnssec-revoke.c | 7 +- bin/dnssec/dnssec-settime.c | 7 +- bin/dnssec/dnssec-signzone.c | 9 +- bin/dnssec/dnssec-verify.c | 7 +- bin/dnssec/dnssectool.c | 2 +- bin/dnssec/dnssectool.h | 10 +- bin/named/.gitignore | 2 +- bin/named/Makefile.am | 109 + bin/named/bind9.xsl.h | 1272 ------------ bin/named/builtin.c | 2 +- bin/named/controlconf.c | 4 +- bin/named/convertxsl.pl | 51 - bin/named/include/named/globals.h | 12 +- bin/named/include/named/main.h | 12 +- bin/named/main.c | 37 +- bin/named/server.c | 27 +- bin/named/statschannel.c | 10 +- bin/named/unix/dlz_dlopen_driver.c | 86 +- bin/named/win32/dlz_dlopen_driver.c | 9 - bin/named/win32/include/named/ntservice.h | 6 +- bin/named/win32/ntservice.c | 4 +- lib/ns/version.c => bin/named/xsl_p.h | 10 +- bin/nsupdate/Makefile.am | 25 + bin/nsupdate/nsupdate.c | 79 +- bin/pkcs11/Makefile.am | 13 + bin/plugins/Makefile.am | 12 + bin/plugins/filter-aaaa.c | 7 + bin/rndc/Makefile.am | 26 + bin/rndc/rndc.c | 7 +- bin/rndc/util.h | 6 +- bin/tests/.gitignore | 1 - bin/tests/Makefile.am | 1 + bin/tests/bigtest/README | 18 - bin/tests/bigtest/buildzones.sh | 267 --- bin/tests/bigtest/rndc.key | 5 - bin/tests/bigtest/tests.sh | 76 - bin/tests/bigtest/zones | 18 - bin/tests/optional/.gitignore | 3 - .../optional/Kchild.example.+005+33180.key | 5 - .../Kchild.example.+005+33180.private | 13 - bin/tests/optional/adb_test.c | 413 ---- bin/tests/optional/backtrace_test.c | 54 - bin/tests/optional/byaddr_test.c | 252 --- bin/tests/optional/byname_test.c | 354 ---- bin/tests/optional/db_test.c | 978 --------- bin/tests/optional/fsaccess_test.c | 67 - bin/tests/optional/gsstest.c | 562 ----- bin/tests/optional/inter_test.c | 131 -- bin/tests/optional/lex_test.c | 157 -- bin/tests/optional/lfsr_test.c | 91 - bin/tests/optional/log_test.c | 343 --- bin/tests/optional/master_test.c | 86 - bin/tests/optional/mempool_test.c | 118 -- bin/tests/optional/name_test.c | 360 ---- bin/tests/optional/nsecify.c | 215 -- bin/tests/optional/ratelimiter_test.c | 138 -- bin/tests/optional/rbt_test.c | 429 ---- bin/tests/optional/rbt_test.out | 395 ---- bin/tests/optional/rbt_test.txt | 85 - bin/tests/optional/rwlock_test.c | 128 -- bin/tests/optional/serial_test.c | 43 - bin/tests/optional/shutdown_test.c | 226 -- bin/tests/optional/sig0_test.c | 288 --- bin/tests/optional/sock_test.c | 400 ---- bin/tests/optional/sym_test.c | 120 -- bin/tests/optional/task_test.c | 203 -- bin/tests/optional/timer_test.c | 180 -- bin/tests/optional/zone_test.c | 313 --- bin/tests/pkcs11/.gitignore | 13 - bin/tests/pkcs11/README | 15 - bin/tests/pkcs11/benchmarks/.gitignore | 1 - bin/tests/pkcs11/benchmarks/create.c | 261 --- bin/tests/pkcs11/benchmarks/find.c | 228 -- bin/tests/pkcs11/benchmarks/genrsa.c | 294 --- bin/tests/pkcs11/benchmarks/login.c | 248 --- bin/tests/pkcs11/benchmarks/privrsa.c | 329 --- bin/tests/pkcs11/benchmarks/pubrsa.c | 275 --- bin/tests/pkcs11/benchmarks/session.c | 215 -- bin/tests/pkcs11/benchmarks/sha1.c | 215 -- bin/tests/pkcs11/benchmarks/sign.c | 334 --- bin/tests/pkcs11/benchmarks/verify.c | 283 --- bin/tests/system/.gitignore | 10 + bin/tests/system/Makefile.am | 155 ++ bin/tests/system/README | 1 - bin/tests/system/acl/setup.sh | 5 +- bin/tests/system/acl/tests.sh | 1 - bin/tests/system/additional/setup.sh | 1 - bin/tests/system/additional/tests.sh | 1 - bin/tests/system/addzone/setup.sh | 1 - bin/tests/system/addzone/tests.sh | 5 +- bin/tests/system/allow-query/setup.sh | 1 - bin/tests/system/allow-query/tests.sh | 1 - bin/tests/system/auth/setup.sh | 1 - bin/tests/system/auth/tests.sh | 1 - bin/tests/system/autosign/ns1/keygen.sh | 1 - bin/tests/system/autosign/ns2/keygen.sh | 1 - bin/tests/system/autosign/ns3/keygen.sh | 1 - bin/tests/system/autosign/setup.sh | 1 - bin/tests/system/autosign/tests.sh | 1 - bin/tests/system/builtin/setup.sh | 1 - bin/tests/system/builtin/tests.sh | 1 - bin/tests/system/cacheclean/setup.sh | 1 - bin/tests/system/cacheclean/tests.sh | 1 - bin/tests/system/case/setup.sh | 1 - bin/tests/system/case/tests.sh | 1 - bin/tests/system/catz/setup.sh | 1 - bin/tests/system/catz/tests.sh | 1 - bin/tests/system/cds/setup.sh | 1 - bin/tests/system/cds/tests.sh | 1 - bin/tests/system/chain/ns2/sign.sh | 1 - bin/tests/system/chain/prereq.sh | 48 - bin/tests/system/chain/setup.sh | 1 - bin/tests/system/chain/tests.sh | 33 +- bin/tests/system/checkconf/tests.sh | 1 - bin/tests/system/checknames/setup.sh | 1 - bin/tests/system/checknames/tests.sh | 1 - bin/tests/system/checkzone/setup.sh | 1 - bin/tests/system/checkzone/tests.sh | 1 - bin/tests/system/conf.sh.common | 17 +- bin/tests/system/conf.sh.in | 90 +- bin/tests/system/cookie/setup.sh | 1 - bin/tests/system/cookie/tests.sh | 1 - bin/tests/system/database/setup.sh | 1 - bin/tests/system/database/tests.sh | 1 - bin/tests/system/delzone/setup.sh | 1 - bin/tests/system/delzone/tests.sh | 1 - bin/tests/system/dialup/tests.sh | 1 - bin/tests/system/digdelv/clean.sh | 1 + bin/tests/system/digdelv/prereq.sh | 23 - bin/tests/system/digdelv/tests.sh | 3 +- bin/tests/system/dlz/prereq.sh | 1 - bin/tests/system/dlz/setup.sh | 1 - bin/tests/system/dlz/tests.sh | 1 - .../system/dlzexternal/driver/Makefile.am | 13 + .../system/dlzexternal/{ => driver}/driver.c | 32 + .../system/dlzexternal/{ => driver}/driver.h | 0 bin/tests/system/dlzexternal/ns1/dlzs.conf.in | 37 - .../system/dlzexternal/ns1/named.conf.in | 27 +- bin/tests/system/dlzexternal/prereq.sh | 1 - bin/tests/system/dlzexternal/setup.sh | 1 - bin/tests/system/dlzexternal/tests.sh | 1 - bin/tests/system/dns64/ns1/sign.sh | 1 - bin/tests/system/dns64/setup.sh | 1 - bin/tests/system/dns64/tests.sh | 1 - bin/tests/system/dnssec/prereq.sh | 29 - bin/tests/system/dnssec/tests.sh | 11 +- bin/tests/system/dnstap/setup.sh | 1 - bin/tests/system/dnstap/tests.sh | 1 - bin/tests/system/dscp/setup.sh | 1 - bin/tests/system/dscp/tests.sh | 1 - bin/tests/system/dsdigest/ns1/sign.sh | 1 - bin/tests/system/dsdigest/ns2/sign.sh | 1 - bin/tests/system/dsdigest/setup.sh | 1 - bin/tests/system/dsdigest/tests.sh | 1 - bin/tests/system/dupsigs/ns1/reset_keys.sh | 1 - bin/tests/system/dupsigs/setup.sh | 1 - bin/tests/system/dupsigs/tests.sh | 1 - bin/tests/system/dyndb/driver/Makefile.am | 19 + bin/tests/system/dyndb/driver/driver.c | 6 + bin/tests/system/dyndb/ns1/named.conf.in | 4 +- bin/tests/system/dyndb/prereq.sh | 1 - bin/tests/system/dyndb/setup.sh | 1 - bin/tests/system/dyndb/tests.sh | 1 - bin/tests/system/ednscompliance/setup.sh | 1 - bin/tests/system/ednscompliance/tests.sh | 1 - bin/tests/system/emptyzones/setup.sh | 1 - bin/tests/system/emptyzones/tests.sh | 1 - bin/tests/system/feature-test.c | 12 +- bin/tests/system/fetchlimit/prereq.sh | 21 - bin/tests/system/fetchlimit/setup.sh | 1 - bin/tests/system/fetchlimit/tests.sh | 1 - bin/tests/system/filter-aaaa/conf/bad1.conf | 2 +- bin/tests/system/filter-aaaa/conf/bad2.conf | 2 +- bin/tests/system/filter-aaaa/conf/bad3.conf | 2 +- bin/tests/system/filter-aaaa/conf/bad4.conf | 2 +- bin/tests/system/filter-aaaa/conf/bad5.conf | 2 +- bin/tests/system/filter-aaaa/conf/good1.conf | 2 +- bin/tests/system/filter-aaaa/conf/good2.conf | 2 +- bin/tests/system/filter-aaaa/conf/good3.conf | 2 +- bin/tests/system/filter-aaaa/conf/good4.conf | 2 +- bin/tests/system/filter-aaaa/conf/good5.conf | 2 +- .../system/filter-aaaa/ns1/named1.conf.in | 2 +- .../system/filter-aaaa/ns1/named2.conf.in | 2 +- bin/tests/system/filter-aaaa/ns1/sign.sh | 1 - .../system/filter-aaaa/ns2/named1.conf.in | 2 +- .../system/filter-aaaa/ns2/named2.conf.in | 2 +- .../system/filter-aaaa/ns3/named1.conf.in | 2 +- .../system/filter-aaaa/ns3/named2.conf.in | 2 +- .../system/filter-aaaa/ns4/named1.conf.in | 2 +- .../system/filter-aaaa/ns4/named2.conf.in | 2 +- bin/tests/system/filter-aaaa/ns4/sign.sh | 1 - .../system/filter-aaaa/ns5/named.conf.in | 2 +- bin/tests/system/filter-aaaa/prereq.sh | 1 - bin/tests/system/filter-aaaa/setup.sh | 1 - bin/tests/system/filter-aaaa/tests.sh | 1 - bin/tests/system/formerr/setup.sh | 1 - bin/tests/system/formerr/tests.sh | 1 - bin/tests/system/forward/prereq.sh | 21 - bin/tests/system/forward/setup.sh | 1 - bin/tests/system/forward/tests.sh | 7 +- bin/tests/system/geoip2/prereq.sh | 1 - bin/tests/system/geoip2/setup.sh | 1 - bin/tests/system/geoip2/tests.sh | 1 - bin/tests/system/get_base_port.sh | 58 + bin/tests/system/glue/setup.sh | 1 - bin/tests/system/glue/tests.sh | 1 - bin/tests/system/idna/setup.sh | 1 - bin/tests/system/idna/tests.sh | 1 - .../system/{ifconfig.sh => ifconfig.sh.in} | 13 +- bin/tests/system/include-multiplecfg/setup.sh | 1 - bin/tests/system/include-multiplecfg/tests.sh | 1 - bin/tests/system/inline/ns1/sign.sh | 1 - bin/tests/system/inline/ns3/sign.sh | 1 - bin/tests/system/inline/ns7/sign.sh | 1 - bin/tests/system/inline/ns8/sign.sh | 1 - bin/tests/system/inline/setup.sh | 1 - bin/tests/system/inline/tests.sh | 13 +- bin/tests/system/integrity/setup.sh | 1 - bin/tests/system/integrity/tests.sh | 1 - bin/tests/system/ixfr/prereq.sh | 21 - bin/tests/system/ixfr/setup.sh | 3 +- bin/tests/system/ixfr/tests.sh | 13 +- bin/tests/system/kasp/tests.sh | 1 - bin/tests/system/keepalive/setup.sh | 1 - bin/tests/system/keepalive/tests.sh | 1 - bin/tests/system/legacy/build.sh | 1 - bin/tests/system/legacy/ns6/sign.sh | 1 - bin/tests/system/legacy/ns7/sign.sh | 1 - bin/tests/system/legacy/setup.sh | 1 - bin/tests/system/legacy/tests.sh | 3 +- bin/tests/system/limits/setup.sh | 1 - bin/tests/system/limits/tests.sh | 1 - bin/tests/system/logfileconfig/setup.sh | 1 - bin/tests/system/logfileconfig/tests.sh | 2 - bin/tests/{ => system}/makejournal.c | 0 bin/tests/system/masterfile/setup.sh | 1 - bin/tests/system/masterfile/tests.sh | 1 - bin/tests/system/masterformat/tests.sh | 3 +- bin/tests/system/metadata/setup.sh | 1 - bin/tests/system/metadata/tests.sh | 1 - bin/tests/system/mirror/ns1/sign.sh | 1 - bin/tests/system/mirror/ns2/sign.sh | 1 - bin/tests/system/mirror/setup.sh | 1 - bin/tests/system/mirror/tests.sh | 17 +- bin/tests/system/mkeys/ns1/sign.sh | 1 - bin/tests/system/mkeys/ns6/setup.sh | 1 - bin/tests/system/mkeys/setup.sh | 1 - bin/tests/system/mkeys/tests.sh | 33 +- bin/tests/system/names/setup.sh | 1 - bin/tests/system/names/tests.sh | 1 - bin/tests/system/notify/setup.sh | 1 - bin/tests/system/notify/tests.sh | 5 +- bin/tests/system/nslookup/setup.sh | 3 +- bin/tests/system/nslookup/tests.sh | 1 - bin/tests/system/nsupdate/ns3/sign.sh | 1 - bin/tests/system/nsupdate/prereq.sh | 26 - bin/tests/system/nsupdate/setup.sh | 1 - bin/tests/system/nsupdate/tests.sh | 5 +- bin/tests/system/nzd2nzf/clean.sh | 6 +- bin/tests/system/nzd2nzf/prereq.sh | 18 - bin/tests/system/nzd2nzf/setup.sh | 1 - bin/tests/system/nzd2nzf/tests.sh | 55 +- bin/tests/system/padding/setup.sh | 1 - bin/tests/system/padding/tests.sh | 1 - bin/tests/system/pending/ns1/sign.sh | 1 - bin/tests/system/pending/ns2/sign.sh | 1 - bin/tests/system/pending/setup.sh | 1 - bin/tests/system/pending/tests.sh | 1 - bin/tests/system/pipelined/prereq.sh | 29 - bin/tests/system/pipelined/setup.sh | 1 - bin/tests/system/pipelined/tests.sh | 1 - bin/tests/system/pkcs11/setup.sh | 1 - bin/tests/system/pkcs11/tests.sh | 1 - bin/tests/system/qmin/prereq.sh | 29 - bin/tests/system/qmin/setup.sh | 1 - bin/tests/system/qmin/tests.sh | 1 - bin/tests/system/reclimit/prereq.sh | 35 - bin/tests/system/reclimit/setup.sh | 1 - bin/tests/system/reclimit/tests.sh | 1 - bin/tests/system/redirect/ns1/sign.sh | 1 - bin/tests/system/redirect/ns3/sign.sh | 1 - bin/tests/system/redirect/ns5/sign.sh | 1 - bin/tests/system/redirect/setup.sh | 1 - bin/tests/system/redirect/tests.sh | 1 - bin/tests/system/resolver/ns6/keygen.sh | 1 - bin/tests/system/resolver/prereq.sh | 29 - bin/tests/system/resolver/setup.sh | 1 - bin/tests/system/resolver/tests.sh | 1 - bin/tests/system/rndc/setup.sh | 9 +- bin/tests/system/rndc/tests.sh | 18 - bin/tests/system/rootkeysentinel/ns1/sign.sh | 1 - bin/tests/system/rootkeysentinel/ns2/sign.sh | 1 - bin/tests/system/rootkeysentinel/setup.sh | 1 - bin/tests/system/rootkeysentinel/tests.sh | 1 - bin/tests/system/rpz/ckdnsrps.sh | 1 - bin/tests/system/rpz/setup.sh | 1 - bin/tests/system/rpz/tests.sh | 5 +- bin/tests/system/rpzrecurse/prereq.sh | 23 - bin/tests/system/rpzrecurse/setup.sh | 1 - bin/tests/system/rpzrecurse/tests.sh | 5 +- bin/tests/system/rrchecker/tests.sh | 3 +- bin/tests/system/rrl/setup.sh | 1 - bin/tests/system/rrl/tests.sh | 1 - bin/tests/system/rrsetorder/setup.sh | 1 - bin/tests/system/rrsetorder/tests.sh | 3 +- bin/tests/system/rsabigexponent/ns1/sign.sh | 1 - bin/tests/system/rsabigexponent/ns2/sign.sh | 1 - bin/tests/system/rsabigexponent/prereq.sh | 22 - bin/tests/system/rsabigexponent/setup.sh | 1 - bin/tests/system/rsabigexponent/tests.sh | 1 - bin/tests/system/{run.sh => run.sh.in} | 154 +- bin/tests/system/runtime/setup.sh | 1 - bin/tests/system/runtime/tests.sh | 1 - bin/tests/system/serve-stale/prereq.sh | 41 - bin/tests/system/serve-stale/setup.sh | 1 - bin/tests/system/serve-stale/tests.sh | 3 +- bin/tests/system/sfcache/tests.sh | 1 - bin/tests/system/smartsign/tests.sh | 1 - bin/tests/system/sortlist/setup.sh | 1 - bin/tests/system/sortlist/tests.sh | 1 - bin/tests/system/spf/setup.sh | 1 - bin/tests/system/spf/tests.sh | 1 - bin/tests/system/start.pl | 19 +- bin/tests/system/start.sh | 17 - bin/tests/system/{stop.sh => start.sh.in} | 11 +- bin/tests/system/staticstub/ns3/sign.sh | 1 - bin/tests/system/staticstub/ns4/sign.sh | 1 - bin/tests/system/staticstub/setup.sh | 1 - bin/tests/system/staticstub/tests.sh | 1 - bin/tests/system/statistics/prereq.sh | 27 - bin/tests/system/statistics/setup.sh | 1 - bin/tests/system/statistics/tests.sh | 1 - bin/tests/system/statschannel/prereq.sh | 25 - bin/tests/system/statschannel/tests.sh | 1 - bin/tests/system/stop.pl | 5 +- .../system/{tcp/prereq.sh => stop.sh.in} | 11 +- bin/tests/system/stress/prereq.sh | 21 - bin/tests/system/stress/tests.sh | 1 - bin/tests/system/stub/setup.sh | 1 - bin/tests/system/stub/tests.sh | 3 +- bin/tests/system/synthfromdnssec/tests.sh | 1 - ...est-driver.sh => system-test-driver.sh.in} | 7 +- bin/tests/system/tcp/setup.sh | 1 - bin/tests/system/tcp/tests.sh | 3 +- bin/tests/system/tools/tests.sh | 1 - bin/tests/system/tsig/setup.sh | 1 - bin/tests/system/tsig/tests.sh | 1 - bin/tests/system/tsiggss/prereq.sh | 1 - bin/tests/system/tsiggss/setup.sh | 1 - bin/tests/system/tsiggss/tests.sh | 1 - bin/tests/system/unknown/ns3/sign.sh | 1 - bin/tests/system/unknown/setup.sh | 1 - bin/tests/system/unknown/tests.sh | 5 +- bin/tests/system/upforwd/prereq.sh | 21 - bin/tests/system/upforwd/setup.sh | 1 - bin/tests/system/upforwd/tests.sh | 1 - bin/tests/system/verify/setup.sh | 1 - bin/tests/system/verify/tests.sh | 1 - bin/tests/system/verify/zones/genzones.sh | 1 - bin/tests/system/views/setup.sh | 1 - bin/tests/system/views/tests.sh | 1 - bin/tests/system/wildcard/ns1/sign.sh | 1 - bin/tests/system/wildcard/setup.sh | 1 - bin/tests/system/wildcard/tests.sh | 1 - .../win32/makejournal.vcxproj.filters.in | 0 .../{ => system}/win32/makejournal.vcxproj.in | 0 .../win32/makejournal.vcxproj.user | 0 bin/tests/system/xfer/prereq.sh | 33 - bin/tests/system/xfer/setup.sh | 13 +- bin/tests/system/xfer/tests.sh | 23 +- bin/tests/system/xferquota/setup.sh | 1 - bin/tests/system/xferquota/tests.sh | 1 - bin/tests/system/zero/prereq.sh | 21 - bin/tests/system/zero/setup.sh | 3 +- bin/tests/system/zero/tests.sh | 1 - bin/tests/system/zonechecks/setup.sh | 5 +- bin/tests/system/zonechecks/tests.sh | 1 - bin/tools/Makefile.am | 54 + bin/tools/dnstap-read.c | 7 +- bin/tools/mdig.c | 14 +- bin/tools/named-rrchecker.c | 9 +- bin/tools/nsec3hash.c | 7 +- bin/win32/BINDInstall/BINDInstallDlg.cpp | 3 - bind.keys.h | 44 - config.h.win32 | 12 +- configure.ac | 1848 ++++------------- contrib/README | 5 + contrib/dlz/modules/include/dlz_minimal.h | 8 +- contrib/kasp/README | 11 + contrib/kasp/kasp.xml | 134 ++ contrib/kasp/policy.good | 24 + doc/arm/libdns.xml | 4 - lib/.gitignore | 1 + lib/Kyuafile | 9 - lib/Makefile.am | 3 + lib/bind9/Makefile.am | 30 + lib/bind9/check.c | 23 - lib/bind9/include/bind9/version.h | 20 - lib/bind9/version.c | 20 - lib/bind9/win32/libbind9.vcxproj.filters.in | 8 +- lib/bind9/win32/libbind9.vcxproj.in | 2 - lib/bind9/win32/version.c | 20 - lib/dns/Kyuafile | 4 - lib/dns/Makefile.am | 352 ++++ lib/dns/dnstap.c | 2 +- lib/dns/dst_api.c | 4 +- lib/dns/dst_internal.h | 4 +- lib/dns/dyndb.c | 170 +- lib/dns/gen-unix.h | 8 +- lib/dns/gen-win32.h | 8 +- lib/dns/geoip2.c | 2 +- lib/dns/gssapi_link.c | 20 +- lib/dns/gssapictx-dummy.c | 103 + lib/dns/gssapictx.c | 209 +- lib/dns/include/dns/types.h | 7 - lib/dns/include/dns/version.h | 27 - lib/dns/include/dst/gssapi.h | 29 +- lib/dns/mapapi | 16 - lib/dns/name.c | 2 +- lib/dns/opensslecdsa_link.c | 4 - lib/dns/openssleddsa_link.c | 7 +- lib/dns/opensslrsa_link.c | 6 +- lib/dns/pkcs11.c | 5 - lib/dns/pkcs11ecdsa_link.c | 4 - lib/dns/pkcs11eddsa_link.c | 4 - lib/dns/pkcs11rsa_link.c | 4 - lib/dns/rbt.c | 3 +- lib/dns/rbtdb.c | 3 +- lib/dns/resolver.c | 2 +- lib/dns/spnego.asn1 | 50 - lib/dns/spnego.c | 1753 ---------------- lib/dns/spnego.h | 49 - lib/dns/spnego_asn1.c | 983 --------- lib/dns/spnego_asn1.pl | 193 -- lib/dns/ssu_external.c | 8 +- lib/dns/tests/Kyuafile | 33 - lib/dns/tests/Makefile.am | 96 + lib/dns/tests/dnstap_test.c | 2 +- lib/dns/tests/geoip_test.c | 12 +- lib/dns/tests/keytable_test.c | 4 +- lib/dns/tests/master_test.c | 59 +- lib/dns/tkey.c | 16 +- lib/dns/win32/libdns.vcxproj.filters.in | 6 - lib/dns/win32/libdns.vcxproj.in | 1 - lib/dns/win32/version.c | 22 - lib/irs/Kyuafile | 4 - lib/irs/Makefile.am | 40 + lib/irs/context.c | 2 +- lib/irs/include/irs/netdb.h | 190 ++ lib/irs/include/irs/netdb.h.in | 191 -- lib/irs/include/irs/platform.h.in | 30 - lib/irs/include/irs/version.h | 20 - lib/irs/tests/Kyuafile | 4 - lib/irs/tests/Makefile.am | 15 + lib/irs/tests/resconf_test.c | 2 +- lib/irs/version.c | 20 - lib/irs/win32/include/irs/.gitignore | 1 - lib/irs/win32/include/irs/platform.h | 34 - lib/irs/win32/libirs.vcxproj.filters.in | 9 - lib/irs/win32/libirs.vcxproj.in | 3 - lib/irs/win32/version.c | 20 - lib/isc/Kyuafile | 4 - lib/isc/Makefile.am | 251 +++ lib/isc/app.c | 2 +- lib/isc/assertions.c | 7 +- lib/isc/hp.c | 4 +- lib/isc/include/isc/assertions.h | 11 +- .../include/isc/attributes.h} | 22 +- lib/isc/include/isc/error.h | 11 +- lib/isc/include/isc/netaddr.h | 8 +- lib/isc/include/isc/platform.h.in | 29 - lib/isc/include/isc/sockaddr.h | 8 +- lib/isc/include/isc/version.h | 20 - lib/isc/include/pk11/pk11.h | 10 +- lib/isc/netaddr.c | 18 +- lib/isc/netmgr/netmgr.c | 6 +- lib/isc/netmgr/tcp.c | 2 +- lib/isc/pthreads/include/isc/thread.h | 25 +- lib/isc/random.c | 2 +- lib/isc/sockaddr.c | 14 +- lib/isc/tests/Kyuafile | 31 - lib/isc/tests/Makefile.am | 65 + lib/isc/tests/ht_test.c | 2 +- lib/isc/unix/net.c | 6 +- lib/isc/unix/socket.c | 22 +- lib/isc/version.c | 20 - lib/isc/win32/include/isc/platform.h.in | 27 +- lib/isc/win32/include/isc/stdatomic.h | 14 +- lib/isc/win32/include/isc/thread.h | 6 +- lib/isc/win32/libisc.vcxproj.filters.in | 6 - lib/isc/win32/libisc.vcxproj.in | 2 - lib/isc/win32/socket.c | 2 +- lib/isc/win32/unistd.h | 3 +- lib/isc/win32/version.c | 20 - lib/isc/xoshiro128starstar.c | 2 +- lib/isccc/Kyuafile | 4 - lib/isccc/Makefile.am | 42 + lib/isccc/include/isccc/version.h | 20 - lib/isccc/tests/Kyuafile | 4 - lib/isccc/tests/Makefile.am | 15 + lib/isccc/version.c | 20 - lib/isccc/win32/libisccc.vcxproj.filters.in | 6 - lib/isccc/win32/libisccc.vcxproj.in | 2 - lib/isccc/win32/version.c | 20 - lib/isccfg/Kyuafile | 4 - lib/isccfg/Makefile.am | 39 + lib/isccfg/include/isccfg/version.h | 20 - lib/isccfg/tests/Kyuafile | 5 - lib/isccfg/tests/Makefile.am | 17 + lib/isccfg/tests/duration_test.c | 4 +- lib/isccfg/tests/parser_test.c | 4 +- lib/isccfg/version.c | 20 - lib/isccfg/win32/libisccfg.vcxproj.filters.in | 6 - lib/isccfg/win32/libisccfg.vcxproj.in | 2 - lib/isccfg/win32/version.c | 20 - lib/ns/Kyuafile | 4 - lib/ns/Makefile.am | 59 + lib/ns/hooks.c | 171 +- lib/ns/include/ns/version.h | 20 - lib/ns/query.c | 2 +- lib/ns/tests/Kyuafile | 7 - lib/ns/tests/Makefile.am | 45 + lib/ns/tests/plugin_test.c | 5 +- lib/ns/win32/libns.vcxproj.filters | 8 +- lib/ns/win32/libns.vcxproj.in | 2 - lib/ns/win32/version.c | 24 - lib/samples/.gitignore | 1 - lib/samples/Makefile-postinstall.in | 66 - lib/samples/Makefile.am | 32 + lib/samples/nsprobe.c | 5 +- lib/samples/resolve.c | 5 +- lib/samples/sample-async.c | 5 +- lib/samples/sample-request.c | 5 +- lib/samples/sample-update.c | 5 +- m4/ax_bind9_lib_version.m4 | 10 + m4/ax_gcc_func_attribute.m4 | 242 +++ m4/ax_perl_module.m4 | 31 + m4/ax_python_module.m4 | 32 + m4/ax_tls.m4 | 71 + make/.gitignore | 3 - make/includes.in | 41 - make/mkdep.in | 183 -- make/rules.in | 334 --- mkinstalldirs | 38 - unit/.gitignore | 4 - unit/README | 8 - unit/gdb | 22 - unit/unittest.sh.in | 81 - util/check-ans-prereq.sh | 26 - util/checklibs.sh | 2 +- util/copyrights | 180 +- util/merge_copyrights | 7 +- util/suppressions.txt | 2 + util/xc | 34 - version | 11 - win32utils/Configure | 22 +- win32utils/bind9.sln.in | 2 +- 596 files changed, 4301 insertions(+), 21770 deletions(-) create mode 100644 AUTHORS delete mode 100644 CODE_OF_CONDUCT delete mode 100644 CONTRIBUTING create mode 120000 COPYING create mode 120000 ChangeLog delete mode 100644 HISTORY delete mode 100644 Kyuafile create mode 100644 Makefile.am create mode 100644 Makefile.tests create mode 100644 Makefile.top create mode 120000 NEWS delete mode 100644 OPTIONS delete mode 100644 PLATFORMS delete mode 100644 README create mode 100644 bin/Makefile.am create mode 100644 bin/check/Makefile.am create mode 100644 bin/confgen/Makefile.am create mode 100644 bin/delv/Makefile.am create mode 100644 bin/dig/Makefile.am rename bin/dig/{include/dig/dig.h => dighost.h} (75%) create mode 100644 bin/dnssec/Makefile.am create mode 100644 bin/named/Makefile.am delete mode 100644 bin/named/bind9.xsl.h delete mode 100755 bin/named/convertxsl.pl rename lib/ns/version.c => bin/named/xsl_p.h (64%) create mode 100644 bin/nsupdate/Makefile.am create mode 100644 bin/pkcs11/Makefile.am create mode 100644 bin/plugins/Makefile.am create mode 100644 bin/rndc/Makefile.am create mode 100644 bin/tests/Makefile.am delete mode 100644 bin/tests/bigtest/README delete mode 100644 bin/tests/bigtest/buildzones.sh delete mode 100644 bin/tests/bigtest/rndc.key delete mode 100644 bin/tests/bigtest/tests.sh delete mode 100644 bin/tests/bigtest/zones delete mode 100644 bin/tests/optional/.gitignore delete mode 100644 bin/tests/optional/Kchild.example.+005+33180.key delete mode 100644 bin/tests/optional/Kchild.example.+005+33180.private delete mode 100644 bin/tests/optional/adb_test.c delete mode 100644 bin/tests/optional/backtrace_test.c delete mode 100644 bin/tests/optional/byaddr_test.c delete mode 100644 bin/tests/optional/byname_test.c delete mode 100644 bin/tests/optional/db_test.c delete mode 100644 bin/tests/optional/fsaccess_test.c delete mode 100644 bin/tests/optional/gsstest.c delete mode 100644 bin/tests/optional/inter_test.c delete mode 100644 bin/tests/optional/lex_test.c delete mode 100644 bin/tests/optional/lfsr_test.c delete mode 100644 bin/tests/optional/log_test.c delete mode 100644 bin/tests/optional/master_test.c delete mode 100644 bin/tests/optional/mempool_test.c delete mode 100644 bin/tests/optional/name_test.c delete mode 100644 bin/tests/optional/nsecify.c delete mode 100644 bin/tests/optional/ratelimiter_test.c delete mode 100644 bin/tests/optional/rbt_test.c delete mode 100644 bin/tests/optional/rbt_test.out delete mode 100644 bin/tests/optional/rbt_test.txt delete mode 100644 bin/tests/optional/rwlock_test.c delete mode 100644 bin/tests/optional/serial_test.c delete mode 100644 bin/tests/optional/shutdown_test.c delete mode 100644 bin/tests/optional/sig0_test.c delete mode 100644 bin/tests/optional/sock_test.c delete mode 100644 bin/tests/optional/sym_test.c delete mode 100644 bin/tests/optional/task_test.c delete mode 100644 bin/tests/optional/timer_test.c delete mode 100644 bin/tests/optional/zone_test.c delete mode 100644 bin/tests/pkcs11/.gitignore delete mode 100644 bin/tests/pkcs11/README delete mode 100644 bin/tests/pkcs11/benchmarks/.gitignore delete mode 100644 bin/tests/pkcs11/benchmarks/create.c delete mode 100644 bin/tests/pkcs11/benchmarks/find.c delete mode 100644 bin/tests/pkcs11/benchmarks/genrsa.c delete mode 100644 bin/tests/pkcs11/benchmarks/login.c delete mode 100644 bin/tests/pkcs11/benchmarks/privrsa.c delete mode 100644 bin/tests/pkcs11/benchmarks/pubrsa.c delete mode 100644 bin/tests/pkcs11/benchmarks/session.c delete mode 100644 bin/tests/pkcs11/benchmarks/sha1.c delete mode 100644 bin/tests/pkcs11/benchmarks/sign.c delete mode 100644 bin/tests/pkcs11/benchmarks/verify.c create mode 100644 bin/tests/system/Makefile.am delete mode 100644 bin/tests/system/chain/prereq.sh delete mode 100644 bin/tests/system/digdelv/prereq.sh create mode 100644 bin/tests/system/dlzexternal/driver/Makefile.am rename bin/tests/system/dlzexternal/{ => driver}/driver.c (93%) rename bin/tests/system/dlzexternal/{ => driver}/driver.h (100%) delete mode 100644 bin/tests/system/dlzexternal/ns1/dlzs.conf.in delete mode 100644 bin/tests/system/dnssec/prereq.sh create mode 100644 bin/tests/system/dyndb/driver/Makefile.am delete mode 100644 bin/tests/system/fetchlimit/prereq.sh delete mode 100644 bin/tests/system/forward/prereq.sh create mode 100755 bin/tests/system/get_base_port.sh rename bin/tests/system/{ifconfig.sh => ifconfig.sh.in} (96%) delete mode 100644 bin/tests/system/ixfr/prereq.sh rename bin/tests/{ => system}/makejournal.c (100%) delete mode 100644 bin/tests/system/nsupdate/prereq.sh delete mode 100644 bin/tests/system/nzd2nzf/prereq.sh delete mode 100644 bin/tests/system/pipelined/prereq.sh delete mode 100644 bin/tests/system/qmin/prereq.sh delete mode 100644 bin/tests/system/reclimit/prereq.sh delete mode 100644 bin/tests/system/resolver/prereq.sh delete mode 100644 bin/tests/system/rpzrecurse/prereq.sh delete mode 100644 bin/tests/system/rsabigexponent/prereq.sh rename bin/tests/system/{run.sh => run.sh.in} (58%) mode change 100755 => 100644 delete mode 100644 bin/tests/system/serve-stale/prereq.sh delete mode 100755 bin/tests/system/start.sh rename bin/tests/system/{stop.sh => start.sh.in} (74%) mode change 100755 => 100644 delete mode 100644 bin/tests/system/statistics/prereq.sh delete mode 100644 bin/tests/system/statschannel/prereq.sh rename bin/tests/system/{tcp/prereq.sh => stop.sh.in} (76%) delete mode 100644 bin/tests/system/stress/prereq.sh rename bin/tests/system/{system-test-driver.sh => system-test-driver.sh.in} (87%) mode change 100755 => 100644 delete mode 100644 bin/tests/system/upforwd/prereq.sh rename bin/tests/{ => system}/win32/makejournal.vcxproj.filters.in (100%) rename bin/tests/{ => system}/win32/makejournal.vcxproj.in (100%) rename bin/tests/{ => system}/win32/makejournal.vcxproj.user (100%) delete mode 100644 bin/tests/system/xfer/prereq.sh delete mode 100644 bin/tests/system/zero/prereq.sh create mode 100644 bin/tools/Makefile.am delete mode 100644 bind.keys.h create mode 100644 contrib/kasp/README create mode 100644 contrib/kasp/kasp.xml create mode 100644 contrib/kasp/policy.good delete mode 100644 lib/Kyuafile create mode 100644 lib/Makefile.am create mode 100644 lib/bind9/Makefile.am delete mode 100644 lib/bind9/include/bind9/version.h delete mode 100644 lib/bind9/version.c delete mode 100644 lib/bind9/win32/version.c delete mode 100644 lib/dns/Kyuafile create mode 100644 lib/dns/Makefile.am create mode 100644 lib/dns/gssapictx-dummy.c delete mode 100644 lib/dns/include/dns/version.h delete mode 100644 lib/dns/mapapi delete mode 100644 lib/dns/spnego.asn1 delete mode 100644 lib/dns/spnego.c delete mode 100644 lib/dns/spnego.h delete mode 100644 lib/dns/spnego_asn1.c delete mode 100644 lib/dns/spnego_asn1.pl delete mode 100644 lib/dns/tests/Kyuafile create mode 100644 lib/dns/tests/Makefile.am delete mode 100644 lib/dns/win32/version.c delete mode 100644 lib/irs/Kyuafile create mode 100644 lib/irs/Makefile.am create mode 100644 lib/irs/include/irs/netdb.h delete mode 100644 lib/irs/include/irs/netdb.h.in delete mode 100644 lib/irs/include/irs/platform.h.in delete mode 100644 lib/irs/include/irs/version.h delete mode 100644 lib/irs/tests/Kyuafile create mode 100644 lib/irs/tests/Makefile.am delete mode 100644 lib/irs/version.c delete mode 100644 lib/irs/win32/include/irs/platform.h delete mode 100644 lib/irs/win32/version.c delete mode 100644 lib/isc/Kyuafile create mode 100644 lib/isc/Makefile.am rename lib/{dns/version.c => isc/include/isc/attributes.h} (56%) delete mode 100644 lib/isc/include/isc/version.h delete mode 100644 lib/isc/tests/Kyuafile create mode 100644 lib/isc/tests/Makefile.am delete mode 100644 lib/isc/version.c delete mode 100644 lib/isc/win32/version.c delete mode 100644 lib/isccc/Kyuafile create mode 100644 lib/isccc/Makefile.am delete mode 100644 lib/isccc/include/isccc/version.h delete mode 100644 lib/isccc/tests/Kyuafile create mode 100644 lib/isccc/tests/Makefile.am delete mode 100644 lib/isccc/version.c delete mode 100644 lib/isccc/win32/version.c delete mode 100644 lib/isccfg/Kyuafile create mode 100644 lib/isccfg/Makefile.am delete mode 100644 lib/isccfg/include/isccfg/version.h delete mode 100644 lib/isccfg/tests/Kyuafile create mode 100644 lib/isccfg/tests/Makefile.am delete mode 100644 lib/isccfg/version.c delete mode 100644 lib/isccfg/win32/version.c delete mode 100644 lib/ns/Kyuafile create mode 100644 lib/ns/Makefile.am delete mode 100644 lib/ns/include/ns/version.h delete mode 100644 lib/ns/tests/Kyuafile create mode 100644 lib/ns/tests/Makefile.am delete mode 100644 lib/ns/win32/version.c delete mode 100644 lib/samples/Makefile-postinstall.in create mode 100644 lib/samples/Makefile.am create mode 100644 m4/ax_bind9_lib_version.m4 create mode 100644 m4/ax_gcc_func_attribute.m4 create mode 100644 m4/ax_perl_module.m4 create mode 100644 m4/ax_python_module.m4 create mode 100644 m4/ax_tls.m4 delete mode 100644 make/.gitignore delete mode 100644 make/includes.in delete mode 100644 make/mkdep.in delete mode 100644 make/rules.in delete mode 100644 mkinstalldirs delete mode 100644 unit/.gitignore delete mode 100644 unit/README delete mode 100755 unit/gdb delete mode 100755 unit/unittest.sh.in delete mode 100644 util/check-ans-prereq.sh delete mode 100755 util/xc delete mode 100644 version diff --git a/.gitignore b/.gitignore index bb2e9e9a88..71607aa297 100644 --- a/.gitignore +++ b/.gitignore @@ -4,11 +4,13 @@ *.gcno *.la *.lo +*.log *.o *.orig *.plist/ # ccc-analyzer store its results in .plist directories *.rej *.so +*.trs *_test *.ipch # vscode/intellisense precompiled header *~ @@ -63,3 +65,4 @@ timestamp /cppcheck.results /tsan /util/check-make-install +/INSTALL diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3792643c44..0245affc04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,7 @@ variables: TARBALL_EXTENSION: xz stages: + - autoconf - precheck - build - unit @@ -168,7 +169,7 @@ stages: .autoconf: &autoconf_job <<: *release_branch_triggering_rules <<: *base_image - stage: precheck + stage: autoconf script: - autoreconf -fi artifacts: @@ -186,6 +187,7 @@ stages: --with-json-c \ --prefix=$HOME/.local \ --without-make-clean \ + --with-python=python3 \ $EXTRA_CONFIGURE \ || cat config.log @@ -253,8 +255,8 @@ stages: - *setup_interfaces - *setup_softhsm script: - - ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 ) - - test -s bin/tests/system/systests.output + - ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k check V=1 ) || cat bin/tests/system/test-suite.log + - test -s bin/tests/system/test-suite.log .system_test: &system_test_job <<: *system_test_common @@ -313,9 +315,7 @@ stages: before_script: - *setup_softhsm script: - - make unit - after_script: - - *kyua_report_html + - cd lib && make -j${TEST_PARALLEL_JOBS:-1} -k check V=1 .unit_test: &unit_test_job <<: *unit_test_common @@ -328,16 +328,12 @@ stages: <<: *unit_test_common allow_failure: true after_script: - - *kyua_report_html - find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \; artifacts: expire_in: "1 day" paths: - lib/*/tests/tsan.* - tsan/ - - kyua.log - - kyua.results - - kyua_html/ when: on_failure .cppcheck_args: &run_cppcheck | @@ -377,7 +373,6 @@ autoreconf: misc: <<: *precheck_job script: - - sh util/check-ans-prereq.sh - sh util/checklibs.sh > checklibs.out - sh util/tabify-changes < CHANGES > CHANGES.tmp - diff -urNap CHANGES CHANGES.tmp @@ -451,16 +446,14 @@ tarball-create: stage: precheck <<: *base_image script: - - source version - - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}" - - git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD - - mkdir "${BIND_DIRECTORY}" - - echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid" - - tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid" - - ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar" + - *configure + - make -j${BUILD_PARALLEL_JOBS:-1} dist V=1 artifacts: paths: - - bind-*.tar.${TARBALL_EXTENSION} + - bind-*.tar.* + needs: + - job: autoreconf + artifacts: true only: - tags @@ -477,6 +470,7 @@ docs: needs: - job: autoreconf artifacts: true + allow_failure: true artifacts: paths: - doc/arm/ @@ -524,7 +518,7 @@ gcc:centos6:amd64: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error" + EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error --without-python" <<: *centos_centos6_amd64_image <<: *build_job @@ -805,7 +799,7 @@ gcc:tumbleweed:amd64: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--with-libidn2" + EXTRA_CONFIGURE: "--with-libidn2 --with-python" <<: *tumbleweed_latest_amd64_image <<: *build_job @@ -1152,77 +1146,17 @@ system:clang:openbsd6.6:amd64: - schedules - web -# Jobs for Visual Studio 2017 builds on Windows (amd64) - -msvc:windows:amd64: - <<: *windows_build_job - <<: *default_triggering_rules - variables: - VSCONF: Release - -system:msvc:windows:amd64: - <<: *windows_system_test_job - variables: - VSCONF: Release - needs: - - job: msvc:windows:amd64 - artifacts: true - -msvc-debug:windows:amd64: - <<: *windows_build_job - variables: - VSCONF: Debug - only: - - schedules - - tags - - web - -system:msvc-debug:windows:amd64: - <<: *windows_system_test_job - variables: - VSCONF: Debug - needs: - - job: msvc-debug:windows:amd64 - artifacts: true - # Job producing a release tarball release: <<: *base_image stage: release script: - # Determine BIND version - - source version - - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}" - # Remove redundant files and system test utilities from Windows build artifacts - - find Build/Release/ -name "*.pdb" -print -delete - - find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete - - find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete - # Create Windows zips - - openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256 - - ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * ) - - ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * ) - # Prepare release tarball contents (tarballs + zips + documentation) - - mkdir -p release/doc/arm - - pushd release - - mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip . - - tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" - - mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} . - - mv "${BIND_DIRECTORY}"/doc/arm/{Bv9ARM{*.html,.pdf},man.*,notes.{html,pdf,txt}} doc/arm/ - - rm -rf "${BIND_DIRECTORY}" - - cp doc/arm/notes.html "RELEASE-NOTES-${BIND_DIRECTORY}.html" - - cp doc/arm/notes.pdf "RELEASE-NOTES-${BIND_DIRECTORY}.pdf" - - cp doc/arm/notes.txt "RELEASE-NOTES-${BIND_DIRECTORY}.txt" - - popd # Create release tarball - tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/ needs: - job: tarball-create artifacts: true - - job: msvc:windows:amd64 - artifacts: true - - job: msvc-debug:windows:amd64 - artifacts: true only: - tags artifacts: diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000000..6943d5a575 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,53 @@ +Mark Andrews +Andreas Gustafsson +Evan Hunt +Brian Wellington +Bob Halley +David Lawrence +Michael Graff +Michael Sawyer +OndÅ™ej Surý +James Brister +Tatuya JINMEI 神明é”哉 +Francis Dupont +MichaÅ‚ KÄ™pieÅ„ +Danny Mayer +Mukund Sivaraman +Jeremy C. Reed +William King +Stephen Morris +Witold KrÄ™cicki +Curtis Blackburn +Scott Mann +Rob Austein +Jim Reid +Eric Luce +Olafur Gudmundsson +Stephen Jacob +Damien Neil +Tony Finch +Jakob Schlyter +Petr Menšík +Vernon Schryver +Matt Nelson +Shane Kerr +Paul Ebersman +Ray Bellis +Shawn Routhier +Ben Cottrell +Tomas Hozza +johnd +Bill Parker +æŽæ˜¶ +Kevin Chen +Jonathan Casey +Mary Stahl +Mathieu Arnold +David Hankins +Paul Hoffman +Paul Vixie +Brian Conry +Anay Panvalkar +colleen +Robert Edmonds +João Damas diff --git a/CODE_OF_CONDUCT b/CODE_OF_CONDUCT deleted file mode 100644 index b5a630af4e..0000000000 --- a/CODE_OF_CONDUCT +++ /dev/null @@ -1,79 +0,0 @@ -CODE OF CONDUCT - -BIND 9 Code of Conduct - -Like the technical community as a whole, the BIND 9 team and community is -made up of a mixture of professionals and volunteers from all over the -world, working on every aspect of the mission - including mentorship, -teaching, and connecting people. - -Diversity is one of our huge strengths, but it can also lead to -communication issues and unhappiness. To that end, we have a few ground -rules that we ask people to adhere to. This code applies equally to the -core development team, open source contributors and those seeking help and -guidance. - -This isn't an exhaustive list of things that you can't do. Rather, take it -in the spirit in which it's intended - a guide to make it easier to enrich -all of us and the technical communities in which we participate. - -This code of conduct applies to all spaces managed by the BIND 9 project -or Internet Systems Consortium. This includes chat, the mailing lists, the -issue tracker, and any other fora created by the project team which the -community uses for communication. In addition, violations of this code -outside these spaces may affect a person's ability to participate within -them. - -If you believe someone is violating the code of conduct, we ask that you -report it by emailing conduct@isc.org. For more details please see our -Reporting Guidelines. - - * Be friendly and patient. - * Be welcoming. We strive to be a community that welcomes and supports - people of all backgrounds and identities. This includes, but is not - limited to members of any race, ethnicity, culture, national origin, - colour, immigration status, social and economic class, educational - level, sex, sexual orientation, gender identity and expression, age, - size, family status, political belief, religion, and mental and - physical ability. - * Be considerate. Your work will be used by other people, and you in - turn will depend on the work of others. Any decision you take will - affect users and colleagues, and you should take those consequences - into account when making decisions. Remember that we're a world-wide - community, so you might not be communicating in someone else's primary - language. - * Be respectful. Not all of us will agree all the time, but disagreement - is no excuse for poor behavior and poor manners. We might all - experience some frustration now and then, but we cannot allow that - frustration to turn into a personal attack. It's important to remember - that a community where people feel uncomfortable or threatened is not - a productive one. Members of the BIND 9 community should be respectful - when dealing with other members as well as with people outside the - BIND 9 community. - * Be careful in the words that you choose. We are a community of - professionals, and we conduct ourselves professionally. Be kind to - others. Do not insult or put down other participants. Harassment and - other exclusionary behavior aren't acceptable. This includes, but is - not limited to: - + Violent threats or language directed against another person. - + Discriminatory jokes and language. - + Posting sexually explicit or violent material. - + Posting (or threatening to post) other people's personally - identifying information ("doxing"). - + Personal insults, especially those using racist or sexist terms. - + Unwelcome sexual attention. - + Advocating for, or encouraging, any of the above behavior. - + Repeated harassment of others. In general, if someone asks you to - stop, then stop. - * When we disagree, try to understand why. Disagreements, both social - and technical, happen all the time and BIND 9 is no exception. It is - important that we resolve disagreements and differing views - constructively. Remember that we're different. The strength of BIND 9 - comes from its varied community, people from a wide range of - backgrounds. Different people have different perspectives on issues. - Being unable to understand why someone holds a viewpoint doesn't mean - that they're wrong. Don't forget that it is human to err and blaming - each other doesn't get us anywhere. Instead, focus on helping to - resolve issues and learning from mistakes. - -Original text courtesy of the Django Code of Conduct project. diff --git a/CONTRIBUTING b/CONTRIBUTING deleted file mode 100644 index 509c82c6f3..0000000000 --- a/CONTRIBUTING +++ /dev/null @@ -1,196 +0,0 @@ -CONTRIBUTING - -BIND Source Access and Contributor Guidelines - -Feb 22, 2018 - -Contents - - 1. Access to source code - 2. Reporting bugs - 3. Contributing code - -Introduction - -Thank you for using BIND! - -BIND is open source software that implements the Domain Name System (DNS) -protocols for the Internet. It is a reference implementation of those -protocols, but it is also production-grade software, suitable for use in -high-volume and high-reliability applications. It is by far the most -widely used DNS software, providing a robust and stable platform on top of -which organizations can build distributed computing systems with the -knowledge that those systems are fully compliant with published DNS -standards. - -BIND is and will always remain free and openly available. It can be used -and modified in any way by anyone. - -BIND is maintained by the Internet Systems Consortium, a public-benefit -501(c)(3) nonprofit, using a "managed open source" approach: anyone can -see the source, but only ISC employees have commit access. Until recently, -the source could only be seen once ISC had published a release: read -access to the source repository was restricted just as commit access was. -That's now changing, with the opening of a public git mirror to the BIND -source tree (see below). - -At Internet Systems Consortium, we're committed to building communities -that are welcoming and inclusive; environments where people are encouraged -to share ideas, treat each other with respect, and collaborate towards the -best solutions. To reinforce our commitment, the Internet Systems -Consortium has adopted the Contributor Covenant version 1.4 as our Code of -Conduct for BIND 9 project, as well as for the conduct of our developers -throughout the industry. - -Access to source code - -Public BIND releases are always available from the ISC FTP site. - -A public-access GIT repository is also available at https://gitlab.isc.org -. This repository is a mirror, updated several times per day, of the -source repository maintained by ISC. It contains all the public release -branches; upcoming releases can be viewed in their current state at any -time. It does not contain development branches or unreviewed work in -progress. Commits which address security vulnerablilities are withheld -until after public disclosure. - -You can browse the source online via https://gitlab.isc.org/isc-projects/ -bind9 - -To clone the repository, use: - - $ git clone https://gitlab.isc.org/isc-projects/bind9.git - -Release branch names are of the form v9_X, where X represents the second -number in the BIND 9 version number. So, to check out the BIND 9.12 -branch, use: - - $ git checkout v9_12 - -Whenever a branch is ready for publication, a tag will be placed of the -form v9_X_Y. The 9.12.0 release, for instance, is tagged as v9_12_0. - -The branch in which the next major release is being developed is called -master. - -Reporting bugs - -Reports of flaws in the BIND package, including software bugs, errors in -the documentation, missing files in the tarball, suggested changes or -requests for new features, etc, can be filed using https://gitlab.isc.org/ -isc-projects/bind9/issues. - -Due to a large ticket backlog, we are sometimes slow to respond, -especially if a bug is cosmetic or if a feature request is vague or low in -priority, but we will try at least to acknowledge legitimate bug reports -within a week. - -ISC's ticketing system is publicly readable; however, you must have an -account to file a new issue. You can either register locally or use -credentials from an existing account at GitHub, GitLab, Google, Twitter, -or Facebook. - -Reporting possible security issues - -If you think you may be seeing a potential security vulnerability in BIND -(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please -report it immediately by emailing to security-officer@isc.org. Plain-text -e-mail is not a secure choice for communications concerning undisclosed -security issues so please encrypt your communications to us if possible, -using the ISC Security Officer public key. - -Do not discuss undisclosed security vulnerabilities on any public mailing -list. ISC has a long history of handling reported vulnerabilities promptly -and effectively and we respect and acknowledge responsible reporters. - -ISC's Security Vulnerability Disclosure Policy is documented at https:// -kb.isc.org/article/AA-00861/0. - -If you have a crash, you may want to consult ?What to do if your BIND or -DHCP server has crashed.? - -Contributing code - -BIND is licensed under the Mozilla Public License 2.0. Earier versions -(BIND 9.10 and earlier) were licensed under the ISC License - -ISC does not require an explicit copyright assignment for patch -contributions. However, by submitting a patch to ISC, you implicitly -certify that you are the author of the code, that you intend to reliquish -exclusive copyright, and that you grant permission to publish your work -under the open source license used for the BIND version(s) to which your -patch will be applied. - -BIND code - -Patches for BIND may be submitted directly via merge requests in ISC's -Gitlab source repository for BIND. - -Patches can also be submitted as diffs against a specific version of BIND --- preferably the current top of the master branch. Diffs may be generated -using either git format-patch or git diff. - -Those wanting to write code for BIND may be interested in the developer -information page, which includes information about BIND design and coding -practices, including discussion of internal APIs and overall system -architecture. (This is a work in progress, and still quite preliminary.) - -Every patch submitted will be reviewed by ISC engineers following our code -review process before it is merged. - -It may take considerable time to review patch submissions, especially if -they don't meet ISC style and quality guidelines. If a patch is a good -idea, we can and will do additional work to bring it up to par, but if -we're busy with other work, it may take us a long time to get to it. - -To ensure your patch is acted on as promptly as possible, please: - - * Try to adhere to the BIND 9 coding style. - * Run make check to ensure your change hasn't caused any functional - regressions. - * Document your work, both in the patch itself and in the accompanying - email. - * In patches that make non-trivial functional changes, include system - tests if possible; when introducing or substantially altering a - library API, include unit tests. See Testing for more information. - -Changes to configure - -If you need to make changes to configure, you should not edit it directly; -instead, edit configure.in, then run autoconf. Similarly, instead of -editing config.h.in directly, edit configure.in and run autoheader. - -When submitting a patch as a diff, it's fine to omit the configure diffs -to save space. Just send the configure.in diffs and we'll generate the new -configure during the review process. - -Documentation - -All functional changes should be documented. There are three types of -documentation in the BIND source tree: - - * Man pages are kept alongside the source code for the commands they - document, in files ending in .docbook; for example, the named man page - is bin/named/named.docbook. - * The BIND 9 Administrator Reference Manual is mostly in doc/arm/ - Bv9ARM-book.xml, plus a few other XML files that are included in it. - * API documentation is in the header file describing the API, in - Doxygen-formatted comments. - -It is not necessary to edit any documentation files other than these; all -PDF, HTML, and nroff-format man page files will be updated automatically -from the docbook and XML files after merging. - -Patches to improve existing documentation are also very welcome! - -Tests - -BIND is a large and complex project. We rely heavily on continuous -automated testing and cannot merge new code without adequate test -coverage. Please see the 'Testing' section of doc/dev/dev.md for more -information. - -Thanks - -Thank you for your interest in contributing to the ongoing development of -BIND. diff --git a/COPYING b/COPYING new file mode 120000 index 0000000000..7a694c9699 --- /dev/null +++ b/COPYING @@ -0,0 +1 @@ +LICENSE \ No newline at end of file diff --git a/ChangeLog b/ChangeLog new file mode 120000 index 0000000000..d67d252bf3 --- /dev/null +++ b/ChangeLog @@ -0,0 +1 @@ +CHANGES \ No newline at end of file diff --git a/HISTORY b/HISTORY deleted file mode 100644 index 614e18d473..0000000000 --- a/HISTORY +++ /dev/null @@ -1,615 +0,0 @@ -HISTORY - -Functional enhancements from prior major releases of BIND 9 - -BIND 9.16 - -BIND 9.16 (a stable branch based on the 9.15 development branch) includes -a number of changes from BIND 9.14 and earlier releases. New features -include: - - * New dnssec-policy statement to configure a key and signing policy for - zones, enabling automatic key regeneration and rollover. - * New network manager based on libuv. - * Added support for the new GeoIP2 geolocation API, libmaxminddb. - * Improved DNSSEC trust anchor configuration using the trust-anchors - statement, permitting configuration of trust anchors in DS as well as - DNSKEY format. - * YAML output for dig, mdig, and delv. - -BIND 9.14 - -BIND 9.14 (a stable branch based on the 9.13 development branch) includes -a number of changes from BIND 9.12 and earlier releases. New features -include: - - * A new "plugin" mechanism has been added to allow query functionality - to be extended using dynamically loadable libraries. The "filter-aaaa" - feature has been removed from named and is now implemented as a - plugin. - * Socket and task code has been refactored to improve performance. - * QNAME minimization, as described in RFC 7816, is now supported. - * "Root key sentinel" support, enabling validating resolvers to indicate - via a special query which trust anchors are configured for the root - zone. - * Secondary zones can now be configured as "mirror" zones; their - contents are transferred in as with traditional slave zones, but are - subject to DNSSEC validation and are not treated as authoritative data - when answering. This makes it easier to configure a local copy of the - root zone as described in RFC 7706. - * The "validate-except" option allows configuration of domains below - which DNSSEC validation should not be performed. - * The default value of "dnssec-validation" is now "auto". - * IDNA2008 is now supported when linking with libidn2. - * "named -V" now outputs the default paths for files used by named and - other tools. - -In addition, workarounds that were formerly in place to enable resolution -of domains whose authoritative servers did not respond to EDNS queries -have been removed. See https://dnsflagday.net for more details. - -Cryptographic support has been modernized. BIND now uses the best -available pseudo-random number generator for the platform on which it's -built. Very old versions of OpenSSL are no longer supported. Cryptography -is now mandatory: building BIND without DNSSEC is no longer supported. - -Special code to support certain legacy operating systems has also been -removed; see the file PLATFORMS.md for details of supported platforms. In -addition to OpenSSL, BIND now requires support for IPv6, threads, and -standard atomic operations provided by the C compiler. - -BIND 9.12 - -BIND 9.12 includes a number of changes from BIND 9.11 and earlier -releases. New features include: - - * named and related libraries have been substantially refactored for - improved query performance -- particularly on delegation heavy zones - -- and for improved readability, maintainability, and testability. - * Code implementing the name server query processing logic has been - moved into a new libns library, for easier testing and use in tools - other than named. - * Cached, validated NSEC and other records can now be used to synthesize - NXDOMAIN responses. - * The DNS Response Policy Service API (DNSRPS) is now supported. - * Setting 'max-journal-size default' now limits the size of journal - files to twice the size of the zone. - * dnstap-read -x prints a hex dump of the wire format of each logged DNS - message. - * dnstap output files can now be configured to roll automatically when - reaching a given size. - * Log file timestamps can now also be formatted in ISO 8601 (local) or - ISO 8601 (UTC) formats. - * Logging channels and dnstap output files can now be configured to use - a timestamp as the suffix when rolling to a new file. - * 'named-checkconf -l' lists zones found in named.conf. - * Added support for the EDNS Padding and Keepalive options. - * 'new-zones-directory' option sets the location where the configuration - data for zones added by rndc addzone is stored. - * The default key algorithm in rndc-confgen is now hmac-sha256. - * filter-aaaa-on-v4 and filter-aaaa-on-v6 options are now available by - default without a configure option. - * The obsolete isc-hmac-fixup command has been removed. - -BIND 9.11 - -BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier -releases. New features include: - - * Added support for Catalog Zones, a new method for provisioning - servers: a list of zones to be served is stored in a DNS zone, along - with their configuration parameters. Changes to the catalog zone are - propagated to slaves via normal AXFR/IXFR, whereupon the zones that - are listed in it are automatically added, deleted or reconfigured. - * Added support for "dnstap", a fast and flexible method of capturing - and logging DNS traffic. - * Added support for "dyndb", a new API for loading zone data from an - external database, developed by Red Hat for the FreeIPA project. - * "fetchlimit" quotas are now compiled in by default. These are for the - use of recursive resolvers that are are under high query load for - domains whose authoritative servers are nonresponsive or are - experiencing a denial of service attack: - + "fetches-per-server" limits the number of simultaneous queries - that can be sent to any single authoritative server. The - configured value is a starting point; it is automatically adjusted - downward if the server is partially or completely non-responsive. - The algorithm used to adjust the quota can be configured via the - "fetch-quota-params" option. - + "fetches-per-zone" limits the number of simultaneous queries that - can be sent for names within a single domain. (Note: Unlike - "fetches-per-server", this value is not self-tuning.) - + New stats counters have been added to count queries spilled due to - these quotas. - * Added a new "dnssec-keymgr" key mainenance utility, which can generate - or update keys as needed to ensure that a zone's keys match a defined - DNSSEC policy. - * The experimental "SIT" feature in BIND 9.10 has been renamed "COOKIE" - and is no longer optional. EDNS COOKIE is a mechanism enabling clients - to detect off-path spoofed responses, and servers to detect - spoofed-source queries. Clients that identify themselves using COOKIE - options are not subject to response rate limiting (RRL) and can - receive larger UDP responses. - * SERVFAIL responses can now be cached for a limited time (defaulting to - 1 second, with an upper limit of 30). This can reduce the frequency of - retries when a query is persistently failing. - * Added an "nsip-wait-recurse" switch to RPZ. This causes NSIP rules to - be skipped if a name server IP address isn't in the cache yet; the - address will be looked up and the rule will be applied on future - queries. - * Added a Python RNDC module. This allows multiple commands to sent over - a persistent RNDC channel, which saves time. - * The "controls" block in named.conf can now grant read-only "rndc" - access to specified clients or keys. Read-only clients could, for - example, check "rndc status" but could not reconfigure or shut down - the server. - * "rndc" commands can now return arbitrarily large amounts of text to - the caller. - * The zone serial number of a dynamically updatable zone can now be set - via "rndc signing -serial ". This allows inline-signing zones to be - set to a specific serial number. - * The new "rndc nta" command can be used to set a Negative Trust Anchor - (NTA), disabling DNSSEC validation for a specific domain; this can be - used when responses from a domain are known to be failing validation - due to administrative error rather than because of a spoofing attack. - Negative trust anchors are strictly temporary; by default they expire - after one hour, but can be configured to last up to one week. - * "rndc delzone" can now be used on zones that were not originally - created by "rndc addzone". - * "rndc modzone" reconfigures a single zone, without requiring the - entire server to be reconfigured. - * "rndc showzone" displays the current configuration of a zone. - * "rndc managed-keys" can be used to check the status of RFC 5011 - managed trust anchors, or to force trust anchors to be refreshed. - * "max-cache-size" can now be set to a percentage of available memory. - The default is 90%. - * Update forwarding performance has been improved by allowing a single - TCP connection to be shared by multiple updates. - * The EDNS Client Subnet (ECS) option is now supported for authoritative - servers; if a query contains an ECS option then ACLs containing - "geoip" or "ecs" elements can match against the the address encoded in - the option. This can be used to select a view for a query, so that - different answers can be provided depending on the client network. - * The EDNS EXPIRE option has been implemented on the client side, - allowing a slave server to set the expiration timer correctly when - transferring zone data from another slave server. - * The key generation and manipulation tools (dnssec-keygen, - dnssec-settime, dnssec-importkey, dnssec-keyfromlabel) now take - "-Psync" and "-Dsync" options to set the publication and deletion - times of CDS and CDNSKEY parent-synchronization records. Both named - and dnssec-signzone can now publish and remove these records at the - scheduled times. - * A new "minimal-any" option reduces the size of UDP responses for query - type ANY by returning a single arbitrarily selected RRset instead of - all RRsets. - * A new "masterfile-style" zone option controls the formatting of text - zone files: When set to "full", a zone file is dumped in - single-line-per-record format. - * "serial-update-method" can now be set to "date". On update, the serial - number will be set to the current date in YYYYMMDDNN format. - * "dnssec-signzone -N date" sets the serial number to YYYYMMDDNN. - * "named -L " causes named to send log messages to the specified file by - default instead of to the system log. - * "dig +ttlunits" prints TTL values with time-unit suffixes: w, d, h, m, - s for weeks, days, hours, minutes, and seconds. - * "dig +unknownformat" prints dig output in RFC 3597 "unknown record" - presentation format. - * "dig +ednsopt" allows dig to set arbitrary EDNS options on requests. - * "dig +ednsflags" allows dig to set yet-to-be-defined EDNS flags on - requests. - * "mdig" is an alternate version of dig which sends multiple pipelined - TCP queries to a server. Instead of waiting for a response after - sending a query, it sends all queries immediately and displays - responses in the order received. - * "serial-query-rate" no longer controls NOTIFY messages. These are - separately controlled by "notify-rate" and "startup-notify-rate". - * "nsupdate" now performs "check-names" processing by default on records - to be added. This can be disabled with "check-names no". - * The statistics channel now supports DEFLATE compression, reducing the - size of the data sent over the network when querying statistics. - * New counters have been added to the statistics channel to track the - sizes of incoming queries and outgoing responses in histogram buckets, - as specified in RSSAC002. - * A new NXDOMAIN redirect method (option "nxdomain-redirect") has been - added, allowing redirection to a specified DNS namespace instead of a - single redirect zone. - * When starting up, named now ensures that no other named process is - already running. - * Files created by named to store information, including "mkeys" and - "nzf" files, are now named after their corresponding views unless the - view name contains characters incompatible with use as a filename. Old - style filenames (based on the hash of the view name) will still work. - -BIND 9.10.0 - -BIND 9.10.0 includes a number of changes from BIND 9.9 and earlier -releases. New features include: - - * DNS Response-rate limiting (DNS RRL), which blunts the impact of - reflection and amplification attacks, is always compiled in and no - longer requires a compile-time option to enable it. - * An experimental "Source Identity Token" (SIT) EDNS option is now - available. Similar to DNS Cookies as invented by Donald Eastlake 3rd, - these are designed to enable clients to detect off-path spoofed - responses, and to enable servers to detect spoofed-source queries. - Servers can be configured to send smaller responses to clients that - have not identified themselves using a SIT option, reducing the - effectiveness of amplification attacks. RRL processing has also been - updated; clients proven to be legitimate via SIT are not subject to - rate limiting. Use "configure --enable-sit" to enable this feature in - BIND. - * A new zone file format, "map", stores zone data in a format that can - be mapped directly into memory, allowing significantly faster zone - loading. - * "delv" (domain entity lookup and validation) is a new tool with - dig-like semantics for looking up DNS data and performing internal - DNSSEC validation. This allows easy validation in environments where - the resolver may not be trustworthy, and assists with troubleshooting - of DNSSEC problems. (NOTE: In previous development releases of BIND - 9.10, this utility was called "delve". The spelling has been changed - to avoid confusion with the "delve" utility included with the Xapian - search engine.) - * Improved EDNS(0) processing for better resolver performance and - reliability over slow or lossy connections. - * A new "configure --with-tuning=large" option tunes certain compiled-in - constants and default settings to values better suited to large - servers with abundant memory. This can improve performance on such - servers, but will consume more memory and may degrade performance on - smaller systems. - * Substantial improvement in response-policy zone (RPZ) performance. Up - to 32 response-policy zones can be configured with minimal performance - loss. - * To improve recursive resolver performance, cache records which are - still being requested by clients can now be automatically refreshed - from the authoritative server before they expire, reducing or - eliminating the time window in which no answer is available in the - cache. - * New "rpz-client-ip" triggers and drop policies allowing response - policies based on the IP address of the client. - * ACLs can now be specified based on geographic location using the - MaxMind GeoIP databases. Use "configure --with-geoip" to enable. - * Zone data can now be shared between views, allowing multiple views to - serve the same zones authoritatively without storing multiple copies - in memory. - * New XML schema (version 3) for the statistics channel includes many - new statistics and uses a flattened XML tree for faster parsing. The - older schema is now deprecated. - * A new stylesheet, based on the Google Charts API, displays XML - statistics in charts and graphs on javascript-enabled browsers. - * The statistics channel can now provide data in JSON format as well as - XML. - * New stats counters track TCP and UDP queries received per zone, and - EDNS options received in total. - * The internal and export versions of the BIND libraries (libisc, - libdns, etc) have been unified so that external library clients can - use the same libraries as BIND itself. - * A new compile-time option, "configure --enable-native-pkcs11", allows - BIND 9 cryptography functions to use the PKCS#11 API natively, so that - BIND can drive a cryptographic hardware service module (HSM) directly - instead of using a modified OpenSSL as an intermediary. (Note: This - feature requires an HSM to have a full implementation of the PKCS#11 - API; many current HSMs only have partial implementations. The new - "pkcs11-tokens" command can be used to check API completeness. Native - PKCS#11 is known to work with the Thales nShield HSM and with SoftHSM - version 2 from the Open DNSSEC project.) - * The new "max-zone-ttl" option enforces maximum TTLs for zones. This - can simplify the process of rolling DNSSEC keys by guaranteeing that - cached signatures will have expired within the specified amount of - time. - * "dig +subnet" sends an EDNS CLIENT-SUBNET option when querying. - * "dig +expire" sends an EDNS EXPIRE option when querying. When this - option is sent with an SOA query to a server that supports it, it will - report the expiry time of a slave zone. - * New "dnssec-coverage" tool to check DNSSEC key coverage for a zone and - report if a lapse in signing coverage has been inadvertently - scheduled. - * Signing algorithm flexibility and other improvements for the "rndc" - control channel. - * "named-checkzone" and "named-compilezone" can now read journal files, - allowing them to process dynamic zones. - * Multiple DLZ databases can now be configured. Individual zones can be - configured to be served from a specific DLZ database. DLZ databases - now serve zones of type "master" and "redirect". - * "rndc zonestatus" reports information about a specified zone. - * "named" now listens on IPv6 as well as IPv4 interfaces by default. - * "named" now preserves the capitalization of names when responding to - queries: for instance, a query for "example.com" may be answered with - "example.COM" if the name was configured that way in the zone file. - Some clients have a bug causing them to depend on the older behavior, - in which the case of the answer always matched the case of the query, - rather than the case of the name configured in the DNS. Such clients - can now be specified in the new "no-case-compress" ACL; this will - restore the older behavior of "named" for those clients only. - * new "dnssec-importkey" command allows the use of offline DNSSEC keys - with automatic DNSKEY management. - * New "named-rrchecker" tool to verify the syntactic correctness of - individual resource records. - * When re-signing a zone, the new "dnssec-signzone -Q" option drops - signatures from keys that are still published but are no longer - active. - * "named-checkconf -px" will print the contents of configuration files - with the shared secrets obscured, making it easier to share - configuration (e.g. when submitting a bug report) without revealing - private information. - * "rndc scan" causes named to re-scan network interfaces for changes in - local addresses. - * On operating systems with support for routing sockets, network - interfaces are re-scanned automatically whenever they change. - * "tsig-keygen" is now available as an alternate command name to use for - "ddns-confgen". - -BIND 9.9.0 - -BIND 9.9.0 includes a number of changes from BIND 9.8 and earlier -releases. New features include: - - * Inline signing, allowing automatic DNSSEC signing of master zones - without modification of the zonefile, or "bump in the wire" signing in - slaves. - * NXDOMAIN redirection. - * New 'rndc flushtree' command clears all data under a given name from - the DNS cache. - * New 'rndc sync' command dumps pending changes in a dynamic zone to - disk without a freeze/thaw cycle. - * New 'rndc signing' command displays or clears signing status records - in 'auto-dnssec' zones. - * NSEC3 parameters for 'auto-dnssec' zones can now be set prior to - signing, eliminating the need to initially sign with NSEC. - * Startup time improvements on large authoritative servers. - * Slave zones are now saved in raw format by default. - * Several improvements to response policy zones (RPZ). - * Improved hardware scalability by using multiple threads to listen for - queries and using finer-grained client locking - * The 'also-notify' option now takes the same syntax as 'masters', so it - can used named masterlists and TSIG keys. - * 'dnssec-signzone -D' writes an output file containing only DNSSEC - data, which can be included by the primary zone file. - * 'dnssec-signzone -R' forces removal of signatures that are not expired - but were created by a key which no longer exists. - * 'dnssec-signzone -X' allows a separate expiration date to be specified - for DNSKEY signatures from other signatures. - * New '-L' option to dnssec-keygen, dnssec-settime, and - dnssec-keyfromlabel sets the default TTL for the key. - * dnssec-dsfromkey now supports reading from standard input, to make it - easier to convert DNSKEY to DS. - * RFC 1918 reverse zones have been added to the empty-zones table per - RFC 6303. - * Dynamic updates can now optionally set the zone's SOA serial number to - the current UNIX time. - * DLZ modules can now retrieve the source IP address of the querying - client. - * 'request-ixfr' option can now be set at the per-zone level. - * 'dig +rrcomments' turns on comments about DNSKEY records, indicating - their key ID, algorithm and function - * Simplified nsupdate syntax and added readline support - -BIND 9.8.0 - -BIND 9.8.0 includes a number of changes from BIND 9.7 and earlier -releases. New features include: - - * Built-in trust anchor for the root zone, which can be switched on via - "dnssec-validation auto;" - * Support for DNS64. - * Support for response policy zones (RPZ). - * Support for writable DLZ zones. - * Improved ease of configuration of GSS/TSIG for interoperability with - Active Directory - * Support for GOST signing algorithm for DNSSEC. - * Removed RTT Banding from server selection algorithm. - * New "static-stub" zone type. - * Allow configuration of resolver timeouts via "resolver-query-timeout" - option. - * The DLZ "dlopen" driver is now built by default. - * Added a new include file with function typedefs for the DLZ "dlopen" - driver. - * Made "--with-gssapi" default. - * More verbose error reporting from DLZ LDAP. - -BIND 9.7.0 - -BIND 9.7.0 includes a number of changes from BIND 9.6 and earlier -releases. Most are intended to simplify DNSSEC configuration. New features -include: - - * Fully automatic signing of zones by "named". - * Simplified configuration of DNSSEC Lookaside Validation (DLV). - * Simplified configuration of Dynamic DNS, using the "ddns-confgen" - command line tool or the "local" update-policy option. (As a side - effect, this also makes it easier to configure automatic zone - re-signing.) - * New named option "attach-cache" that allows multiple views to share a - single cache. - * DNS rebinding attack prevention. - * New default values for dnssec-keygen parameters. - * Support for RFC 5011 automated trust anchor maintenance - * Smart signing: simplified tools for zone signing and key maintenance. - * The "statistics-channels" option is now available on Windows. - * A new DNSSEC-aware libdns API for use by non-BIND9 applications - * On some platforms, named and other binaries can now print out a stack - backtrace on assertion failure, to aid in debugging. - * A "tools only" installation mode on Windows, which only installs dig, - host, nslookup and nsupdate. - * Improved PKCS#11 support, including Keyper support and explicit - OpenSSL engine selection. - -BIND 9.6.0 - - * Full NSEC3 support - * Automatic zone re-signing - * New update-policy methods tcp-self and 6to4-self - * The BIND 8 resolver library, libbind, has been removed from the BIND 9 - distribution and is now available as a separate download. - * Change the default pid file location from /var/run to /var/run/ - {named,lwresd} for improved chroot/setuid support. - -BIND 9.5.0 - - * GSS-TSIG support (RFC 3645). - * DHCID support. - * Experimental http server and statistics support for named via xml. - * More detailed statistics counters including those supported in BIND 8. - * Faster ACL processing. - * Use Doxygen to generate internal documentation. - * Efficient LRU cache-cleaning mechanism. - * NSID support. - -BIND 9.4.0 - - * Implemented "additional section caching (or acache)", an internal - cache framework for additional section content to improve response - performance. Several configuration options were provided to control - the behavior. - * New notify type 'master-only'. Enable notify for master zones only. - * Accept 'notify-source' style syntax for query-source. - * rndc now allows addresses to be set in the server clauses. - * New option "allow-query-cache". This lets "allow-query" be used to - specify the default zone access level rather than having to have every - zone override the global value. "allow-query-cache" can be set at both - the options and view levels. If "allow-query-cache" is not set then - "allow-recursion" is used if set, otherwise "allow-query" is used if - set unless "recursion no;" is set in which case "none;" is used, - otherwise the default (localhost; localnets;) is used. - * rndc: the source address can now be specified. - * ixfr-from-differences now takes master and slave in addition to yes - and no at the options and view levels. - * Allow the journal's name to be changed via named.conf. - * 'rndc notify zone [class [view]]' resend the NOTIFY messages for the - specified zone. - * 'dig +trace' now randomly selects the next servers to try. Report if - there is a bad delegation. - * Improve check-names error messages. - * Make public the function to read a key file, dst_key_read_public(). - * dig now returns the byte count for axfr/ixfr. - * allow-update is now settable at the options / view level. - * named-checkconf now checks the logging configuration. - * host now can turn on memory debugging flags with '-m'. - * Don't send notify messages to self. - * Perform sanity checks on NS records which refer to 'in zone' names. - * New zone option "notify-delay". Specify a minimum delay between sets - of NOTIFY messages. - * Extend adjusting TTL warning messages. - * Named and named-checkzone can now both check for non-terminal wildcard - records. - * "rndc freeze/thaw" now freezes/thaws all zones. - * named-checkconf now check acls to verify that they only refer to - existing acls. - * The server syntax has been extended to support a range of servers. - * Report differences between hints and real NS rrset and associated - address records. - * Preserve the case of domain names in rdata during zone transfers. - * Restructured the data locking framework using architecture dependent - atomic operations (when available), improving response performance on - multi-processor machines significantly. x86, x86_64, alpha, powerpc, - and mips are currently supported. - * UNIX domain controls are now supported. - * Add support for additional zone file formats for improving loading - performance. The masterfile-format option in named.conf can be used to - specify a non-default format. A separate command named-compilezone was - provided to generate zone files in the new format. Additionally, the - -I and -O options for dnssec-signzone specify the input and output - formats. - * dnssec-signzone can now randomize signature end times (dnssec-signzone - -j jitter). - * Add support for CH A record. - * Add additional zone data constancy checks. named-checkzone has - extended checking of NS, MX and SRV record and the hosts they - reference. named has extended post zone load checks. New zone options: - check-mx and integrity-check. - * edns-udp-size can now be overridden on a per server basis. - * dig can now specify the EDNS version when making a query. - * Added framework for handling multiple EDNS versions. - * Additional memory debugging support to track size and mctx arguments. - * Detect duplicates of UDP queries we are recursing on and drop them. - New stats category "duplicates". - * "USE INTERNAL MALLOC" is now runtime selectable. - * The lame cache is now done on a basis as some - servers only appear to be lame for certain query types. - * Limit the number of recursive clients that can be waiting for a single - query () to resolve. New options clients-per-query - and max-clients-per-query. - * dig: report the number of extra bytes still left in the packet after - processing all the records. - * Support for IPSECKEY rdata type. - * Raise the UDP receive buffer size to 32k if it is less than 32k. - * x86 and x86_64 now have separate atomic locking implementations. - * named-checkconf now validates update-policy entries. - * Attempt to make the amount of work performed in a iteration self - tuning. The covers nodes clean from the cache per iteration, nodes - written to disk when rewriting a master file and nodes destroyed per - iteration when destroying a zone or a cache. - * ISC string copy API. - * Automatic empty zone creation for D.F.IP6.ARPA and friends. Note: RFC - 1918 zones are not yet covered by this but are likely to be in a - future release. - * New options: empty-server, empty-contact, empty-zones-enable and - disable-empty-zone. - * dig now has a '-q queryname' and '+showsearch' options. - * host/nslookup now continue (default)/fail on SERVFAIL. - * dig now warns if 'RA' is not set in the answer when 'RD' was set in - the query. host/nslookup skip servers that fail to set 'RA' when 'RD' - is set unless a server is explicitly set. - * Integrate contributed DLZ code into named. - * Integrate contributed IDN code from JPNIC. - * libbind: corresponds to that from BIND 8.4.7. - -BIND 9.3.0 - - * DNSSEC is now DS based (RFC 3658). - * DNSSEC lookaside validation. - * check-names is now implemented. - * rrset-order is more complete. - * IPv4/IPv6 transition support, dual-stack-servers. - * IXFR deltas can now be generated when loading master files, - ixfr-from-differences. - * It is now possible to specify the size of a journal, max-journal-size. - * It is now possible to define a named set of master servers to be used - in masters clause, masters. - * The advertised EDNS UDP size can now be set, edns-udp-size. - * allow-v6-synthesis has been obsoleted. - * Zones containing MD and MF will now be rejected. - * dig, nslookup name. now report "Not Implemented" as NOTIMP rather than - NOTIMPL. This will have impact on scripts that are looking for - NOTIMPL. - * libbind: corresponds to that from BIND 8.4.5. - -BIND 9.2.0 - - * The size of the cache can now be limited using the "max-cache-size" - option. - * The server can now automatically convert RFC1886-style recursive - lookup requests into RFC2874-style lookups, when enabled using the new - option "allow-v6-synthesis". This allows stub resolvers that support - AAAA records but not A6 record chains or binary labels to perform - lookups in domains that make use of these IPv6 DNS features. - * Performance has been improved. - * The man pages now use the more portable "man" macros rather than the - "mandoc" macros, and are installed by "make install". - * The named.conf parser has been completely rewritten. It now supports - "include" directives in more places such as inside "view" statements, - and it no longer has any reserved words. - * The "rndc status" command is now implemented. - * rndc can now be configured automatically. - * A BIND 8 compatible stub resolver library is now included in lib/bind. - * OpenSSL has been removed from the distribution. This means that to use - DNSSEC, OpenSSL must be installed and the --with-openssl option must - be supplied to configure. This does not apply to the use of TSIG, - which does not require OpenSSL. - * The source distribution now builds on Windows. See win32utils/ - readme1.txt and win32utils/win32-build.txt for details. - * This distribution also includes a new lightweight stub resolver - library and associated resolver daemon that fully support forward and - reverse lookups of both IPv4 and IPv6 addresses. This library is - considered experimental and is not a complete replacement for the BIND - 8 resolver library. Applications that use the BIND 8 res_* functions - to perform DNS lookups or dynamic updates still need to be linked - against the BIND 8 libraries. For DNS lookups, they can also use the - new "getrrsetbyname()" API. - * BIND 9.2 is capable of acting as an authoritative server for DNSSEC - secured zones. This functionality is believed to be stable and - complete except for lacking support for verifications involving - wildcard records in secure zones. - * When acting as a caching server, BIND 9.2 can be configured to perform - DNSSEC secure resolution on behalf of its clients. This part of the - DNSSEC implementation is still considered experimental. For detailed - information about the state of the DNSSEC implementation, see the file - doc/misc/dnssec. diff --git a/Kyuafile b/Kyuafile deleted file mode 100644 index 70b2cffe17..0000000000 --- a/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('lib/Kyuafile') diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000000..77a8ad20fc --- /dev/null +++ b/Makefile.am @@ -0,0 +1,11 @@ +include $(top_srcdir)/Makefile.top + +SUBDIRS = . libltdl lib bin # doc + +BUILT_SOURCES = bind.keys.h +CLEANFILES = bind.keys.h + +bind.keys.h: bind.keys Makefile + ${PERL} ${top_srcdir}/util/bindkeys.pl < ${top_srcdir}/bind.keys > $@ + +dist_sysconf_DATA = bind.keys diff --git a/Makefile.tests b/Makefile.tests new file mode 100644 index 0000000000..3ff781df53 --- /dev/null +++ b/Makefile.tests @@ -0,0 +1,10 @@ +# Hey Emacs, this is -*- makefile-automake -*- file! +# vim: filetype=automake + +AM_CPPFLAGS += \ + $(CMOCKA_CFLAGS) \ + -DTESTS=\"$(abs_srcdir)\" \ + -DNAMED_PLUGINDIR=\"$(libdir)/named\" + +LDADD = \ + $(CMOCKA_LIBS) diff --git a/Makefile.top b/Makefile.top new file mode 100644 index 0000000000..b7d711c77c --- /dev/null +++ b/Makefile.top @@ -0,0 +1,79 @@ +# Hey Emacs, this is -*- makefile-automake -*- file! +# vim: filetype=automake + +ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4 + +AM_CFLAGS = \ + $(STD_CFLAGS) + +AM_CPPFLAGS = \ + $(STD_CPPFLAGS) \ + -include $(top_builddir)/config.h \ + -I$(srcdir)/include + +if HAVE_GSSAPI +AM_CPPFLAGS += \ + $(GSSAPI_CFLAGS) +endif + +LIBISC_CFLAGS = \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/lib/isc/unix/include \ + -I$(top_srcdir)/lib/isc/pthreads/include \ + -I$(top_srcdir)/lib/isc/include \ + -I$(top_builddir)/lib/isc/include + +if HAVE_JSON_C +LIBISC_CFLAGS += \ + $(JSON_C_CFLAGS) +endif HAVE_JSON_C + +if HAVE_LIBXML2 +LIBISC_CFLAGS += \ + $(LIBXML2_CFLAGS) +endif HAVE_LIBXML2 + +LIBISC_LIBS = $(top_builddir)/lib/isc/libisc.la + +LIBDNS_CFLAGS = \ + -I$(top_srcdir)/lib/dns/include \ + -I$(top_builddir)/lib/dns/include + +LIBDNS_LIBS = \ + $(top_builddir)/lib/dns/libdns.la + +LIBNS_CFLAGS = \ + -I$(top_srcdir)/lib/ns/include + +LIBNS_LIBS = \ + $(top_builddir)/lib/ns/libns.la + +LIBIRS_CFLAGS = \ + -I$(top_srcdir)/lib/irs/include + +LIBIRS_LIBS = \ + $(top_builddir)/lib/irs/libirs.la + +LIBISCCFG_CFLAGS = \ + -I$(top_srcdir)/lib/isccfg/include + +LIBISCCFG_LIBS = \ + $(top_builddir)/lib/isccfg/libisccfg.la + +LIBISCCC_CFLAGS = \ + -I$(top_srcdir)/lib/isccc/include/ + +LIBISCCC_LIBS = \ + $(top_builddir)/lib/isccc/libisccc.la + +LIBBIND9_CFLAGS = \ + -I$(top_srcdir)/lib/bind9/include + +LIBBIND9_LIBS = \ + $(top_builddir)/lib/bind9/libbind9.la + +LIBLTDL_CFLAGS = \ + -I$(top_srcdir)/libltdl + +LIBLTDL_LIBS = \ + $(top_builddir)/libltdl/libltdlc.la diff --git a/NEWS b/NEWS new file mode 120000 index 0000000000..d67d252bf3 --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +CHANGES \ No newline at end of file diff --git a/OPTIONS b/OPTIONS deleted file mode 100644 index 811cf7c867..0000000000 --- a/OPTIONS +++ /dev/null @@ -1,28 +0,0 @@ -OPTIONS - -Setting the STD_CDEFINES environment variable before running configure can -be used to enable certain compile-time options that are not explicitly -defined in configure. - -Some of these settings are: - - Setting Description - Overwrite memory with tag values when allocating --DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but - makes debugging of memory problems easier. - Don't track memory allocations by file and line --DISC_MEM_TRACKLINES=0 number; this improves performance but makes - debugging more difficult. --DISC_FACILITY=LOG_LOCAL0 Change the default syslog facility for named --DNS_CLIENT_DROPPORT=0 Disable dropping queries from particular - well-known ports: --DCHECK_SIBLING=0 Don't check sibling glue in named-checkzone --DCHECK_LOCAL=0 Don't check out-of-zone addresses in - named-checkzone --DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run - rather than ${localstatedir}/run/named/ - Disable the use of inline functions to implement --DISC_BUFFER_USEINLINE=0 the isc_buffer API: this reduces performance but - may be useful when debugging --DISC_HEAP_CHECK Test heap consistency after every heap - operation; used when debugging diff --git a/PLATFORMS b/PLATFORMS deleted file mode 100644 index dd00403a30..0000000000 --- a/PLATFORMS +++ /dev/null @@ -1,99 +0,0 @@ -PLATFORMS - -Supported platforms - -In general, this version of BIND will build and run on any POSIX-compliant -system with a C11-compliant C compiler, BSD-style sockets with -RFC-compliant IPv6 support, POSIX-compliant threads, the libuv -asynchronous I/O library, and the OpenSSL cryptography library. - -The following C11 features are used in BIND 9: - - * Atomic operations support from the compiler is needed, either in the - form of builtin operations, C11 atomics, or the Interlocked family of - functions on Windows. - - * Thread Local Storage support from the compiler is needed, either in - the form of C11 _Thread_local/thread_local, the __thread GCC - extension, or the __declspec(thread) MSVC extension on Windows. - -BIND 9.17 requires a fairly recent version of libuv (at least 1.x). For -some of the older systems listed below, you will have to install an -updated libuv package from sources such as EPEL, PPA, or other native -sources for updated packages. The other option is to build and install -libuv from source. - -Certain optional BIND features have additional library dependencies. These -include libxml2 and libjson-c for statistics, libmaxminddb for -geolocation, libfstrm and libprotobuf-c for DNSTAP, and libidn2 for -internationalized domain name conversion. - -ISC regularly tests BIND on many operating systems and architectures, but -lacks the resources to test all of them. Consequently, ISC is only able to -offer support on a "best effort" basis for some. - -Regularly tested platforms - -As of Mar 2020, BIND 9.17 is fully supported and regularly tested on the -following systems: - - * Debian 9, 10 - * Ubuntu LTS 16.04, 18.04 - * Fedora 31 - * Red Hat Enterprise Linux / CentOS 7, 8 - * FreeBSD 11.3, 12.1 - * OpenBSD 6.6 - * Alpine Linux - -The amd64, i386, armhf and arm64 CPU architectures are all fully -supported. - -Best effort - -The following are platforms on which BIND is known to build and run. ISC -makes every effort to fix bugs on these platforms, but may be unable to do -so quickly due to lack of hardware, less familiarity on the part of -engineering staff, and other constraints. With the exception of Windows -Server 2012 R2, none of these are tested regularly by ISC. - - * Windows Server 2012 R2, 2016 / x64 - * Windows 10 / x64 - * macOS 10.12+ - * Solaris 11 - * NetBSD - * Other Linux distributions still supported by their vendors, such as: - + Ubuntu 19.04+ - + Gentoo - + Arch Linux - * OpenWRT/LEDE 17.01+ - * Other CPU architectures (mips, mipsel, sparc, ...) - -Community maintained - -These systems may not all have the required dependencies for building BIND -easily available, although it will be possible in many cases to compile -those directly from source. The community and interested parties may wish -to help with maintenance, and we welcome patch contributions, although we -cannot guarantee that we will accept them. All contributions will be -assessed against the risk of adverse effect on officially supported -platforms. - - * Platforms past or close to their respective EOL dates, such as: - + Ubuntu 14.04, 18.10 - + CentOS 6 - + Debian Jessie - + FreeBSD 10.x - -Unsupported platforms - -These are platforms on which BIND 9.17 is known not to build or run: - - * Platforms without at least OpenSSL 1.0.2 - * Windows 10 / x86 - * Windows Server 2012 and older - * Solaris 10 and older - * Platforms that don't support IPv6 Advanced Socket API (RFC 3542) - * Platforms that don't support atomic operations (via compiler or - library) - * Linux without NPTL (Native POSIX Thread Library) - * Platforms on which libuv cannot be compiled diff --git a/README b/README deleted file mode 100644 index 61a4764efe..0000000000 --- a/README +++ /dev/null @@ -1,369 +0,0 @@ -README - -BIND 9 - -Contents - - 1. Introduction - 2. Reporting bugs and getting help - 3. Contributing to BIND - 4. BIND 9.17 features - 5. Building BIND - 6. macOS - 7. Dependencies - 8. Compile-time options - 9. Automated testing -10. Documentation -11. Change log -12. Acknowledgments - -Introduction - -BIND (Berkeley Internet Name Domain) is a complete, highly portable -implementation of the DNS (Domain Name System) protocol. - -The BIND name server, named, is able to serve as an authoritative name -server, recursive resolver, DNS forwarder, or all three simultaneously. It -implements views for split-horizon DNS, automatic DNSSEC zone signing and -key management, catalog zones to facilitate provisioning of zone data -throughout a name server constellation, response policy zones (RPZ) to -protect clients from malicious data, response rate limiting (RRL) and -recursive query limits to reduce distributed denial of service attacks, -and many other advanced DNS features. BIND also includes a suite of -administrative tools, including the dig and delv DNS lookup tools, -nsupdate for dynamic DNS zone updates, rndc for remote name server -administration, and more. - -BIND 9 began as a complete re-write of the BIND architecture that was used -in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a -501(c)(3) public benefit corporation dedicated to providing software and -services in support of the Internet infrastructure, developed BIND 9 and -is responsible for its ongoing maintenance and improvement. BIND is open -source software licensed under the terms of the Mozilla Public License, -version 2.0. - -For a summary of features introduced in past major releases of BIND, see -the file HISTORY. - -For a detailed list of changes made throughout the history of BIND 9, see -the file CHANGES. See below for details on the CHANGES file format. - -For up-to-date versions and release notes, see https://www.isc.org/ -download/. - -For information about supported platforms, see PLATFORMS. - -Reporting bugs and getting help - -To report non-security-sensitive bugs or request new features, you may -open an Issue in the BIND 9 project on the ISC GitLab server at https:// -gitlab.isc.org/isc-projects/bind9. - -Please note that, unless you explicitly mark the newly created Issue as -"confidential", it will be publicly readable. Please do not include any -information in bug reports that you consider to be confidential unless the -issue has been marked as such. In particular, if submitting the contents -of your configuration file in a non-confidential Issue, it is advisable to -obscure key secrets: this can be done automatically by using -named-checkconf -px. - -If the bug you are reporting is a potential security issue, such as an -assertion failure or other crash in named, please do NOT use GitLab to -report it. Instead, send mail to security-officer@isc.org using our -OpenPGP key to secure your message. (Information about OpenPGP and links -to our key can be found at https://www.isc.org/pgpkey.) Please do not -discuss the bug on any public mailing list. - -For a general overview of ISC security policies, read the Knowledge Base -article at https://kb.isc.org/docs/aa-00861. - -Professional support and training for BIND are available from ISC at -https://www.isc.org/support. - -To join the BIND Users mailing list, or view the archives, visit https:// -lists.isc.org/mailman/listinfo/bind-users. - -If you're planning on making changes to the BIND 9 source code, you may -also want to join the BIND Workers mailing list, at https://lists.isc.org/ -mailman/listinfo/bind-workers. - -Contributing to BIND - -ISC maintains a public git repository for BIND; details can be found at -http://www.isc.org/git/. - -Information for BIND contributors can be found in the following files: - -General information: CONTRIBUTING.md - Code of Conduct: CODE_OF_CONDUCT.md -- BIND 9 code style: doc/dev/style.md - BIND architecture and developer -guide: doc/dev/dev.md - -Patches for BIND may be submitted as merge requests in the ISC GitLab -server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests. - -By default, external contributors don't have ability to fork BIND in the -GitLab server, but if you wish to contribute code to BIND, you may request -permission to do so. Thereafter, you can create git branches and directly -submit requests that they be reviewed and merged. - -If you prefer, you may also submit code by opening a GitLab Issue and -including your patch as an attachment, preferably generated by git -format-patch. - -BIND 9.17 features - -BIND 9.17 is the newest development branch of BIND 9. It includes a number -of changes from BIND 9.16 and earlier releases. New features include: - - * New option "max-ixfr-ratio" to limit the size of outgoing IXFR - responses before falling back to full zone transfers. - * "rndc nta -d" and "rndc secroots" now include "validate-except" - entries when listing negative trust anchors. - -Building BIND - -Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler, -basic POSIX support, and a 64-bit integer type. BIND also requires the -libuv asynchronous I/O library, and a cryptography provider library such -as OpenSSL or a hardware service module supporting PKCS#11. On Linux, BIND -requires the libcap library to set process privileges, though this -requirement can be overridden by disabling capability support at compile -time. See Compile-time options below for details on other libraries that -may be required to support optional features. - -Successful builds have been observed on many versions of Linux and UNIX, -including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, -Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, -HP-UX, and OpenWRT. - -BIND is also available for Windows Server 2012 R2 and higher. See -win32utils/build.txt for details on building for Windows systems. - -To build on a UNIX or Linux system, use: - - $ ./configure - $ make - -If you're planning on making changes to the BIND 9 source, you should run -make depend. If you're using Emacs, you might find make tags helpful. - -Several environment variables that can be set before running configure -will affect compilation. Significant ones are: - - Variable Description -CC The C compiler to use. configure tries to figure out the - right one for supported systems. - C compiler flags. Defaults to include -g and/or -O2 as -CFLAGS supported by the compiler. Please include '-g' if you need - to set CFLAGS. - System header file directories. Can be used to specify -STD_CINCLUDES where add-on thread or IPv6 support is, for example. - Defaults to empty string. - Any additional preprocessor symbols you want defined. -STD_CDEFINES Defaults to empty string. For a list of possible settings, - see the file OPTIONS. -LDFLAGS Linker flags. Defaults to empty string. -BUILD_CC Needed when cross-compiling: the native C compiler to use - when building for the target system. -BUILD_CFLAGS CFLAGS for the target system during cross-compiling. -BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling. -BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling. -BUILD_LIBS LIBS for the target system during cross-compiling. - -Additional environment variables affecting the build are listed at the end -of the configure help text, which can be obtained by running the command: - -$ ./configure --help - -macOS - -Building on macOS assumes that the "Command Tools for Xcode" is installed. -This can be downloaded from https://developer.apple.com/download/more/ or, -if you have Xcode already installed, you can run xcode-select --install. -(Note that an Apple ID may be required to access the download page.) - -Compile-time options - -To see a full list of configuration options, run configure --help. - -To build shared libraries, specify --with-libtool on the configure command -line. - -For the server to support DNSSEC, you need to build it with crypto -support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer -installed. If the OpenSSL library is installed in a nonstandard location, -specify the prefix using --with-openssl= on the configure command -line. To use a PKCS#11 hardware service module for cryptographic -operations, specify the path to the PKCS#11 provider library using ---with-pkcs11=, and configure BIND with --enable-native-pkcs11. - -To support the HTTP statistics channel, the server must be linked with at -least one of the following libraries: libxml2 http://xmlsoft.org or json-c -https://github.com/json-c/json-c. If these are installed at a nonstandard -location, then: - - * for libxml2, specify the prefix using --with-libxml2=/prefix, - * for json-c, adjust PKG_CONFIG_PATH. - -To support compression on the HTTP statistics channel, the server must be -linked against libzlib. If this is installed in a nonstandard location, -specify the prefix using --with-zlib=/prefix. - -To support storing configuration data for runtime-added zones in an LMDB -database, the server must be linked with liblmdb. If this is installed in -a nonstandard location, specify the prefix using with-lmdb=/prefix. - -To support MaxMind GeoIP2 location-based ACLs, the server must be linked -with libmaxminddb. This is turned on by default if the library is found; -if the library is installed in a nonstandard location, specify the prefix -using --with-maxminddb=/prefix. GeoIP2 support can be switched off with ---disable-geoip. - -For DNSTAP packet logging, you must have installed libfstrm https:// -github.com/farsightsec/fstrm and libprotobuf-c https:// -developers.google.com/protocol-buffers, and BIND must be configured with ---enable-dnstap. - -Certain compiled-in constants and default settings can be decreased to -values better suited to small machines, e.g. OpenWRT boxes, by specifying ---with-tuning=small on the configure command line. This will decrease -memory usage by using smaller structures, but will degrade performance. - -On Linux, process capabilities are managed in user space using the libcap -library, which can be installed on most Linux systems via the libcap-dev -or libcap-devel package. Process capability support can also be disabled -by configuring with --disable-linux-caps. - -On some platforms it is necessary to explicitly request large file support -to handle files bigger than 2GB. This can be done by using ---enable-largefile on the configure command line. - -Support for the "fixed" rrset-order option can be enabled or disabled by -specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure -command line. By default, fixed rrset-order is disabled to reduce memory -footprint. - -The --enable-querytrace option causes named to log every step of -processing every query. This should only be enabled when debugging, -because it has a significant negative impact on query performance. - -make install will install named and the various BIND 9 libraries. By -default, installation is into /usr/local, but this can be changed with the ---prefix option when running configure. - -You may specify the option --sysconfdir to set the directory where -configuration files like named.conf go by default, and --localstatedir to -set the default parent directory of run/named.pid. --sysconfdir defaults -to $prefix/etc and --localstatedir defaults to $prefix/var. - -Automated testing - -A system test suite can be run with make test. The system tests require -you to configure a set of virtual IP addresses on your system (this allows -multiple servers to run locally and communicate with one another). These -IP addresses can be configured by running the command bin/tests/system/ -ifconfig.sh up as root. - -Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules, -and will be skipped if these are not available. Some tests require Python -and the dnspython module and will be skipped if these are not available. -See bin/tests/system/README for further details. - -Unit tests are implemented using the CMocka unit testing framework. To -build them, use configure --with-cmocka. Execution of tests is done by the -Kyua test execution engine; if the kyua command is available, then unit -tests can be run via make test or make unit. - -Documentation - -The BIND 9 Administrator Reference Manual is included with the source -distribution, in DocBook XML, HTML, and PDF format, in the doc/arm -directory. - -Some of the programs in the BIND 9 distribution have man pages in their -directories. In particular, the command line options of named are -documented in bin/named/named.8. - -Frequently (and not-so-frequently) asked questions and their answers can -be found in the ISC Knowledge Base at https://kb.isc.org. - -Additional information on various subjects can be found in other README -files throughout the source tree. - -Change log - -A detailed list of all changes that have been made throughout the -development BIND 9 is included in the file CHANGES, with the most recent -changes listed first. Change notes include tags indicating the category of -the change that was made; these categories are: - - Category Description -[func] New feature -[bug] General bug fix -[security] Fix for a significant security flaw -[experimental] Used for new features when the syntax or other aspects of - the design are still in flux and may change -[port] Portability enhancement -[maint] Updates to built-in data such as root server addresses and - keys -[tuning] Changes to built-in configuration defaults and constants to - improve performance -[performance] Other changes to improve server performance -[protocol] Updates to the DNS protocol such as new RR types -[test] Changes to the automatic tests, not affecting server - functionality -[cleanup] Minor corrections and refactoring -[doc] Documentation -[contrib] Changes to the contributed tools and libraries in the - 'contrib' subdirectory - Used in the master development branch to reserve change -[placeholder] numbers for use in other branches, e.g. when fixing a bug - that only exists in older releases - -In general, [func] and [experimental] tags will only appear in new-feature -releases (i.e., those with version numbers ending in zero). Some new -functionality may be backported to older releases on a case-by-case basis. -All other change types may be applied to all currently-supported releases. - -Bug report identifiers - -Most notes in the CHANGES file include a reference to a bug report or -issue number. Prior to 2018, these were usually of the form [RT #NNN] and -referred to entries in the "bind9-bugs" RT database, which was not open to -the public. More recent entries use the form [GL #NNN] or, less often, [GL -!NNN], which, respectively, refer to issues or merge requests in the -GitLab database. Most of these are publicly readable, unless they include -information which is confidential or security sensitive. - -To look up a GitLab issue by its number, use the URL https:// -gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request, -use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN. - -In rare cases, an issue or merge request number may be followed with the -letter "P". This indicates that the information is in the private ISC -GitLab instance, which is not visible to the public. - -Acknowledgments - - * The original development of BIND 9 was underwritten by the following - organizations: - - Sun Microsystems, Inc. - Hewlett Packard - Compaq Computer Corporation - IBM - Process Software Corporation - Silicon Graphics, Inc. - Network Associates, Inc. - U.S. Defense Information Systems Agency - USENIX Association - Stichting NLnet - NLnet Foundation - Nominum, Inc. - - * This product includes software developed by the OpenSSL Project for - use in the OpenSSL Toolkit. http://www.OpenSSL.org/ - - * This product includes cryptographic software written by Eric Young - (eay@cryptsoft.com) - - * This product includes software written by Tim Hudson - (tjh@cryptsoft.com) diff --git a/README.md b/README.md index 41b7bb7b57..c9e19a211d 100644 --- a/README.md +++ b/README.md @@ -171,14 +171,7 @@ affect compilation. Significant ones are: |--------------------|-----------------------------------------------| |`CC`|The C compiler to use. `configure` tries to figure out the right one for supported systems.| |`CFLAGS`|C compiler flags. Defaults to include -g and/or -O2 as supported by the compiler. Please include '-g' if you need to set `CFLAGS`. | -|`STD_CINCLUDES`|System header file directories. Can be used to specify where add-on thread or IPv6 support is, for example. Defaults to empty string.| -|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).| |`LDFLAGS`|Linker flags. Defaults to empty string.| -|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.| -|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.| -|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.| -|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.| -|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.| Additional environment variables affecting the build are listed at the end of the `configure` help text, which can be obtained by running the @@ -273,7 +266,7 @@ defaults to `$prefix/etc` and `--localstatedir` defaults to `$prefix/var`. ### Automated testing -A system test suite can be run with `make test`. The system tests require +A system test suite can be run with `make check`. The system tests require you to configure a set of virtual IP addresses on your system (this allows multiple servers to run locally and communicate with one another). These IP addresses can be configured by running the command @@ -284,11 +277,9 @@ and will be skipped if these are not available. Some tests require Python and the `dnspython` module and will be skipped if these are not available. See bin/tests/system/README for further details. -Unit tests are implemented using the [CMocka unit testing framework](https://cmocka.org/). -To build them, use `configure --with-cmocka`. Execution of tests is done -by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the -`kyua` command is available, then unit tests can be run via `make test` -or `make unit`. +Unit tests are implemented using the CMocka unit testing framework. To build +them, use `configure --with-cmocka`. Execution of tests is done by the automake +parallel test driver; unit tests are also run by `make check`. ### Documentation diff --git a/bin/Makefile.am b/bin/Makefile.am new file mode 100644 index 0000000000..296a0220f7 --- /dev/null +++ b/bin/Makefile.am @@ -0,0 +1,5 @@ +SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen tests plugins + +if HAVE_PKCS11 +SUBDIRS += pkcs11 +endif diff --git a/bin/check/Makefile.am b/bin/check/Makefile.am new file mode 100644 index 0000000000..dc0d52554d --- /dev/null +++ b/bin/check/Makefile.am @@ -0,0 +1,34 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBBIND9_CFLAGS) + +AM_CPPFLAGS += \ + -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" + +noinst_LTLIBRARIES = libcheck-tool.la + +libcheck_tool_la_SOURCES = \ + check-tool.h \ + check-tool.c + +LDADD = \ + libcheck-tool.la \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBNS_LIBS) \ + $(LIBISCCFG_LIBS) \ + $(LIBBIND9_LIBS) + +sbin_PROGRAMS = named-checkconf named-checkzone + +install-exec-hook: + ln -f $(DESTDIR)$(sbindir)/named-checkzone \ + $(DESTDIR)$(sbindir)/named-compilezone + +uninstall-hook: + -rm -f $(DESTDIR)$(sbindir)/named-compilezone diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index a503c37086..444941db79 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -56,8 +57,8 @@ isc_log_t *logc = NULL; } while (0) /*% usage */ -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -655,7 +656,7 @@ main(int argc, char **argv) { break; case 'v': - printf(VERSION "\n"); + printf("%s\n", PACKAGE_VERSION); exit(0); case 'x': diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c index c44c1b96a9..0aa5a95e49 100644 --- a/bin/check/named-checkzone.c +++ b/bin/check/named-checkzone.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -63,8 +64,8 @@ static enum { progmode_check, progmode_compile } progmode; } \ } while (0) -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -354,7 +355,7 @@ main(int argc, char **argv) { break; case 'v': - printf(VERSION "\n"); + printf("%s\n", PACKAGE_VERSION); exit(0); case 'w': diff --git a/bin/confgen/Makefile.am b/bin/confgen/Makefile.am new file mode 100644 index 0000000000..d9e917bb10 --- /dev/null +++ b/bin/confgen/Makefile.am @@ -0,0 +1,30 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + -DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" + +LDADD = \ + libconfgen.la \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) + +noinst_LTLIBRARIES = libconfgen.la + +libconfgen_la_SOURCES = \ + include/confgen/os.h \ + keygen.h \ + keygen.c \ + util.h \ + util.c \ + unix/os.c + +sbin_PROGRAMS = rndc-confgen ddns-confgen + +install-exec-hook: + ln -f $(DESTDIR)$(sbindir)/ddns-confgen \ + $(DESTDIR)$(sbindir)/tsig-confgen + +uninstall-hook: + -rm -f $(DESTDIR)$(sbindir)/tsig-confgen diff --git a/bin/confgen/ddns-confgen.c b/bin/confgen/ddns-confgen.c index ac3e3d068a..02e3f72bc5 100644 --- a/bin/confgen/ddns-confgen.c +++ b/bin/confgen/ddns-confgen.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -57,8 +58,8 @@ const char *progname; static enum { progmode_keygen, progmode_confgen } progmode; bool verbose = false; /* needed by util.c but not used here */ -ISC_PLATFORM_NORETURN_PRE static void -usage(int status) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(int status); static void usage(int status) { diff --git a/bin/confgen/rndc-confgen.c b/bin/confgen/rndc-confgen.c index 90a1d7e999..2d79599550 100644 --- a/bin/confgen/rndc-confgen.c +++ b/bin/confgen/rndc-confgen.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -60,8 +61,8 @@ bool verbose = false; const char *keyfile, *keydef; -ISC_PLATFORM_NORETURN_PRE static void -usage(int status) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(int status); static void usage(int status) { diff --git a/bin/confgen/util.h b/bin/confgen/util.h index ec9b181780..21cc8de1e9 100644 --- a/bin/confgen/util.h +++ b/bin/confgen/util.h @@ -14,6 +14,7 @@ /*! \file */ +#include #include #include #include @@ -35,9 +36,8 @@ ISC_LANG_BEGINDECLS void notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2); -ISC_PLATFORM_NORETURN_PRE void -fatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); ISC_LANG_ENDDECLS diff --git a/bin/delv/Makefile.am b/bin/delv/Makefile.am new file mode 100644 index 0000000000..54050232bf --- /dev/null +++ b/bin/delv/Makefile.am @@ -0,0 +1,21 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + -I$(top_builddir)/include \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBIRS_CFLAGS) + +AM_CPPFLAGS += \ + -DSYSCONFDIR=\"${sysconfdir}\" + +bin_PROGRAMS = delv + +delv_SOURCES = \ + delv.c +delv_LDADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBISCCFG_LIBS) \ + $(LIBIRS_LIBS) diff --git a/bin/delv/delv.c b/bin/delv/delv.c index 0525b2c6fa..994e1558de 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -205,9 +206,8 @@ usage(void) { exit(1); } -ISC_PLATFORM_NORETURN_PRE static void -fatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); static void fatal(const char *format, ...) { @@ -1327,7 +1327,7 @@ dash_option(char *option, char *next, bool *open_type_class) { /* handled in preparse_args() */ break; case 'v': - fputs("delv " VERSION "\n", stderr); + fprintf(stderr, "delv %s\n", PACKAGE_VERSION); exit(0); /* NOTREACHED */ default: diff --git a/bin/dig/Makefile.am b/bin/dig/Makefile.am new file mode 100644 index 0000000000..7bcd2f5e65 --- /dev/null +++ b/bin/dig/Makefile.am @@ -0,0 +1,30 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBIRS_CFLAGS) \ + $(LIBBIND9_CFLAGS) \ + $(LIBIDN2_CFLAGS) + +LDADD = \ + libdighost.la \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBISCCFG_LIBS) \ + $(LIBIRS_LIBS) \ + $(LIBBIND9_LIBS) \ + $(LIBIDN2_LIBS) + +noinst_LTLIBRARIES = libdighost.la + +libdighost_la_SOURCES = \ + dighost.h \ + dighost.c + +bin_PROGRAMS = dig host nslookup + +nslookup_LDADD = \ + $(LDADD) \ + $(READLINE_LIB) diff --git a/bin/dig/dig.c b/bin/dig/dig.c index cd01275181..4bf9084a24 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -41,7 +42,7 @@ #include #include -#include +#include "dighost.h" #define ADD_STRING(b, s) \ { \ @@ -109,8 +110,8 @@ usage(void) { fprintf(stderr, "Press for complete list of options\n"); } #else /* if TARGET_OS_IPHONE */ -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -125,7 +126,7 @@ usage(void) { /*% version */ static void version(void) { - fputs("DiG " VERSION "\n", stderr); + fprintf(stderr, "DiG %s\n", PACKAGE_VERSION); } /*% help */ @@ -912,7 +913,8 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) { if (printcmd) { snprintf(lookup->cmdline, sizeof(lookup->cmdline), - "%s; <<>> DiG " VERSION " <<>>", first ? "\n" : ""); + "%s; <<>> DiG %s <<>>", first ? "\n" : "", + PACKAGE_VERSION); i = 1; while (i < argc) { snprintf(append, sizeof(append), " %s", argv[i++]); @@ -2658,7 +2660,7 @@ dig_query_setup(bool is_batchfile, bool config_only, int argc, char **argv) { } void -dig_startup() { +dig_startup(void) { isc_result_t result; debug("dig_startup()"); @@ -2669,12 +2671,12 @@ dig_startup() { } void -dig_query_start() { +dig_query_start(void) { start_lookup(); } void -dig_shutdown() { +dig_shutdown(void) { destroy_lookup(default_lookup); if (atomic_load(&batchname) != 0) { if (batchfp != stdin) { diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 4a4d0b6773..7d403e9b3c 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -84,7 +84,7 @@ #include -#include +#include "dighost.h" #if USE_PKCS11 #include diff --git a/bin/dig/include/dig/dig.h b/bin/dig/dighost.h similarity index 75% rename from bin/dig/include/dig/dig.h rename to bin/dig/dighost.h index 6460dd13c0..9b482ce3de 100644 --- a/bin/dig/include/dig/dig.h +++ b/bin/dig/dighost.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -77,7 +78,7 @@ ISC_LANG_BEGINDECLS typedef struct dig_lookup dig_lookup_t; -typedef struct dig_query dig_query_t; +typedef struct dig_query dig_query_t; typedef struct dig_server dig_server_t; typedef ISC_LIST(dig_server_t) dig_serverlist_t; typedef struct dig_searchlist dig_searchlist_t; @@ -112,76 +113,76 @@ struct dig_lookup { * sources. */ char textname[MXNAME]; /*% Name we're going to be * looking up */ - char cmdline[MXNAME]; - dns_rdatatype_t rdtype; - dns_rdatatype_t qrdtype; + char cmdline[MXNAME]; + dns_rdatatype_t rdtype; + dns_rdatatype_t qrdtype; dns_rdataclass_t rdclass; - bool rdtypeset; - bool rdclassset; - char name_space[BUFSIZE]; - char oname_space[BUFSIZE]; - isc_buffer_t namebuf; - isc_buffer_t onamebuf; - isc_buffer_t renderbuf; - char * sendspace; - dns_name_t * name; - isc_interval_t interval; - dns_message_t * sendmsg; - dns_name_t * oname; + bool rdtypeset; + bool rdclassset; + char name_space[BUFSIZE]; + char oname_space[BUFSIZE]; + isc_buffer_t namebuf; + isc_buffer_t onamebuf; + isc_buffer_t renderbuf; + char *sendspace; + dns_name_t *name; + isc_interval_t interval; + dns_message_t *sendmsg; + dns_name_t *oname; ISC_LINK(dig_lookup_t) link; ISC_LIST(dig_query_t) q; ISC_LIST(dig_query_t) connecting; - dig_query_t * current_query; - dig_serverlist_t my_server_list; + dig_query_t *current_query; + dig_serverlist_t my_server_list; dig_searchlist_t *origin; - dig_query_t * xfr_q; - uint32_t retries; - int nsfound; - uint16_t udpsize; - int16_t edns; - int16_t padding; - uint32_t ixfr_serial; - isc_buffer_t rdatabuf; - char rdatastore[MXNAME]; - dst_context_t * tsigctx; - isc_buffer_t * querysig; - uint32_t msgcounter; - dns_fixedname_t fdomain; - isc_sockaddr_t * ecs_addr; - char * cookie; - dns_ednsopt_t * ednsopts; - unsigned int ednsoptscnt; - isc_dscp_t dscp; - unsigned int ednsflags; - dns_opcode_t opcode; - int rrcomments; - unsigned int eoferr; + dig_query_t *xfr_q; + uint32_t retries; + int nsfound; + uint16_t udpsize; + int16_t edns; + int16_t padding; + uint32_t ixfr_serial; + isc_buffer_t rdatabuf; + char rdatastore[MXNAME]; + dst_context_t *tsigctx; + isc_buffer_t *querysig; + uint32_t msgcounter; + dns_fixedname_t fdomain; + isc_sockaddr_t *ecs_addr; + char *cookie; + dns_ednsopt_t *ednsopts; + unsigned int ednsoptscnt; + isc_dscp_t dscp; + unsigned int ednsflags; + dns_opcode_t opcode; + int rrcomments; + unsigned int eoferr; }; /*% The dig_query structure */ struct dig_query { - unsigned int magic; + unsigned int magic; dig_lookup_t *lookup; bool waiting_connect, pending_free, waiting_senddone, first_pass, first_soa_rcvd, second_rr_rcvd, first_repeat_rcvd, recv_made, warn_id, timedout; - uint32_t first_rr_serial; - uint32_t second_rr_serial; - uint32_t msg_count; - uint32_t rr_count; - bool ixfr_axfr; - char * servname; - char * userarg; - isc_buffer_t recvbuf, lengthbuf, tmpsendbuf, sendbuf; - char * recvspace, *tmpsendspace, lengthspace[4]; + uint32_t first_rr_serial; + uint32_t second_rr_serial; + uint32_t msg_count; + uint32_t rr_count; + bool ixfr_axfr; + char *servname; + char *userarg; + isc_buffer_t recvbuf, lengthbuf, tmpsendbuf, sendbuf; + char *recvspace, *tmpsendspace, lengthspace[4]; isc_socket_t *sock; ISC_LINK(dig_query_t) link; ISC_LINK(dig_query_t) clink; isc_sockaddr_t sockaddr; - isc_time_t time_sent; - isc_time_t time_recv; - uint64_t byte_count; - isc_timer_t * timer; + isc_time_t time_sent; + isc_time_t time_recv; + uint64_t byte_count; + isc_timer_t *timer; }; struct dig_server { @@ -202,38 +203,38 @@ typedef ISC_LIST(dig_lookup_t) dig_lookuplist_t; * Externals from dighost.c */ -extern dig_lookuplist_t lookup_list; -extern dig_serverlist_t server_list; +extern dig_lookuplist_t lookup_list; +extern dig_serverlist_t server_list; extern dig_searchlistlist_t search_list; -extern unsigned int extrabytes; +extern unsigned int extrabytes; extern bool check_ra, have_ipv4, have_ipv6, specified_source, usesearch, showsearch, yaml; -extern in_port_t port; -extern unsigned int timeout; -extern isc_mem_t * mctx; -extern int sendcount; -extern int ndots; -extern int lookup_counter; -extern int exitcode; -extern isc_sockaddr_t bind_address; -extern char keynametext[MXNAME]; -extern char keyfile[MXNAME]; -extern char keysecret[MXNAME]; +extern in_port_t port; +extern unsigned int timeout; +extern isc_mem_t *mctx; +extern int sendcount; +extern int ndots; +extern int lookup_counter; +extern int exitcode; +extern isc_sockaddr_t bind_address; +extern char keynametext[MXNAME]; +extern char keyfile[MXNAME]; +extern char keysecret[MXNAME]; extern const dns_name_t *hmacname; -extern unsigned int digestbits; -extern dns_tsigkey_t * tsigkey; -extern bool validated; -extern isc_taskmgr_t * taskmgr; -extern isc_task_t * global_task; -extern bool free_now; -extern bool debugging, debugtiming, memdebugging; -extern bool keep_open; +extern unsigned int digestbits; +extern dns_tsigkey_t *tsigkey; +extern bool validated; +extern isc_taskmgr_t *taskmgr; +extern isc_task_t *global_task; +extern bool free_now; +extern bool debugging, debugtiming, memdebugging; +extern bool keep_open; extern char *progname; -extern int tries; -extern int fatalexit; -extern bool verbose; +extern int tries; +extern int fatalexit; +extern bool verbose; /* * Routines in dighost.c. @@ -247,15 +248,14 @@ getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp); isc_result_t get_reverse(char *reverse, size_t len, char *value, bool strict); -ISC_PLATFORM_NORETURN_PRE void -fatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); void warn(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); -ISC_PLATFORM_NORETURN_PRE void -digexit(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +digexit(void); void debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); @@ -333,7 +333,7 @@ set_search_domain(char *domain); * Routines to be defined in dig.c, host.c, and nslookup.c. and * then assigned to the appropriate function pointer */ -extern isc_result_t (*dighost_printmessage)(dig_query_t * query, +extern isc_result_t (*dighost_printmessage)(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg, bool headers); diff --git a/bin/dig/host.c b/bin/dig/host.c index c94c2de012..ad88f8bf1b 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -21,6 +21,7 @@ #endif /* ifdef HAVE_LOCALE_H */ #include +#include #include #include #include @@ -38,7 +39,7 @@ #include #include -#include +#include "dighost.h" static bool short_form = true, listed_server = false; static bool default_lookups = true; @@ -101,8 +102,8 @@ rcode_totext(dns_rcode_t rcode) { return (totext.deconsttext); } -ISC_PLATFORM_NORETURN_PRE static void -show_usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +show_usage(void); static void show_usage(void) { @@ -581,7 +582,7 @@ static const char *optstring = "46aAc:dilnm:p:rst:vVwCDN:R:TUW:"; /*% version */ static void version(void) { - fputs("host " VERSION "\n", stderr); + fprintf(stderr, "host %s\n", PACKAGE_VERSION); } static void diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index 1bc5798f64..5a5a14b12a 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -35,7 +36,7 @@ #include #include -#include +#include "dighost.h" #if defined(HAVE_READLINE) #if defined(HAVE_EDIT_READLINE_READLINE_H) @@ -629,7 +630,7 @@ set_ndots(const char *value) { static void version(void) { - fputs("nslookup " VERSION "\n", stderr); + fprintf(stderr, "nslookup %s\n", PACKAGE_VERSION); } static void @@ -879,8 +880,8 @@ get_next_command(void) { isc_mem_free(mctx, buf); } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { diff --git a/bin/dnssec/Makefile.am b/bin/dnssec/Makefile.am new file mode 100644 index 0000000000..993d704400 --- /dev/null +++ b/bin/dnssec/Makefile.am @@ -0,0 +1,38 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) + +AM_CPPFLAGS += \ + -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" + +noinst_LTLIBRARIES = libdnssectool.la + +LDADD = \ + libdnssectool.la \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) + +sbin_PROGRAMS = \ + dnssec-cds \ + dnssec-dsfromkey \ + dnssec-importkey \ + dnssec-keyfromlabel \ + dnssec-keygen \ + dnssec-revoke \ + dnssec-settime \ + dnssec-signzone \ + dnssec-verify + +libdnssectool_la_SOURCES = \ + dnssectool.h \ + dnssectool.c + +dnssec_keygen_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISCCFG_CFLAGS) + +dnssec_keygen_LDADD = \ + $(LDADD) \ + $(LIBISCCFG_LIBS) diff --git a/bin/dnssec/dnssec-cds.c b/bin/dnssec/dnssec-cds.c index a9ba59d4f2..e730e0ef20 100644 --- a/bin/dnssec/dnssec-cds.c +++ b/bin/dnssec/dnssec-cds.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -1020,8 +1021,8 @@ nsdiff(uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) { } } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -1029,7 +1030,7 @@ usage(void) { fprintf(stderr, " %s options [options] -f -d \n", program); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, "Options:\n" " -a digest algorithm (SHA-1 / " "SHA-256 / SHA-384)\n" diff --git a/bin/dnssec/dnssec-dsfromkey.c b/bin/dnssec/dnssec-dsfromkey.c index f2a989c5fe..dacb871619 100644 --- a/bin/dnssec/dnssec-dsfromkey.c +++ b/bin/dnssec/dnssec-dsfromkey.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -320,8 +321,8 @@ emits(bool showall, bool cds, dns_rdata_t *rdata) { } } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { diff --git a/bin/dnssec/dnssec-importkey.c b/bin/dnssec/dnssec-importkey.c index f271c67c86..80553005bb 100644 --- a/bin/dnssec/dnssec-importkey.c +++ b/bin/dnssec/dnssec-importkey.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -264,15 +265,15 @@ emit(const char *dir, dns_rdata_t *rdata) { dst_key_free(&key); } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { fprintf(stderr, "Usage:\n"); fprintf(stderr, " %s options [-K dir] keyfile\n\n", program); fprintf(stderr, " %s options -f file [keyname]\n\n", program); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, "Options:\n"); fprintf(stderr, " -f file: read key from zone file\n"); fprintf(stderr, " -K : directory in which to store " diff --git a/bin/dnssec/dnssec-keyfromlabel.c b/bin/dnssec/dnssec-keyfromlabel.c index 3d2d24eae8..9508345b2a 100644 --- a/bin/dnssec/dnssec-keyfromlabel.c +++ b/bin/dnssec/dnssec-keyfromlabel.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -47,14 +48,14 @@ const char *program = "dnssec-keyfromlabel"; -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { fprintf(stderr, "Usage:\n"); fprintf(stderr, " %s -l label [options] name\n\n", program); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, "Required options:\n"); fprintf(stderr, " -l label: label of the key pair\n"); fprintf(stderr, " name: owner of the key\n"); diff --git a/bin/dnssec/dnssec-keygen.c b/bin/dnssec/dnssec-keygen.c index 36724bec96..696892d438 100644 --- a/bin/dnssec/dnssec-keygen.c +++ b/bin/dnssec/dnssec-keygen.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -70,8 +71,8 @@ const char *program = "dnssec-keygen"; isc_log_t *lctx = NULL; -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void progress(int p); @@ -136,7 +137,7 @@ static void usage(void) { fprintf(stderr, "Usage:\n"); fprintf(stderr, " %s [options] name\n\n", program); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, " name: owner of the key\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -K : write keys into directory\n"); diff --git a/bin/dnssec/dnssec-revoke.c b/bin/dnssec/dnssec-revoke.c index af191012a8..6fb1d708a5 100644 --- a/bin/dnssec/dnssec-revoke.c +++ b/bin/dnssec/dnssec-revoke.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -40,14 +41,14 @@ const char *program = "dnssec-revoke"; static isc_mem_t *mctx = NULL; -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { fprintf(stderr, "Usage:\n"); fprintf(stderr, " %s [options] keyfile\n\n", program); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); #if USE_PKCS11 fprintf(stderr, " -E engine: specify PKCS#11 provider " diff --git a/bin/dnssec/dnssec-settime.c b/bin/dnssec/dnssec-settime.c index 01d37186e1..bf76b97873 100644 --- a/bin/dnssec/dnssec-settime.c +++ b/bin/dnssec/dnssec-settime.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -44,14 +45,14 @@ const char *program = "dnssec-settime"; static isc_mem_t *mctx = NULL; -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { fprintf(stderr, "Usage:\n"); fprintf(stderr, " %s [options] keyfile\n\n", program); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, "General options:\n"); #if USE_PKCS11 fprintf(stderr, diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 4c5d28221d..5d6212b0a5 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -3125,11 +3126,11 @@ print_version(FILE *fp) { return; } - fprintf(fp, "; dnssec_signzone version " VERSION "\n"); + fprintf(fp, "; dnssec_signzone version %s\n", PACKAGE_VERSION); } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -3138,7 +3139,7 @@ usage(void) { fprintf(stderr, "\n"); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, "Options: (default value in parenthesis) \n"); fprintf(stderr, "\t-S:\tsmart signing: automatically finds key files\n" diff --git a/bin/dnssec/dnssec-verify.c b/bin/dnssec/dnssec-verify.c index ac003ad58a..8a46ebfa09 100644 --- a/bin/dnssec/dnssec-verify.c +++ b/bin/dnssec/dnssec-verify.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -137,8 +138,8 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) { } } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -147,7 +148,7 @@ usage(void) { fprintf(stderr, "\n"); - fprintf(stderr, "Version: %s\n", VERSION); + fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, "Options: (default value in parenthesis) \n"); fprintf(stderr, "\t-v debuglevel (0)\n"); diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 265f557e5a..d6039c3255 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -112,7 +112,7 @@ vbprintf(int level, const char *fmt, ...) { void version(const char *name) { - fprintf(stderr, "%s %s\n", name, VERSION); + fprintf(stderr, "%s %s\n", name, PACKAGE_VERSION); exit(0); } diff --git a/bin/dnssec/dnssectool.h b/bin/dnssec/dnssectool.h index 9471f96807..483cdafdbe 100644 --- a/bin/dnssec/dnssectool.h +++ b/bin/dnssec/dnssectool.h @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -42,9 +43,8 @@ extern uint8_t dtype[8]; typedef void(fatalcallback_t)(void); -ISC_PLATFORM_NORETURN_PRE void -fatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); void setfatalcallback(fatalcallback_t *callback); @@ -55,8 +55,8 @@ check_result(isc_result_t result, const char *message); void vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3); -ISC_PLATFORM_NORETURN_PRE void -version(const char *program) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +version(const char *program); void sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size); diff --git a/bin/named/.gitignore b/bin/named/.gitignore index f522c74834..ea7fb96479 100644 --- a/bin/named/.gitignore +++ b/bin/named/.gitignore @@ -1,3 +1,3 @@ .libs /named -named-symtbl.c +/xsl.c diff --git a/bin/named/Makefile.am b/bin/named/Makefile.am new file mode 100644 index 0000000000..07d65c304b --- /dev/null +++ b/bin/named/Makefile.am @@ -0,0 +1,109 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + -I$(srcdir)/unix/include \ + -I$(top_builddir)/include \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBNS_CFLAGS) \ + $(LIBISCCC_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBBIND9_CFLAGS) \ + $(LIBLTDL_CFLAGS) \ + $(OPENSSL_CFLAGS) \ + $(LIBCAP_CFLAGS) \ + $(LMDB_CFLAGS) \ + $(MAXMINDDB_CFLAGS) \ + $(DNSTAP_CFLAGS) \ + $(ZLIB_CFLAGS) + +if HAVE_JSON_C +AM_CPPFLAGS += \ + $(JSON_C_CFLAGS) +endif HAVE_JSON_C + +if HAVE_LIBXML2 +AM_CPPFLAGS += \ + $(LIBXML2_CFLAGS) +endif HAVE_LIBXML2 + +AM_CPPFLAGS += \ + -DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \ + -DNAMED_SYSCONFDIR=\"${sysconfdir}\" + +sbin_PROGRAMS = named + +nodist_named_SOURCES = xsl.c +BUILT_SOURCES = xsl.c +CLEANFILES = xsl.c + +xsl.c: bind9.xsl Makefile + (echo 'const char xslmsg[] =' && \ + $(SED) -e 's,\",\\\",g' \ + -e 's,^,\",' \ + -e 's,$$,\",' && \ + echo ";") \ + < "${srcdir}/bind9.xsl" > $@ + +named_SOURCES = \ + builtin.c \ + config.c \ + control.c \ + controlconf.c \ + fuzz.c \ + log.c \ + logconf.c \ + main.c \ + server.c \ + statschannel.c \ + tkeyconf.c \ + tsigconf.c \ + zoneconf.c \ + unix/dlz_dlopen_driver.c \ + unix/os.c \ + include/named/builtin.h \ + include/named/config.h \ + include/named/control.h \ + include/named/fuzz.h \ + include/named/geoip.h \ + include/named/globals.h \ + include/named/log.h \ + include/named/logconf.h \ + include/named/main.h \ + include/named/server.h \ + include/named/smf_globals.h \ + include/named/statschannel.h \ + include/named/tkeyconf.h \ + include/named/tsigconf.h \ + include/named/types.h \ + include/named/zoneconf.h \ + unix/include/named/os.h \ + xsl_p.h + +if HAVE_GEOIP2 +AM_CPPFLAGS += \ + -DMAXMINDDB_PREFIX=\"@MAXMINDDB_PREFIX@\" +named_SOURCES += \ + geoip.c +endif + +named_LDADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBNS_LIBS) \ + $(LIBISCCC_LIBS) \ + $(LIBISCCFG_LIBS) \ + $(LIBBIND9_LIBS) \ + $(LIBLTDL_LIBS) \ + $(OPENSSL_LIBS) \ + $(LIBCAP_LIBS) \ + $(LMDB_LIBS) \ + $(MAXMINDDB_LIBS) \ + $(DNSTAP_LIBS) \ + $(LIBXML2_LIBS) \ + $(ZLIB_LIBS) + +if HAVE_JSON_C +named_LDADD += \ + $(JSON_C_LIBS) +endif HAVE_JSON_C diff --git a/bin/named/bind9.xsl.h b/bin/named/bind9.xsl.h deleted file mode 100644 index 2769147be5..0000000000 --- a/bin/named/bind9.xsl.h +++ /dev/null @@ -1,1272 +0,0 @@ -/* - * Generated by convertxsl.pl 1.14 2008/07/17 23:43:26 jinmei Exp - * From unknown - */ -static char xslmsg[] = - "\n" - "\n" - "\n" - "\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " ISC BIND 9 Statistics\n" - " \n" - " \n" - "
\n" - "

ISC Bind 9 Configuration and Statistics

\n" - "
\n" - "

Alternate statistics views: All,\n" - " Status,\n" - " Server,\n" - " Zones,\n" - " Network,\n" - " Tasks,\n" - " Memory and\n" - " Traffic Size

\n" - "
\n" - "

Server Status

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
Boot time:\n" - " \n" - "
Last reconfigured:\n" - " \n" - "
Current time:\n" - " \n" - "
Server version:\n" - " \n" - "
\n" - "
\n" - " \n" - " \n" - "

Incoming Requests by DNS Opcode

\n" - " \n" - "
\n" - " [cannot display chart]\n" - "
\n" - "
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
Total:\n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - " \n" - " \n" - "

Incoming Queries by Query Type

\n" - "
\n" - " [cannot display chart]\n" - "
\n" - "
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
Total:\n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

Outgoing Queries per view

\n" - " \n" - "

View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
[no " - "data to display]
\n" - "
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - "
\n" - " \n" - "

Server Statistics

\n" - " \n" - " \n" - " \n" - "
[no data to " - "display]
\n" - "
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - " \n" - "

Zone Maintenance Statistics

\n" - " \n" - " \n" - "
[no data to " - "display]
\n" - "
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - " \n" - "

Resolver Statistics (Common)

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - " \n" - " \n" - "

Resolver Statistics for View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - " \n" - "

ADB Statistics for View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - " \n" - "

Cache Statistics for View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - " \n" - "

Cache DB RRsets for View

\n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - "
\n" - " \n" - "

Traffic Size Statistics

\n" - "
\n" - " \n" - "

UDP Requests Received

\n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

UDP Responses Sent

\n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

TCP Requests Received

\n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

TCP Responses Sent

\n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

Socket I/O Statistics

\n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - " \n" - "

Zones for View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
NameClassTypeSerial
\n" - "
\n" - "
\n" - " \n" - "

Received QTYPES per view/zone

\n" - " \n" - "

View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - "

Zone

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
[no data " - "to display]
\n" - "
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - " \n" - "

Response Codes per view/zone

\n" - " \n" - "

View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - "

Zone

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
[no " - "data to display]
\n" - "
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - " \n" - "

Glue cache statistics

\n" - " \n" - "

View

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - "

Zone

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - "
\n" - "
\n" - " \n" - "

Network Status

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
IDNameTypeReferencesLocalAddressPeerAddressState
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

Task Manager Configuration

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
Thread-Model\n" - " \n" - "
Worker Threads\n" - " \n" - "
Default Quantum\n" - " \n" - "
Tasks Running\n" - " \n" - "
Tasks Ready\n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

Tasks

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
IDNameReferencesStateQuantumEvents
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

Memory Usage Summary

\n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - " \n" - "

Memory Contexts

\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " even\n" - " odd\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
IDNameReferencesTotalUseInUseMaxUseMallocedMaxMallocedBlockSizePoolsHiWaterLoWater
\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "
\n" - "
\n" - "
\n" - "

Internet Systems Consortium Inc.
http://www.isc.org

\n" - " \n" - " \n" - " \n" - "\n"; diff --git a/bin/named/builtin.c b/bin/named/builtin.c index d3ab9ad480..6a27e5c9d2 100644 --- a/bin/named/builtin.c +++ b/bin/named/builtin.c @@ -347,7 +347,7 @@ do_version_lookup(dns_sdblookup_t *lookup) { return (put_txt(lookup, named_g_server->version)); } } else { - return (put_txt(lookup, named_g_version)); + return (put_txt(lookup, PACKAGE_VERSION)); } } diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index 4c0127b7a6..a3fda486d3 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -1191,9 +1191,9 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp, if (result == ISC_R_SUCCESS) { int pf = isc_sockaddr_pf(&listener->address); if ((pf == AF_INET && isc_net_probeipv4() != ISC_R_SUCCESS) || -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 (pf == AF_UNIX && isc_net_probeunix() != ISC_R_SUCCESS) || -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif (pf == AF_INET6 && isc_net_probeipv6() != ISC_R_SUCCESS)) { result = ISC_R_FAMILYNOSUPPORT; diff --git a/bin/named/convertxsl.pl b/bin/named/convertxsl.pl deleted file mode 100755 index 8f78be323d..0000000000 --- a/bin/named/convertxsl.pl +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env perl -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -use strict; -use warnings; - -my $rev = '$Id: convertxsl.pl,v 1.14 2008/07/17 23:43:26 jinmei Exp $'; -$rev =~ s/\$//g; -$rev =~ s/,v//g; -$rev =~ s/Id: //; - -my $xsl = "unknown"; -my $lines = ''; - -while (<>) { - chomp; - # pickout the id for comment. - $xsl = $_ if (//); - # convert Id string to a form not recognisable by cvs. - $_ =~ s///; - s/[\ \t]+/ /g; - s/\>\ \\.*//; -$xsl =~ s/,v//; - -print "/*\n * Generated by $rev \n * From $xsl\n */\n"; -print 'static char xslmsg[] =',"\n"; -print $lines; - -print ';', "\n"; diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h index eb38625f44..3b6e8d7d65 100644 --- a/bin/named/include/named/globals.h +++ b/bin/named/include/named/globals.h @@ -65,12 +65,12 @@ EXTERN isc_socketmgr_t *named_g_socketmgr INIT(NULL); EXTERN isc_nm_t *named_g_nm INIT(NULL); EXTERN cfg_parser_t *named_g_parser INIT(NULL); EXTERN cfg_parser_t *named_g_addparser INIT(NULL); -EXTERN const char *named_g_version INIT(VERSION); -EXTERN const char *named_g_product INIT(PRODUCT); -EXTERN const char *named_g_description INIT(DESCRIPTION); -EXTERN const char *named_g_srcid INIT(SRCID); -EXTERN const char *named_g_configargs INIT(CONFIGARGS); -EXTERN const char *named_g_builder INIT(BUILDER); +EXTERN const char *named_g_version INIT(PACKAGE_VERSION); +EXTERN const char *named_g_product INIT(PACKAGE_NAME); +EXTERN const char *named_g_description INIT(PACKAGE_DESCRIPTION); +EXTERN const char *named_g_srcid INIT(PACKAGE_SRCID); +EXTERN const char *named_g_configargs INIT(PACKAGE_CONFIGARGS); +EXTERN const char *named_g_builder INIT(PACKAGE_BUILDER); EXTERN in_port_t named_g_port INIT(0); EXTERN isc_dscp_t named_g_dscp INIT(-1); diff --git a/bin/named/include/named/main.h b/bin/named/include/named/main.h index 27b7624046..ffd26429e8 100644 --- a/bin/named/include/named/main.h +++ b/bin/named/include/named/main.h @@ -9,8 +9,9 @@ * information regarding copyright ownership. */ -#ifndef NAMED_MAIN_H -#define NAMED_MAIN_H 1 +#pragma once + +#include /*! \file */ @@ -23,14 +24,11 @@ */ #define NAMED_MAIN_ARGS "46A:c:d:D:E:fFgL:M:m:n:N:p:sS:t:T:U:u:vVx:X:" -ISC_PLATFORM_NORETURN_PRE void -named_main_earlyfatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +named_main_earlyfatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); void named_main_earlywarning(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); void named_main_setmemstats(const char *); - -#endif /* NAMED_MAIN_H */ diff --git a/bin/named/main.c b/bin/named/main.c index ec8d22100f..b03b30c072 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -189,9 +190,9 @@ named_main_earlyfatal(const char *format, ...) { exit(1); } -ISC_PLATFORM_NORETURN_PRE static void +ISC_NORETURN static void assertion_failed(const char *file, int line, isc_assertiontype_t type, - const char *cond) ISC_PLATFORM_NORETURN_POST; + const char *cond); static void assertion_failed(const char *file, int line, isc_assertiontype_t type, @@ -254,10 +255,9 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type, exit(1); } -ISC_PLATFORM_NORETURN_PRE static void +ISC_NORETURN static void library_fatal_error(const char *file, int line, const char *format, - va_list args) - ISC_FORMAT_PRINTF(3, 0) ISC_PLATFORM_NORETURN_POST; + va_list args) ISC_FORMAT_PRINTF(3, 0); static void library_fatal_error(const char *file, int line, const char *format, @@ -487,16 +487,15 @@ printversion(bool verbose) { const cfg_obj_t *defaults = NULL, *obj = NULL; #endif /* if defined(HAVE_GEOIP2) */ - printf("%s %s%s%s \n", named_g_product, named_g_version, - (*named_g_description != '\0') ? " " : "", named_g_description, - named_g_srcid); + printf("%s%s \n", PACKAGE_STRING, PACKAGE_DESCRIPTION, + PACKAGE_SRCID); if (!verbose) { return; } printf("running on %s\n", named_os_uname()); - printf("built by %s with %s\n", named_g_builder, named_g_configargs); + printf("built by %s with %s\n", PACKAGE_BUILDER, PACKAGE_CONFIGARGS); #ifdef __clang__ printf("compiled by CLANG %s\n", __VERSION__); #else /* ifdef __clang__ */ @@ -1049,9 +1048,8 @@ setup(void) { isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, - "starting %s %s%s%s ", named_g_product, - named_g_version, *named_g_description ? " " : "", - named_g_description, named_g_srcid); + "starting %s%s ", PACKAGE_STRING, + PACKAGE_DESCRIPTION, PACKAGE_SRCID); isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "running on %s", @@ -1059,7 +1057,7 @@ setup(void) { isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "built with %s", - named_g_configargs); + PACKAGE_CONFIGARGS); isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, @@ -1228,7 +1226,6 @@ setup(void) { */ /* xxdb_init(); */ -#ifdef ISC_DLZ_DLOPEN /* * Register the DLZ "dlopen" driver. */ @@ -1237,7 +1234,6 @@ setup(void) { named_main_earlyfatal("dlz_dlopen_init() failed: %s", isc_result_totext(result)); } -#endif /* ifdef ISC_DLZ_DLOPEN */ #if CONTRIB_DLZ /* @@ -1321,12 +1317,10 @@ cleanup(void) { */ dlz_drivers_clear(); #endif /* ifdef CONTRIB_DLZ */ -#ifdef ISC_DLZ_DLOPEN /* * Unregister "dlopen" DLZ driver. */ dlz_dlopen_clear(); -#endif /* ifdef ISC_DLZ_DLOPEN */ isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "exiting"); @@ -1454,10 +1448,11 @@ main(int argc, char *argv[]) { */ strlcat(version, #if defined(NO_VERSION_DATE) || !defined(__DATE__) - "named version: BIND " VERSION " <" SRCID ">", -#else /* if defined(NO_VERSION_DATE) || !defined(__DATE__) */ - "named version: BIND " VERSION " <" SRCID "> (" __DATE__ ")", -#endif /* if defined(NO_VERSION_DATE) || !defined(__DATE__) */ + "named version: BIND " PACKAGE_VERSION " <" PACKAGE_SRCID ">", +#else + "named version: BIND " PACKAGE_VERSION " <" PACKAGE_SRCID + "> (" __DATE__ ")", +#endif sizeof(version)); result = isc_file_progname(*argv, program_name, sizeof(program_name)); if (result != ISC_R_SUCCESS) { diff --git a/bin/named/server.c b/bin/named/server.c index 3c4f8cf9a6..c1851eded8 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -381,9 +382,8 @@ const char *empty_zones[] = { NULL }; -ISC_PLATFORM_NORETURN_PRE static void -fatal(named_server_t *server, const char *msg, - isc_result_t result) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +fatal(named_server_t *server, const char *msg, isc_result_t result); static void named_server_reload(isc_task_t *task, isc_event_t *event); @@ -1633,7 +1633,6 @@ cleanup: return (result); } -#ifdef HAVE_DLOPEN static isc_result_t configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx, const dns_dyndbctx_t *dctx) { @@ -1660,7 +1659,6 @@ configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx, } return (result); } -#endif /* ifdef HAVE_DLOPEN */ static isc_result_t disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) { @@ -3760,7 +3758,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) { result = named_config_get(maps, "dnstap-version", &obj); if (result != ISC_R_SUCCESS) { /* not specified; use the product and version */ - dns_dt_setversion(named_g_server->dtenv, PRODUCT " " VERSION); + dns_dt_setversion(named_g_server->dtenv, PACKAGE_STRING); } else if (result == ISC_R_SUCCESS && !cfg_obj_isvoid(obj)) { /* Quoted string */ dns_dt_setversion(named_g_server->dtenv, cfg_obj_asstring(obj)); @@ -3817,7 +3815,6 @@ create_mapped_acl(void) { return (result); } -#ifdef HAVE_DLOPEN /*% * A callback for the cfg_pluginlist_foreach() call in configure_view() below. * If registering any plugin fails, registering subsequent ones is not @@ -3855,11 +3852,10 @@ register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj, return (result); } -#endif /* ifdef HAVE_DLOPEN */ /* - * Configure 'view' according to 'vconfig', taking defaults from 'config' - * where values are missing in 'vconfig'. + * Configure 'view' according to 'vconfig', taking defaults from + * 'config' where values are missing in 'vconfig'. * * When configuring the default view, 'vconfig' will be NULL and the * global defaults in 'config' used exclusively. @@ -5412,7 +5408,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, (void)cfg_map_get(config, "dyndb", &dyndb_list); } -#ifdef HAVE_DLOPEN for (element = cfg_list_first(dyndb_list); element != NULL; element = cfg_list_next(element)) { @@ -5428,7 +5423,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, CHECK(configure_dyndb(dyndb, mctx, dctx)); } -#endif /* ifdef HAVE_DLOPEN */ /* * Load plugins. @@ -5440,7 +5434,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, (void)cfg_map_get(config, "plugin", &plugin_list); } -#ifdef HAVE_DLOPEN if (plugin_list != NULL) { INSIST(view->hooktable == NULL); CHECK(ns_hooktable_create(view->mctx, @@ -5453,7 +5446,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, CHECK(cfg_pluginlist_foreach(config, plugin_list, named_g_lctx, register_one_plugin, view)); } -#endif /* ifdef HAVE_DLOPEN */ /* * Setup automatic empty zones. If recursion is off then @@ -11744,10 +11736,9 @@ named_server_status(named_server_t *server, isc_buffer_t **text) { isc_time_formathttptimestamp(&named_g_configtime, configtime, sizeof(configtime)); - snprintf(line, sizeof(line), "version: %s %s%s%s %s%s%s\n", - named_g_product, named_g_version, - (*named_g_description != '\0') ? " " : "", named_g_description, - named_g_srcid, ob, alt, cb); + snprintf(line, sizeof(line), "version: %s%s %s%s%s\n", + PACKAGE_STRING, PACKAGE_DESCRIPTION, PACKAGE_SRCID, ob, alt, + cb); CHECK(putstr(text, line)); result = named_os_gethostname(hostname, sizeof(hostname)); diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index 25bec658bf..b702915ada 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -52,7 +52,7 @@ #define ISC_XMLCHAR (const xmlChar *) #endif /* HAVE_LIBXML2 */ -#include "bind9.xsl.h" +#include "xsl_p.h" struct named_statschannel { /* Unlocked */ @@ -1988,7 +1988,7 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen, TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR nowstr)); TRY0(xmlTextWriterEndElement(writer)); /* current-time */ TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "version")); - TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR named_g_version)); + TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR PACKAGE_VERSION)); TRY0(xmlTextWriterEndElement(writer)); /* version */ if ((flags & STATS_XML_SERVER) != 0) { @@ -2825,7 +2825,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg, obj = json_object_new_string(nowstr); CHECKMEM(obj); json_object_object_add(bindstats, "current-time", obj); - obj = json_object_new_string(named_g_version); + obj = json_object_new_string(PACKAGE_VERSION); CHECKMEM(obj); json_object_object_add(bindstats, "version", obj); @@ -3472,6 +3472,7 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo, const char *querystring, isc_httpdfree_t **freecb, void **freecb_args) { isc_result_t result; char *_headers = NULL; + char *p; UNUSED(url); UNUSED(querystring); @@ -3530,7 +3531,8 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo, const char *querystring, send: *retcode = 200; *retmsg = "OK"; - isc_buffer_reinit(b, xslmsg, strlen(xslmsg)); + DE_CONST(xslmsg, p); + isc_buffer_reinit(b, p, strlen(xslmsg)); isc_buffer_add(b, strlen(xslmsg)); end: free(_headers); diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index 5b0e7a5507..605055f66a 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -10,13 +10,11 @@ */ #include +#include #include #include #include #include -#if HAVE_DLFCN_H -#include -#endif /* if HAVE_DLFCN_H */ #include #include @@ -30,7 +28,6 @@ #include #include -#ifdef ISC_DLZ_DLOPEN static dns_sdlzimplementation_t *dlz_dlopen = NULL; typedef struct dlopen_data { @@ -183,13 +180,21 @@ dlopen_dlz_lookup(const char *zone, const char *name, void *driverarg, */ static void * dl_load_symbol(dlopen_data_t *cd, const char *symbol, bool mandatory) { - void *ptr = dlsym(cd->dl_handle, symbol); - if (ptr == NULL && mandatory) { - dlopen_log(ISC_LOG_ERROR, - "dlz_dlopen: library '%s' is missing " - "required symbol '%s'", - cd->dl_path, symbol); + void *ptr = lt_dlsym((lt_dlhandle)cd->dl_handle, symbol); + if (ptr == NULL) { + const char *errmsg = lt_dlerror(); + if (errmsg == NULL) { + errmsg = "returned function pointer is NULL"; + } + if (mandatory) { + dlopen_log(ISC_LOG_ERROR, + "dlz_dlopen: library '%s' is missing " + "required symbol '%s': %s", + cd->dl_path, symbol, errmsg); + } } + /* Cleanup any errors */ + (void)lt_dlerror(); return (ptr); } @@ -202,7 +207,6 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], dlopen_data_t *cd; isc_mem_t *mctx = NULL; isc_result_t result = ISC_R_FAILURE; - int dlopen_flags = 0; UNUSED(driverarg); @@ -214,45 +218,33 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], return (ISC_R_FAILURE); } - isc_mem_create(&mctx); + if (lt_dlinit() != 0) { + return (ISC_R_FAILURE); + } + isc_mem_create(&mctx); cd = isc_mem_get(mctx, sizeof(*cd)); memset(cd, 0, sizeof(*cd)); cd->mctx = mctx; cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]); - cd->dlzname = isc_mem_strdup(cd->mctx, dlzname); /* Initialize the lock */ isc_mutex_init(&cd->lock); - /* Open the library */ - dlopen_flags = RTLD_NOW | RTLD_GLOBAL; - -#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ - /* - * If RTLD_DEEPBIND is available then use it. This can avoid - * issues with a module using a different version of a system - * library than one that bind9 uses. For example, bind9 may link - * to MIT kerberos, but the module may use Heimdal. If we don't - * use RTLD_DEEPBIND then we could end up with Heimdal functions - * calling MIT functions, which leads to bizarre results (usually - * a segfault). - */ - dlopen_flags |= RTLD_DEEPBIND; -#endif /* if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ */ - - cd->dl_handle = dlopen(cd->dl_path, dlopen_flags); + cd->dl_handle = lt_dlopenext(cd->dl_path); if (cd->dl_handle == NULL) { dlopen_log(ISC_LOG_ERROR, - "dlz_dlopen failed to open library '%s' - %s", - cd->dl_path, dlerror()); + "dlz_dlopen failed to open library '%s': %s", + cd->dl_path, lt_dlerror()); result = ISC_R_FAILURE; goto failed; } + (void)lt_dlerror(); + /* Find the symbols */ cd->dlz_version = (dlz_dlopen_version_t *)dl_load_symbol(cd, "dlz_version", true); @@ -330,20 +322,14 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], failed: dlopen_log(ISC_LOG_ERROR, "dlz_dlopen of '%s' failed", dlzname); - if (cd->dl_path != NULL) { - isc_mem_free(mctx, cd->dl_path); - } - if (cd->dlzname != NULL) { - isc_mem_free(mctx, cd->dlzname); - } - if (dlopen_flags != 0) { - isc_mutex_destroy(&cd->lock); - } -#ifdef HAVE_DLCLOSE + + isc_mem_free(mctx, cd->dl_path); + isc_mem_free(mctx, cd->dlzname); + + isc_mutex_destroy(&cd->lock); if (cd->dl_handle) { - dlclose(cd->dl_handle); + (void)lt_dlclose(cd->dl_handle); } -#endif /* ifdef HAVE_DLCLOSE */ isc_mem_put(mctx, cd, sizeof(*cd)); isc_mem_destroy(&mctx); return (result); @@ -372,11 +358,9 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) { isc_mem_free(cd->mctx, cd->dlzname); } -#ifdef HAVE_DLCLOSE if (cd->dl_handle) { - dlclose(cd->dl_handle); + lt_dlclose(cd->dl_handle); } -#endif /* ifdef HAVE_DLCLOSE */ isc_mutex_destroy(&cd->lock); @@ -547,17 +531,12 @@ static dns_sdlzmethods_t dlz_dlopen_methods = { dlopen_dlz_configure, dlopen_dlz_ssumatch, dlopen_dlz_addrdataset, dlopen_dlz_subrdataset, dlopen_dlz_delrdataset }; -#endif /* ifdef ISC_DLZ_DLOPEN */ /* * Register driver with BIND */ isc_result_t dlz_dlopen_init(isc_mem_t *mctx) { -#ifndef ISC_DLZ_DLOPEN - UNUSED(mctx); - return (ISC_R_NOTIMPLEMENTED); -#else /* ifndef ISC_DLZ_DLOPEN */ isc_result_t result; dlopen_log(2, "Registering DLZ_dlopen driver"); @@ -576,7 +555,6 @@ dlz_dlopen_init(isc_mem_t *mctx) { } return (result); -#endif /* ifndef ISC_DLZ_DLOPEN */ } /* @@ -584,10 +562,8 @@ dlz_dlopen_init(isc_mem_t *mctx) { */ void dlz_dlopen_clear(void) { -#ifdef ISC_DLZ_DLOPEN dlopen_log(2, "Unregistering DLZ_dlopen driver"); if (dlz_dlopen != NULL) { dns_sdlzunregister(&dlz_dlopen); } -#endif /* ifdef ISC_DLZ_DLOPEN */ } diff --git a/bin/named/win32/dlz_dlopen_driver.c b/bin/named/win32/dlz_dlopen_driver.c index 1a9c85e14a..cf18fc3318 100644 --- a/bin/named/win32/dlz_dlopen_driver.c +++ b/bin/named/win32/dlz_dlopen_driver.c @@ -28,7 +28,6 @@ #include #include -#ifdef ISC_DLZ_DLOPEN static dns_sdlzimplementation_t *dlz_dlopen = NULL; typedef struct dlopen_data { @@ -530,17 +529,12 @@ static dns_sdlzmethods_t dlz_dlopen_methods = { dlopen_dlz_configure, dlopen_dlz_ssumatch, dlopen_dlz_addrdataset, dlopen_dlz_subrdataset, dlopen_dlz_delrdataset }; -#endif /* ifdef ISC_DLZ_DLOPEN */ /* * Register driver with BIND */ isc_result_t dlz_dlopen_init(isc_mem_t *mctx) { -#ifndef ISC_DLZ_DLOPEN - UNUSED(mctx); - return (ISC_R_NOTIMPLEMENTED); -#else /* ifndef ISC_DLZ_DLOPEN */ isc_result_t result; dlopen_log(2, "Registering DLZ_dlopen driver"); @@ -559,7 +553,6 @@ dlz_dlopen_init(isc_mem_t *mctx) { } return (result); -#endif /* ifndef ISC_DLZ_DLOPEN */ } /* @@ -567,10 +560,8 @@ dlz_dlopen_init(isc_mem_t *mctx) { */ void dlz_dlopen_clear(void) { -#ifdef ISC_DLZ_DLOPEN dlopen_log(2, "Unregistering DLZ_dlopen driver"); if (dlz_dlopen != NULL) { dns_sdlzunregister(&dlz_dlopen); } -#endif /* ifdef ISC_DLZ_DLOPEN */ } diff --git a/bin/named/win32/include/named/ntservice.h b/bin/named/win32/include/named/ntservice.h index 8fe6f5b32e..42c980170a 100644 --- a/bin/named/win32/include/named/ntservice.h +++ b/bin/named/win32/include/named/ntservice.h @@ -18,12 +18,12 @@ #define BIND_SERVICE_NAME "named" void - ntservice_init(); + ntservice_init(void); void UpdateSCM(DWORD); void ServiceControl(DWORD dwCtrlCode); void -ntservice_shutdown(); +ntservice_shutdown(void); BOOL -ntservice_isservice(); +ntservice_isservice(void); #endif /* ifndef NTSERVICE_H */ diff --git a/bin/named/win32/ntservice.c b/bin/named/win32/ntservice.c index 2aa9b812c9..d89a746c59 100644 --- a/bin/named/win32/ntservice.c +++ b/bin/named/win32/ntservice.c @@ -50,8 +50,8 @@ ntservice_init(void) { } UpdateSCM(SERVICE_RUNNING); } else { - strlcpy(ConsoleTitle, "BIND Version ", sizeof(ConsoleTitle)); - strlcat(ConsoleTitle, VERSION, sizeof(ConsoleTitle)); + snprintf(ConsoleTitle, sizeof(ConsoleTitle), "%s Version %s", + PACKAGE_NAME, PACKAGE_VERSION); SetConsoleTitle(ConsoleTitle); } } diff --git a/lib/ns/version.c b/bin/named/xsl_p.h similarity index 64% rename from lib/ns/version.c rename to bin/named/xsl_p.h index 7df021564c..d4d8a8ce38 100644 --- a/lib/ns/version.c +++ b/bin/named/xsl_p.h @@ -9,12 +9,6 @@ * information regarding copyright ownership. */ -/*! \file */ +#pragma once -#include - -const char ns_version[] = VERSION; - -const unsigned int ns_libinterface = LIBINTERFACE; -const unsigned int ns_librevision = LIBREVISION; -const unsigned int ns_libage = LIBAGE; +extern const char xslmsg[]; diff --git a/bin/nsupdate/Makefile.am b/bin/nsupdate/Makefile.am new file mode 100644 index 0000000000..8e2cbaa6ef --- /dev/null +++ b/bin/nsupdate/Makefile.am @@ -0,0 +1,25 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBIRS_CFLAGS) \ + $(LIBBIND9_CFLAGS) \ + $(GSSAPI_CFLAGS) \ + $(KRB5_CFLAGS) + +AM_CPPFLAGS += \ + -DSESSION_KEYFILE=\"${localstatedir}/run/named/session.key\" + +LDADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBISCCFG_LIBS) \ + $(LIBIRS_LIBS) \ + $(LIBBIND9_LIBS) \ + $(READLINE_LIB) \ + $(GSSAPI_LIBS) \ + $(KRB5_LIBS) + +bin_PROGRAMS = nsupdate diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index ce3798968d..549df9979c 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -74,14 +75,23 @@ #include -#ifdef GSSAPI +#if HAVE_GSSAPI #include -#ifdef WIN32 + +#if HAVE_KRB5_KRB5_H #include -#else /* ifdef WIN32 */ -#include ISC_PLATFORM_KRB5HEADER -#endif /* ifdef WIN32 */ -#endif /* ifdef GSSAPI */ +#elif HAVE_KRB5_H +#include +#endif + +#if HAVE_GSSAPI_GSSAPI_H +#include +#elif HAVE_GSSAPI_H +#include +#endif + +#endif /* HAVE_GSSAPI */ + #include #if defined(HAVE_READLINE) @@ -189,9 +199,8 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg, static void send_update(dns_name_t *zonename, isc_sockaddr_t *master); -ISC_PLATFORM_NORETURN_PRE static void -fatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); static void debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); @@ -199,7 +208,7 @@ debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); static void ddebug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); -#ifdef GSSAPI +#if HAVE_GSSAPI static dns_fixedname_t fkname; static isc_sockaddr_t *kserver = NULL; static char *realm = NULL; @@ -212,7 +221,7 @@ typedef struct nsu_gssinfo { } nsu_gssinfo_t; static void -failed_gssrequest(); +failed_gssrequest(void); static void start_gssrequest(dns_name_t *master); static void @@ -220,7 +229,7 @@ send_gssrequest(isc_sockaddr_t *destaddr, dns_message_t *msg, dns_request_t **request, gss_ctx_id_t context); static void recvgss(isc_task_t *task, isc_event_t *event); -#endif /* GSSAPI */ +#endif /* HAVE_GSSAPI */ static void error(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); @@ -1005,7 +1014,7 @@ get_addresses(char *host, in_port_t port, isc_sockaddr_t *sockaddr, static void version(void) { - fputs("nsupdate " VERSION "\n", stderr); + fprintf(stderr, "nsupdate %s\n", PACKAGE_VERSION); } #define PARSE_ARGS_FMT "46dDML:y:ghilovk:p:Pr:R::t:Tu:V" @@ -1228,13 +1237,13 @@ parse_args(int argc, char **argv) { exit(1); } -#ifdef GSSAPI +#if HAVE_GSSAPI if (usegsstsig && (keyfile != NULL || keystr != NULL)) { fprintf(stderr, "%s: cannot specify -g with -k or -y\n", argv[0]); exit(1); } -#else /* ifdef GSSAPI */ +#else /* HAVE_GSSAPI */ if (usegsstsig) { fprintf(stderr, "%s: cannot specify -g or -o, " @@ -1242,7 +1251,7 @@ parse_args(int argc, char **argv) { argv[0]); exit(1); } -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ if (argv[isc_commandline_index] != NULL) { if (strcmp(argv[isc_commandline_index], "-") == 0) { @@ -1698,7 +1707,7 @@ evaluate_zone(char *cmdline) { static uint16_t evaluate_realm(char *cmdline) { -#ifdef GSSAPI +#if HAVE_GSSAPI char *word; char buf[1024]; int n; @@ -1720,10 +1729,10 @@ evaluate_realm(char *cmdline) { } realm = isc_mem_strdup(gmctx, buf); return (STATUS_MORE); -#else /* ifdef GSSAPI */ +#else /* HAVE_GSSAPI */ UNUSED(cmdline); return (STATUS_SYNTAX); -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ } static uint16_t @@ -2201,25 +2210,25 @@ do_next_command(char *cmdline) { return (evaluate_checknames(cmdline)); } if (strcasecmp(word, "gsstsig") == 0) { -#ifdef GSSAPI +#if HAVE_GSSAPI usegsstsig = true; use_win2k_gsstsig = false; -#else /* ifdef GSSAPI */ +#else /* HAVE_GSSAPI */ fprintf(stderr, "gsstsig not supported\n"); -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ return (STATUS_MORE); } if (strcasecmp(word, "oldgsstsig") == 0) { -#ifdef GSSAPI +#if HAVE_GSSAPI usegsstsig = true; use_win2k_gsstsig = true; -#else /* ifdef GSSAPI */ +#else /* HAVE_GSSAPI */ fprintf(stderr, "gsstsig not supported\n"); -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ return (STATUS_MORE); } if (strcasecmp(word, "help") == 0) { - fprintf(stdout, "nsupdate " VERSION ":\n" + fprintf(stdout, "nsupdate " PACKAGE_VERSION ":\n" "local address [port] (set local " "resolver)\n" "server address [port] (set master server " @@ -2261,7 +2270,7 @@ do_next_command(char *cmdline) { return (STATUS_MORE); } if (strcasecmp(word, "version") == 0) { - fprintf(stdout, "nsupdate " VERSION "\n"); + fprintf(stdout, "nsupdate " PACKAGE_VERSION "\n"); return (STATUS_MORE); } fprintf(stderr, "incorrect section name: %s\n", word); @@ -2770,7 +2779,7 @@ lookforsoa: } dns_rdata_freestruct(&soa); -#ifdef GSSAPI +#if HAVE_GSSAPI if (usegsstsig) { dns_name_init(&tmpzonename, NULL); dns_name_dup(zname, gmctx, &tmpzonename); @@ -2781,10 +2790,10 @@ lookforsoa: send_update(zname, &master_servers[master_inuse]); setzoneclass(dns_rdataclass_none); } -#else /* ifdef GSSAPI */ +#else /* HAVE_GSSAPI */ send_update(zname, &master_servers[master_inuse]); setzoneclass(dns_rdataclass_none); -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ dns_message_destroy(&soaquery); dns_request_destroy(&request); @@ -2838,7 +2847,7 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg, requests++; } -#ifdef GSSAPI +#if HAVE_GSSAPI /* * Get the realm from the users kerberos ticket if possible @@ -2893,7 +2902,7 @@ get_ticket_realm(isc_mem_t *mctx) { } static void -failed_gssrequest() { +failed_gssrequest(void) { seenerror = true; dns_name_free(&tmpzonename, gmctx); @@ -3199,7 +3208,7 @@ done: dns_message_destroy(&rcvmsg); ddebug("Out of recvgss"); } -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ static void start_update(void) { @@ -3298,7 +3307,7 @@ cleanup(void) { dns_message_destroy(&answer); } -#ifdef GSSAPI +#if HAVE_GSSAPI if (tsigkey != NULL) { ddebug("detach tsigkey x%p", tsigkey); dns_tsigkey_detach(&tsigkey); @@ -3321,7 +3330,7 @@ cleanup(void) { if (dns_name_dynamic(&restart_master)) { dns_name_free(&restart_master, gmctx); } -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ if (sig0key != NULL) { dst_key_free(&sig0key); diff --git a/bin/pkcs11/Makefile.am b/bin/pkcs11/Makefile.am new file mode 100644 index 0000000000..1bcd014980 --- /dev/null +++ b/bin/pkcs11/Makefile.am @@ -0,0 +1,13 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) + +LDADD = \ + $(LIBISC_LIBS) + +bin_PROGRAMS = \ + pkcs11-list \ + pkcs11-destroy \ + pkcs11-keygen \ + pkcs11-tokens diff --git a/bin/plugins/Makefile.am b/bin/plugins/Makefile.am new file mode 100644 index 0000000000..c29b2615db --- /dev/null +++ b/bin/plugins/Makefile.am @@ -0,0 +1,12 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) + +pkglib_LTLIBRARIES = filter-aaaa.la + +filter_aaaa_la_SOURCES = filter-aaaa.c +filter_aaaa_la_LDFLAGS = -avoid-version -module -shared -export-dynamic diff --git a/bin/plugins/filter-aaaa.c b/bin/plugins/filter-aaaa.c index e787b43471..d34e0754ea 100644 --- a/bin/plugins/filter-aaaa.c +++ b/bin/plugins/filter-aaaa.c @@ -11,6 +11,13 @@ /*! \file */ +/* aliases for the exported symbols */ + +#define plugin_destroy filter_aaaa_LTX_plugin_destroy +#define plugin_register filter_aaaa_LTX_plugin_register +#define plugin_version filter_aaaa_LTX_plugin_version +#define plugin_check filter_aaaa_LTX_plugin_check + #include #include #include diff --git a/bin/rndc/Makefile.am b/bin/rndc/Makefile.am new file mode 100644 index 0000000000..a668522bc2 --- /dev/null +++ b/bin/rndc/Makefile.am @@ -0,0 +1,26 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBISCCC_CFLAGS) \ + $(LIBBIND9_CFLAGS) + +AM_CPPFLAGS += \ + -DRNDC_CONFFILE=\"${sysconfdir}/rndc.conf\" \ + -DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" + +sbin_PROGRAMS = rndc + +rndc_SOURCES = \ + rndc.c \ + util.c \ + util.h + +rndc_LDADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBISCCC_LIBS) \ + $(LIBISCCFG_LIBS) \ + $(LIBBIND9_LIBS) diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index f238b1d584..ba91747657 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -59,7 +60,7 @@ bool verbose; static const char *admin_conffile; static const char *admin_keyfile; -static const char *version = VERSION; +static const char *version = PACKAGE_VERSION; static const char *servername = NULL; static isc_sockaddr_t serveraddrs[SERVERADDRS]; static isc_sockaddr_t local4, local6; @@ -89,8 +90,8 @@ static bool showresult = false; static void rndc_startconnect(isc_sockaddr_t *addr, isc_task_t *task); -ISC_PLATFORM_NORETURN_PRE static void -usage(int status) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(int status); static void usage(int status) { diff --git a/bin/rndc/util.h b/bin/rndc/util.h index ec9b181780..21cc8de1e9 100644 --- a/bin/rndc/util.h +++ b/bin/rndc/util.h @@ -14,6 +14,7 @@ /*! \file */ +#include #include #include #include @@ -35,9 +36,8 @@ ISC_LANG_BEGINDECLS void notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2); -ISC_PLATFORM_NORETURN_PRE void -fatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); ISC_LANG_ENDDECLS diff --git a/bin/tests/.gitignore b/bin/tests/.gitignore index 3b0c4b29cc..7ec87dd31a 100644 --- a/bin/tests/.gitignore +++ b/bin/tests/.gitignore @@ -9,4 +9,3 @@ dlopen keycreate keydelete gssapi_krb -makejournal diff --git a/bin/tests/Makefile.am b/bin/tests/Makefile.am new file mode 100644 index 0000000000..d4008c0dd0 --- /dev/null +++ b/bin/tests/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = system diff --git a/bin/tests/bigtest/README b/bin/tests/bigtest/README deleted file mode 100644 index 0daea5c933..0000000000 --- a/bin/tests/bigtest/README +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. - - bash buildzones.sh < zones # creates setup, run, servers/* master/* - # named.conf - sudo sh setup # configure interfaces - sh run # setup - - ../named/named [-g] -c named.conf - - sh tests.sh < zones - - sudo sh teardown # teardown interfaces - -The test server can controlled with - - rndc -k rndc.key -s 127.127.0.0 -p 5300 diff --git a/bin/tests/bigtest/buildzones.sh b/bin/tests/bigtest/buildzones.sh deleted file mode 100644 index f8d531a789..0000000000 --- a/bin/tests/bigtest/buildzones.sh +++ /dev/null @@ -1,267 +0,0 @@ -#!/bin/bash -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. ../conf.sh - -addr=127.127.0.0 -ttl=300 -named=${NAMED} -keygen=${KEYGEN} -dsfromkey=${DSFROMKEY} - -nextaddr() { - OLDIF="$IFS" - IFS="${IFS}." - set $1 - IFS="$OLDIFS" - _a=$1 _b=$2 _c=$3 _d=$4 - _d=$(($_d + 1)) - case $_d in - 256) _c=$(($_c + 1)); _d=0;; - esac - case $_c in - 256) _b=$(($_b + 1)); _c=0;; - esac - echo $_a.$_b.$_c.$_d -} - -parent() { - OLDIF="$IFS" - IFS="${IFS}." - set $1 - IFS="$OLDIFS" - shift - while [ $# -ne 0 ] - do - printf %s ${1} - shift - printf %s ${1:+.} - - done -} - -blackhole() { - echo 'options {' - echo ' port 5300;' - echo " listen-on { $1; };" - echo " query-source $1;" - echo " notify-source $1;" - echo " transfer-source $1;" - echo ' key-directory "keys";' - echo " recursion ${2:-no};" - echo ' pid-file "pids/'"${addr}"'.pid";' - echo ' blackhole { 127.127.0.0; };' - echo '};' -} - -refuse() { - echo 'options {' - echo ' port 5300;' - echo " listen-on { $1; };" - echo " query-source $1;" - echo " notify-source $1;" - echo " transfer-source $1;" - echo ' key-directory "keys";' - echo " recursion ${2:-no};" - echo ' pid-file "pids/'"${addr}"'.pid";' - echo ' allow-query { !127.127.0.0; any; };' - echo '};' -} - -options() { - echo 'options {' - echo ' port 5300;' - echo " listen-on { $1; };" - echo " query-source $1;" - echo " notify-source $1;" - echo " transfer-source $1;" - echo ' key-directory "keys";' - echo " recursion ${2:-no};" - echo ' pid-file "pids/'"${addr}"'.pid";' - echo '};' -} - -controls() { - echo 'include "rndc.key";' - echo "controls { inet $addr port 9953 allow { any; } keys { "rndc-key"; }; };" -} - -delay() { - _s=$1 - OLDIF="$IFS" - IFS="${IFS}/" - set ${2:-.} - IFS="$OLDIFS" - - case $1 in - .) _d=;; - *) _d=$1;; - esac - case $_s in - 1) echo -T delay=${_d:-100};; - 2) echo -T delay=${2:-50};; - 3) echo -T delay=${3:-150};; - 4) echo -T delay=${4:-250};; - 5) echo -T delay=${5:-125};; - 6) echo -T delay=${6:-25};; - 7) echo -T delay=${7:-75};; - 8) echo -T delay=${8:-125};; - 9) echo -T delay=${9:-10};; - 10) echo -T delay=${10:-40};; - 11) echo -T delay=${11:-80};; - 12) echo -T delay=${12:-90};; - *) echo -T delay=50;; - esac -} - -trusted-keys () { - awk '$3 == "DNSKEY" { - b = ""; for (i=7; i <= NF; i++) { b = b $i; }; - print "trusted-keys { \""$1"\"",$4,$5,$6,"\""b"\"; };" };' -} - -signed-zone () { - echo "zone "'"'"${1:-.}"'"'" {" - echo " type master;" - echo " file "'"'"master/${2}.db"'"'";" - echo " auto-dnssec maintain;" - echo " allow-update { any; };" - echo "};" -} - -unsigned-zone () { - echo "zone "'"'"${1:-.}"'"'" {" - echo " type master;" - echo " file "'"'"master/${2}.db"'"'";" - echo "};" -} - -slave-zone () { - echo "zone "'"'"${zone:-.}"'"'" {" - echo " type slave;" - echo " masters { ${master}; };" - echo "};" -} - -rm -rf servers master keys setup teardown run -mkdir -p servers -mkdir -p master -mkdir -p keys - -echo "ifconfig lo0 $addr netmask 0xffffffff alias" >> setup -echo "ifconfig lo0 $addr -alias" >> teardown -controls $addr > named.conf -options $addr yes >> named.conf -echo 'zone "." { type hint; file "master/hint.db"; };' >> named.conf - -while read zone servers nsfmt signed delay blackhole refuse flags -do - i=1 - case "${zone}" in - .) file=root zone=;; - *) file="$zone";; - esac - if [ "${zone}" != "" ] ; then - p=$(parent $zone) - case "${p}" in - "") p=root;; - esac - else - p=hint - fi - #echo "zone='${zone}' parent='${p}'" - addr=$(nextaddr $addr) - ns=$(printf "$nsfmt" ${i} "${zone}") - d=$(delay $i ${delay:-.}) - - echo "${zone}. ${ttl} soa ${ns}. hostmaster.${zone}${zone:+.} 1 3600 1200 604800 1200" >> master/${file}.db - echo "${zone}. ${ttl} ns ${ns}." >> master/${file}.db - echo "${ns}. ${ttl} a ${addr}" >> master/${file}.db - echo "${zone}. ${ttl} ns ${ns}." >> master/${p}.db - echo "${ns}. ${ttl} a ${addr}" >> master/${p}.db - if [ $signed = "S" ]; then - kskkey=`${keygen} -K keys -f KSK ${zone:-.}` - zskkey=`${keygen} -K keys ${zone:-.}` - if [ "${zone}" != "" ] ; then - ${dsfromkey} -T ${ttl} keys/${kskkey}.key >> master/${p}.db - else - trusted-keys < keys/${kskkey}.key >> named.conf - fi - fi - echo "ifconfig lo0 $addr netmask 0xffffffff alias" >> setup - echo "ifconfig lo0 $addr -alias" >> teardown - echo "${named} -D bigtest -c servers/${addr}.conf $d $flags" >> run - options ${addr} > servers/${addr}.conf - case ${signed} in - S) signed-zone ${zone:-.} ${file} >> servers/${addr}.conf;; - P) unsigned-zone ${zone:-.} ${file} >> servers/${addr}.conf;; - *) echo ${signed}; exit 1;; - esac - - # slave servers - while [ $i -lt $servers ] - do - master=$addr - i=$(($i + 1)) - ns=$(printf "$nsfmt" ${i} "${zone}") - d=$(delay $i ${delay:-.}) - addr=$(nextaddr $addr) - echo "${zone}. ${ttl} ns ${ns}." >> master/${file}.db - echo "${ns}. ${ttl} a ${addr}" >> master/${file}.db - echo "${zone}. ${ttl} ns ${ns}." >> master/${p}.db - echo "${ns}. ${ttl} a ${addr}" >> master/${p}.db - echo "ifconfig lo0 $addr netmask 0xffffffff alias" >> setup - echo "ifconfig lo0 $addr -alias" >> teardown - echo "${named} -D bigtest -c servers/${addr}.conf $d $flags" >> run - if [ $i = ${refuse:-.} ] - then - refuse $addr > servers/${addr}.conf - elif [ $i = ${blackhole:-.} ] - then - blackhole $addr > servers/${addr}.conf - else - options $addr > servers/${addr}.conf - fi - slave-zone ${zone:-.} ${master} >> servers/${addr}.conf - done - if [ "${zone}" != "" ] ; then - echo "www.${zone}. ${ttl} a 127.0.0.1" >> master/${file}.db - echo "www.${zone}. ${ttl} aaaa ::1" >> master/${file}.db - echo "${zone}. ${ttl} mx 10 mail.${zone}." >> master/${file}.db - echo "mail.${zone}. ${ttl} a 127.0.0.1" >> master/${file}.db - echo "mail.${zone}. ${ttl} aaaa ::1" >> master/${file}.db - echo "*.big.${zone}. ${ttl} txt (" >> master/${file}.db - i=0 - while [ $i -lt 150 ] - do - echo "1234567890" >> master/${file}.db - i=$(($i + 1)) - done - echo ")" >> master/${file}.db - echo "*.medium.${zone}. ${ttl} txt (" >> master/${file}.db - i=0 - while [ $i -lt 120 ] - do - echo "1234567890" >> master/${file}.db - i=$(($i + 1)) - done - echo ")" >> master/${file}.db - echo "*.medium.${zone}. ${ttl} txt (" >> master/${file}.db - i=0 - while [ $i -lt 120 ] - do - echo "1234567890" >> master/${file}.db - i=$(($i + 1)) - done - echo ")" >> master/${file}.db - fi -done diff --git a/bin/tests/bigtest/rndc.key b/bin/tests/bigtest/rndc.key deleted file mode 100644 index f279e14c1a..0000000000 --- a/bin/tests/bigtest/rndc.key +++ /dev/null @@ -1,5 +0,0 @@ -key "rndc-key" { - algorithm hmac-md5; - secret "xxxxxxxxxxxxxxxxxxxxHg=="; -}; - diff --git a/bin/tests/bigtest/tests.sh b/bin/tests/bigtest/tests.sh deleted file mode 100644 index 7b3bd8f04e..0000000000 --- a/bin/tests/bigtest/tests.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -TOP=$( (cd ../../.. && pwd) ) -dig=${TOP}/bin/dig/dig - -cmd="${dig} -p 5300 @127.127.0.0 txt" -inner() { - zone=$1 i=$2 to=$3 - x=$i - dout=dig$x.out - tout=time$x.out - while [ $i -lt $to ] - do - case $zone in - .) zone=;; - esac - - (time -p $cmd $i.${sub}$zone > $dout ) 2> $tout - s=`sed -n '/real/s/[^0-9]*\([0-9]*\)\..*/\1/p' $tout` - case $s in - 0);; - 1) t1=`expr ${t1:-0} + 1`;; - 2) t2=`expr ${t2:-0} + 1`;; - 3) t3=`expr ${t3:-0} + 1`;; - *) echo $i `grep real $tout`;; - esac - - grep "status: \(NXDOMAIN\|NOERROR\)" $dout > /dev/null || { - echo $cmd $i.${sub}$zone - cat $dout - } - i=`expr $i + 1` - done - if test ${t1:-0} -ne 0 -o ${t2:-0} -ne 0 -o ${t3:-0} -ne 0 - then - echo "$x timeouts: t1=${t1:-0} t2=${t2:-0} t3=${t3:-0}" - fi -} - -while read zone rest -do - for sub in "" medium. big. - do - case $zone in - .) echo doing ${sub:-.};; - *) echo doing $sub$zone;; - esac - ( inner $zone 1 100) & - ( inner $zone 101 200) & - ( inner $zone 201 300) & - ( inner $zone 301 400) & - ( inner $zone 401 500) & - ( inner $zone 501 600) & - ( inner $zone 601 700) & - ( inner $zone 701 800) & - ( inner $zone 801 900) & - ( inner $zone 901 1000) & - ( inner $zone 1001 1100) & - ( inner $zone 1101 1200) & - ( inner $zone 1201 1300) & - ( inner $zone 1301 1400) & - ( inner $zone 1401 1500) & - ( inner $zone 1501 1600) & - ( inner $zone 1601 1700) & - wait - done -done diff --git a/bin/tests/bigtest/zones b/bin/tests/bigtest/zones deleted file mode 100644 index 0bdcdfe23f..0000000000 --- a/bin/tests/bigtest/zones +++ /dev/null @@ -1,18 +0,0 @@ -noedns-1.tld 1 ns%u.%s P . x x -T noedns -dropedns-1.tld 1 ns%u.%s P . x x -T dropedns -maxudp512-1.tld 1 ns%u.%s S . x x -T maxudp=512 -maxudp1460-1.tld 1 ns%u.%s S . x x -T maxudp=1460 -plain-1.tld 1 ns%u.%s S . x x -noedns-3.tld 3 ns%u.%s P . 2 x -T noedns -dropedns-3.tld 3 ns%u.%s P . 2 x -T dropedns -maxudp512-3.tld 3 ns%u.%s S . x x -T maxudp=512 -maxudp1460-3.tld 3 ns%u.%s S . x x -T maxudp=1460 -plain-3.tld 3 ns%u.%s S . x 3 -noedns-5.tld 5 ns%u.%s P . 3 x -T noedns -dropedns-5.tld 5 ns%u.%s P . x x -T dropedns -maxudp512-5.tld 5 ns%u.%s S . x x -T maxudp=512 -maxudp1460-5.tld 5 ns%u.%s S . x x -T maxudp=1460 -400ms-1.tld 5 ns%u.%s S 400/400/400/400/400 2 x -plain-5.tld 5 ns%u.%s S . x x -tld 12 ns%u.%s S . 5 8 -. 12 ns%u.root-servers.nil%s S . x x diff --git a/bin/tests/optional/.gitignore b/bin/tests/optional/.gitignore deleted file mode 100644 index 0d89a8600c..0000000000 --- a/bin/tests/optional/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/backtrace_test.dSYM/ -/backtrace_test0.dSYM/ -/nsecify diff --git a/bin/tests/optional/Kchild.example.+005+33180.key b/bin/tests/optional/Kchild.example.+005+33180.key deleted file mode 100644 index ab92a6af4d..0000000000 --- a/bin/tests/optional/Kchild.example.+005+33180.key +++ /dev/null @@ -1,5 +0,0 @@ -; This is a zone-signing key, keyid 33180, for child.example. -; Created: 20181025104746 (Thu Oct 25 12:47:46 2018) -; Publish: 20181025104746 (Thu Oct 25 12:47:46 2018) -; Activate: 20181025104746 (Thu Oct 25 12:47:46 2018) -child.example. IN DNSKEY 256 3 5 AwEAAb9eatC8ASzDnRApcZuxyBrvJRANRQjCXQ1FWK+8vEyXV5NIE9Km hKIV2wbq2tLBPfjNQz4BTJ9RmDINf1RayDlt6L+IQV1JCaDaMjd1zU3n SQK18Y7fMu0ww4AMKOnoVRbkIxa3zlA0chImXcfPE0q2AvKBYLzPfkPO cfplAuRkLcGUxdADCipNzCOakpcd5gfm9Sa2HlaXcw3gyI1WcE8= diff --git a/bin/tests/optional/Kchild.example.+005+33180.private b/bin/tests/optional/Kchild.example.+005+33180.private deleted file mode 100644 index 83a50dfe42..0000000000 --- a/bin/tests/optional/Kchild.example.+005+33180.private +++ /dev/null @@ -1,13 +0,0 @@ -Private-key-format: v1.3 -Algorithm: 5 (RSASHA1) -Modulus: v15q0LwBLMOdEClxm7HIGu8lEA1FCMJdDUVYr7y8TJdXk0gT0qaEohXbBura0sE9+M1DPgFMn1GYMg1/VFrIOW3ov4hBXUkJoNoyN3XNTedJArXxjt8y7TDDgAwo6ehVFuQjFrfOUDRyEiZdx88TSrYC8oFgvM9+Q85x+mUC5GQtwZTF0AMKKk3MI5qSlx3mB+b1JrYeVpdzDeDIjVZwTw== -PublicExponent: AQAB -PrivateExponent: WDsn9GU6BXGLENCK2MX3BLQN2oDDu24hiOTYJu5VwtpkPjuVKCIuNKzu9xmBGnqOIBBDWGsw8KOmEC247yOL/S53iRdBS8lI7yiqznc52RhlmrdPKXbNpVnPwil8wocw+oQYa7uvdPYxI2Yy3B/tRgUxlxSlc/LW/dr0BX2L7qr/aeOBeGSRUlCpc7tYU9a2RUaLpVxF6SlqicCpC91MAQ== -Prime1: 466f+JL66Bl4qYnkj0s9+1N3pYmdcM9Ja1AN66X4VLslA9Cm1JEaC5V9HOptfcXUk0XYEVnKeKM2lIQnvcLG0yuQHIa+pGi7P8vgQfdaRUE= -Prime2: 1yuUkTVRSbUWeUreEcHgeeBBJ61UshX7t07gnGgIr3artGdo2CVEb5//+2Mvj5bgjCQBvjBbmHNZrR0jKDRBTIGtqbBerOuhEN4AXdAEgY8= -Exponent1: KzUXbJ/P973ltR7S/hKEV66WVRbRhvf/cdsGWULs5n+BXcD59/r1W19qF9OxJZ4mYjBt+ZT1pIEsuXB+7jcJbkelGJTFlwO9DTVOgJZFTkE= -Exponent2: FTPsLertGbBIiKdB/sn2Dsx0Xy6LXAkihsu1AnSV9oRhIyPVhwcVGVLQ7Lq3YxThB648pbsqK3miapamcj3D+YAF1uTUT4Hgm0LlEll/OC0= -Coefficient: Vulw9kmmjKc+wmOukLdzheoA2hNPDVtgiynfzHybyXdqvapCoK+ZVmNFzjO0M41ATcpvya3iX0bekMQqYnBhLURNZUIyqz2nGskOjV8I5Jg= -Created: 20181025104746 -Publish: 20181025104746 -Activate: 20181025104746 diff --git a/bin/tests/optional/adb_test.c b/bin/tests/optional/adb_test.c deleted file mode 100644 index b232914574..0000000000 --- a/bin/tests/optional/adb_test.c +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -typedef struct client client_t; -struct client { - dns_name_t name; - const char *target; - ISC_LINK(client_t) link; - dns_adbfind_t *find; -}; - -static isc_mem_t *mctx = NULL; -static isc_mempool_t *cmp; -static isc_log_t *lctx; -static isc_logconfig_t *lcfg; -static isc_taskmgr_t *taskmgr; -static isc_socketmgr_t *socketmgr; -static isc_timermgr_t *timermgr; -static dns_dispatchmgr_t *dispatchmgr; -static isc_task_t *t1, *t2; -static dns_view_t *view; -static dns_db_t *rootdb; -static ISC_LIST(client_t) clients; -static isc_mutex_t client_lock; -static isc_stdtime_t now; -static dns_adb_t *adb; - -static void -check_result(isc_result_t result, const char *format, ...) - ISC_FORMAT_PRINTF(2, 3); - -static void -check_result(isc_result_t result, const char *format, ...) { - va_list args; - - if (result == ISC_R_SUCCESS) { - return; - } - - va_start(args, format); - vfprintf(stderr, format, args); - va_end(args); - fprintf(stderr, ": %s\n", isc_result_totext(result)); - exit(1); -} - -static client_t * -new_client(void) { - client_t *client; - - client = isc_mempool_get(cmp); - INSIST(client != NULL); - dns_name_init(&client->name, NULL); - ISC_LINK_INIT(client, link); - client->find = NULL; - - return (client); -} - -static void -free_client(client_t **c) { - client_t *client; - - INSIST(c != NULL); - client = *c; - *c = NULL; - INSIST(client != NULL); - dns_name_free(&client->name, mctx); - INSIST(!ISC_LINK_LINKED(client, link)); - INSIST(client->find == NULL); - - isc_mempool_put(cmp, client); -} - -static inline void -CLOCK(void) { - RUNTIME_CHECK(isc_mutex_lock(&client_lock) == ISC_R_SUCCESS); -} - -static inline void -CUNLOCK(void) { - RUNTIME_CHECK(isc_mutex_unlock(&client_lock) == ISC_R_SUCCESS); -} - -static void -lookup_callback(isc_task_t *task, isc_event_t *ev) { - client_t *client; - - client = ev->ev_arg; - INSIST(client->find == ev->ev_sender); - - printf("NAME %s:\n\tTask %p got event %p type %08x from %p, client " - "%p\n\terr4: %s err6: %s\n", - client->target, task, ev, ev->ev_type, client->find, client, - isc_result_totext(client->find->result_v4), - isc_result_totext(client->find->result_v6)); - - isc_event_free(&ev); - ev = NULL; - - CLOCK(); - - dns_adb_dumpfind(client->find, stderr); - dns_adb_destroyfind(&client->find); - - ISC_LIST_UNLINK(clients, client, link); - free_client(&client); - - CUNLOCK(); -} - -static void -create_managers(void) { - isc_result_t result; - - taskmgr = NULL; - result = isc_taskmgr_create(mctx, 5, 0, NULL, &taskmgr); - check_result(result, "isc_taskmgr_create"); - - timermgr = NULL; - result = isc_timermgr_create(mctx, &timermgr); - check_result(result, "isc_timermgr_create"); - - socketmgr = NULL; - result = isc_socketmgr_create(mctx, &socketmgr); - check_result(result, "isc_socketmgr_create"); - - dispatchmgr = NULL; - result = dns_dispatchmgr_create(mctx, &dispatchmgr); - check_result(result, "dns_dispatchmgr_create"); -} - -static void -create_view(void) { - dns_cache_t *cache; - isc_result_t result; - - /* - * View. - */ - view = NULL; - result = dns_view_create(mctx, dns_rdataclass_in, "_default", &view); - check_result(result, "dns_view_create"); - - /* - * Cache. - */ - cache = NULL; - result = dns_cache_create(mctx, mctx, taskmgr, timermgr, - dns_rdataclass_in, "", "rbt", 0, NULL, - &cache); - check_result(result, "dns_cache_create"); - dns_view_setcache(view, cache, false); - dns_cache_detach(&cache); - - { - unsigned int attrs; - isc_sockaddr_t any4, any6; - dns_dispatch_t *disp4 = NULL; - dns_dispatch_t *disp6 = NULL; - - isc_sockaddr_any(&any4); - isc_sockaddr_any6(&any6); - - attrs = DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_UDP; - RUNTIME_CHECK(dns_dispatch_getudp(dispatchmgr, socketmgr, - taskmgr, &any4, 512, 6, 1024, - 17, 19, attrs, attrs, - &disp4) == ISC_R_SUCCESS); - INSIST(disp4 != NULL); - - attrs = DNS_DISPATCHATTR_IPV6 | DNS_DISPATCHATTR_UDP; - RUNTIME_CHECK(dns_dispatch_getudp(dispatchmgr, socketmgr, - taskmgr, &any6, 512, 6, 1024, - 17, 19, attrs, attrs, - &disp6) == ISC_R_SUCCESS); - INSIST(disp6 != NULL); - - RUNTIME_CHECK(dns_view_createresolver(view, taskmgr, 10, 1, - socketmgr, timermgr, 0, - dispatchmgr, disp4, - disp6) == ISC_R_SUCCESS); - } - - rootdb = NULL; - result = dns_rootns_create(mctx, dns_rdataclass_in, NULL, &rootdb); - check_result(result, "dns_rootns_create()"); - dns_view_sethints(view, rootdb); - dns_db_detach(&rootdb); - - dns_view_freeze(view); -} - -static void -lookup(const char *target) { - dns_name_t name; - unsigned char namedata[256]; - client_t *client; - isc_buffer_t t, namebuf; - isc_result_t result; - unsigned int options; - - INSIST(target != NULL); - - client = new_client(); - isc_buffer_constinit(&t, target, strlen(target)); - isc_buffer_add(&t, strlen(target)); - isc_buffer_init(&namebuf, namedata, sizeof(namedata)); - dns_name_init(&name, NULL); - result = dns_name_fromtext(&name, &t, dns_rootname, 0, &namebuf); - check_result(result, "dns_name_fromtext %s", target); - - dns_name_dup(&name, mctx, &client->name); - - options = 0; - options |= DNS_ADBFIND_INET; - options |= DNS_ADBFIND_INET6; - options |= DNS_ADBFIND_WANTEVENT; - options |= DNS_ADBFIND_HINTOK; - options |= DNS_ADBFIND_GLUEOK; - result = dns_adb_createfind( - adb, t2, lookup_callback, client, &client->name, dns_rootname, - 0, options, now, NULL, view->dstport, 0, NULL, &client->find); - if (result != ISC_R_SUCCESS) { - printf("DNS_ADB_CREATEFIND -> %s\n", dns_result_totext(result)); - } - dns_adb_dumpfind(client->find, stderr); - - if ((client->find->options & DNS_ADBFIND_WANTEVENT) != 0) { - client->target = target; - ISC_LIST_APPEND(clients, client, link); - } else { - printf("NAME %s: err4 %s, err6 %s\n", target, - isc_result_totext(client->find->result_v4), - isc_result_totext(client->find->result_v6)); - - dns_adb_destroyfind(&client->find); - free_client(&client); - } -} - -int -main(int argc, char **argv) { - isc_result_t result; - isc_logdestination_t destination; - - UNUSED(argc); - UNUSED(argv); - - dns_result_register(); - result = isc_app_start(); - check_result(result, "isc_app_start()"); - - isc_stdtime_get(&now); - - isc_mutex_init(&client_lock); - - ISC_LIST_INIT(clients); - - /* - * EVERYTHING needs a memory context. - */ - isc_mem_create(&mctx); - - cmp = NULL; - isc_mempool_create(mctx, sizeof(client_t), &cmp); - isc_mempool_setname(cmp, "adb test clients"); - - isc_log_create(mctx, &lctx, &lcfg); - isc_log_setcontext(lctx); - dns_log_init(lctx); - dns_log_setcontext(lctx); - - /* - * Create and install the default channel. - */ - destination.file.stream = stderr; - destination.file.name = NULL; - destination.file.versions = ISC_LOG_ROLLNEVER; - destination.file.maximum_size = 0; - isc_log_createchannel(lcfg, "_default", ISC_LOG_TOFILEDESC, - ISC_LOG_DYNAMIC, &destination, ISC_LOG_PRINTTIME); - - result = isc_log_usechannel(lcfg, "_default", NULL, NULL); - check_result(result, "isc_log_usechannel()"); - - /* - * Set the initial debug level. - */ - isc_log_setdebuglevel(lctx, 2); - - create_managers(); - - t1 = NULL; - result = isc_task_create(taskmgr, 0, &t1); - check_result(result, "isc_task_create t1"); - t2 = NULL; - result = isc_task_create(taskmgr, 0, &t2); - check_result(result, "isc_task_create t2"); - - printf("task 1 = %p\n", t1); - printf("task 2 = %p\n", t2); - - create_view(); - - adb = view->adb; - - /* - * Lock the entire client list here. This will cause all events - * for found names to block as well. - */ - CLOCK(); - lookup("f.root-servers.net."); /* Should be in hints */ - lookup("www.iengines.com"); /* should fetch */ - lookup("www.isc.org"); /* should fetch */ - lookup("www.flame.org"); /* should fetch */ - lookup("kechara.flame.org."); /* should fetch */ - lookup("moghedien.flame.org."); /* should fetch */ - lookup("mailrelay.flame.org."); /* should fetch */ - lookup("ipv4v6.flame.org."); /* should fetch */ - lookup("nonexistent.flame.org."); /* should fail to be found */ - lookup("foobar.badns.flame.org."); /* should fail utterly (NS) */ - lookup("i.root-servers.net."); /* Should be in hints */ - lookup("www.firstcard.com."); - lookup("dns04.flame.org."); - CUNLOCK(); - - sleep(10); - - dns_adb_dump(adb, stderr); - - sleep(10); - - CLOCK(); - lookup("f.root-servers.net."); /* Should be in hints */ - lookup("www.iengines.com"); /* should fetch */ - lookup("www.isc.org"); /* should fetch */ - lookup("www.flame.org"); /* should fetch */ - lookup("kechara.flame.org."); /* should fetch */ - lookup("moghedien.flame.org."); /* should fetch */ - lookup("mailrelay.flame.org."); /* should fetch */ - lookup("ipv4v6.flame.org."); /* should fetch */ - lookup("nonexistent.flame.org."); /* should fail to be found */ - lookup("foobar.badns.flame.org."); /* should fail utterly (NS) */ - lookup("i.root-servers.net."); /* Should be in hints */ - CUNLOCK(); - - sleep(20); - - dns_adb_dump(adb, stderr); - - isc_task_detach(&t1); - isc_task_detach(&t2); - - isc_mem_stats(mctx, stdout); - dns_adb_dump(adb, stderr); - - isc_app_run(); - - dns_adb_dump(adb, stderr); - - dns_view_detach(&view); - adb = NULL; - - fprintf(stderr, "Destroying socket manager\n"); - isc_socketmgr_destroy(&socketmgr); - fprintf(stderr, "Destroying timer manager\n"); - isc_timermgr_destroy(&timermgr); - - fprintf(stderr, "Destroying task manager\n"); - isc_taskmgr_destroy(&taskmgr); - - isc_log_destroy(&lctx); - - isc_mempool_destroy(&cmp); - isc_mem_stats(mctx, stdout); - isc_mem_destroy(&mctx); - - isc_app_finish(); - - return (0); -} diff --git a/bin/tests/optional/backtrace_test.c b/bin/tests/optional/backtrace_test.c deleted file mode 100644 index 5527835eee..0000000000 --- a/bin/tests/optional/backtrace_test.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include - -static int -func3() { - void *tracebuf[16]; - int nframes; - isc_result_t result; - - result = isc_backtrace_gettrace(tracebuf, 16, &nframes); - if (result != ISC_R_SUCCESS) { - printf("isc_backtrace_gettrace failed: %s\n", - isc_result_totext(result)); - return (1); - } - - if (nframes < 4) { - printf("Unexpected result:\n"); - printf(" # of frames: %d (expected: at least 4)\n", nframes); - return (1); - } - - return (0); -} - -static int -func2() { - return (func3()); -} - -static int -func1() { - return (func2()); -} - -int -main() { - return (func1()); -} diff --git a/bin/tests/optional/byaddr_test.c b/bin/tests/optional/byaddr_test.c deleted file mode 100644 index b629d68663..0000000000 --- a/bin/tests/optional/byaddr_test.c +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static void -done(isc_task_t *task, isc_event_t *event) { - dns_byaddrevent_t *bevent; - dns_byaddr_t *byaddr; - dns_name_t *name; - - REQUIRE(event->ev_type == DNS_EVENT_BYADDRDONE); - bevent = (dns_byaddrevent_t *)event; - - UNUSED(task); - - printf("byaddr event result = %s\n", isc_result_totext(bevent->result)); - - if (bevent->result == ISC_R_SUCCESS) { - for (name = ISC_LIST_HEAD(bevent->names); name != NULL; - name = ISC_LIST_NEXT(name, link)) - { - char text[DNS_NAME_FORMATSIZE]; - dns_name_format(name, text, sizeof(text)); - printf("%s\n", text); - } - } - - byaddr = event->ev_sender; - dns_byaddr_destroy(&byaddr); - isc_event_free(&event); - - isc_app_shutdown(); -} - -int -main(int argc, char *argv[]) { - isc_mem_t *mctx; - bool verbose = false; - unsigned int workers = 2; - isc_taskmgr_t *taskmgr; - isc_task_t *task; - isc_timermgr_t *timermgr; - dns_view_t *view; - int ch; - isc_socketmgr_t *socketmgr; - dns_dispatchmgr_t *dispatchmgr; - isc_netaddr_t na; - dns_byaddr_t *byaddr; - isc_result_t result; - unsigned int options = 0; - dns_cache_t *cache; - - RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS); - - dns_result_register(); - - mctx = NULL; - isc_mem_create(&mctx); - - while ((ch = isc_commandline_parse(argc, argv, "nvw:")) != -1) { - switch (ch) { - case 'n': - /* - * We only try nibbles, so do nothing for this option. - */ - break; - case 'v': - verbose = true; - break; - case 'w': - workers = (unsigned int)atoi(isc_commandline_argument); - break; - } - } - - if (verbose) { - printf("%u workers\n", workers); - printf("IPv4: %s\n", isc_result_totext(isc_net_probeipv4())); - printf("IPv6: %s\n", isc_result_totext(isc_net_probeipv6())); - } - - taskmgr = NULL; - RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, NULL, &taskmgr) == - ISC_R_SUCCESS); - task = NULL; - RUNTIME_CHECK(isc_task_create(taskmgr, 0, &task) == ISC_R_SUCCESS); - isc_task_setname(task, "byaddr", NULL); - - dispatchmgr = NULL; - RUNTIME_CHECK(dns_dispatchmgr_create(mctx, &dispatchmgr) == - ISC_R_SUCCESS); - - timermgr = NULL; - RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == ISC_R_SUCCESS); - socketmgr = NULL; - RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS); - - cache = NULL; - RUNTIME_CHECK(dns_cache_create(mctx, mctx, taskmgr, timermgr, - dns_rdataclass_in, "", "rbt", 0, NULL, - &cache) == ISC_R_SUCCESS); - - view = NULL; - RUNTIME_CHECK(dns_view_create(mctx, dns_rdataclass_in, "default", - &view) == ISC_R_SUCCESS); - - { - unsigned int attrs; - dns_dispatch_t *disp4 = NULL; - dns_dispatch_t *disp6 = NULL; - - if (isc_net_probeipv4() == ISC_R_SUCCESS) { - isc_sockaddr_t any4; - - isc_sockaddr_any(&any4); - - attrs = DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_UDP; - RUNTIME_CHECK( - dns_dispatch_getudp(dispatchmgr, socketmgr, - taskmgr, &any4, 512, 6, - 1024, 17, 19, attrs, attrs, - &disp4) == ISC_R_SUCCESS); - INSIST(disp4 != NULL); - } - - if (isc_net_probeipv6() == ISC_R_SUCCESS) { - isc_sockaddr_t any6; - - isc_sockaddr_any6(&any6); - - attrs = DNS_DISPATCHATTR_IPV6 | DNS_DISPATCHATTR_UDP; - RUNTIME_CHECK( - dns_dispatch_getudp(dispatchmgr, socketmgr, - taskmgr, &any6, 512, 6, - 1024, 17, 19, attrs, attrs, - &disp6) == ISC_R_SUCCESS); - INSIST(disp6 != NULL); - } - - RUNTIME_CHECK(dns_view_createresolver(view, taskmgr, 10, 1, - socketmgr, timermgr, 0, - dispatchmgr, disp4, - disp6) == ISC_R_SUCCESS); - - if (disp4 != NULL) { - dns_dispatch_detach(&disp4); - } - if (disp6 != NULL) { - dns_dispatch_detach(&disp6); - } - } - - { - struct in_addr ina; - isc_sockaddr_t sa; - isc_sockaddrlist_t sal; - - ISC_LIST_INIT(sal); - ina.s_addr = inet_addr("127.0.0.1"); - isc_sockaddr_fromin(&sa, &ina, 53); - ISC_LIST_APPEND(sal, &sa, link); - - RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname, - &sal, dns_fwdpolicy_only) == - ISC_R_SUCCESS); - } - - dns_view_setcache(view, cache, false); - dns_view_freeze(view); - - dns_cache_detach(&cache); - - printf("address = %s\n", argv[isc_commandline_index]); - na.family = AF_INET; - if (inet_pton(AF_INET, argv[isc_commandline_index], - (char *)&na.type.in) != 1) { - na.family = AF_INET6; - if (inet_pton(AF_INET6, argv[isc_commandline_index], - (char *)&na.type.in6) != 1) { - printf("unknown address format\n"); - exit(1); - } - } - - result = dns_byaddr_create(mctx, &na, view, options, task, done, NULL, - &byaddr); - if (result != ISC_R_SUCCESS) { - printf("dns_byaddr_create() returned %s\n", - isc_result_totext(result)); - RUNTIME_CHECK(0); - } - - (void)isc_app_run(); - - /* - * XXXRTH if we get a control-C before we get to isc_app_run(), - * we're in trouble (because we might try to destroy things before - * they've been created. - */ - - dns_view_detach(&view); - - isc_task_shutdown(task); - isc_task_detach(&task); - - dns_dispatchmgr_destroy(&dispatchmgr); - - isc_taskmgr_destroy(&taskmgr); - - isc_socketmgr_destroy(&socketmgr); - isc_timermgr_destroy(&timermgr); - - if (verbose) { - isc_mem_stats(mctx, stdout); - } - isc_mem_destroy(&mctx); - - isc_app_finish(); - - return (0); -} diff --git a/bin/tests/optional/byname_test.c b/bin/tests/optional/byname_test.c deleted file mode 100644 index 1d6ab599c1..0000000000 --- a/bin/tests/optional/byname_test.c +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static isc_mem_t *mctx = NULL; -static isc_taskmgr_t *taskmgr; -static dns_view_t *view = NULL; -static dns_adbfind_t *find = NULL; -static isc_task_t *task = NULL; -static dns_fixedname_t fixed; -static dns_fixedname_t target; -static isc_log_t *lctx; -static isc_logconfig_t *lcfg; -static unsigned int level = 0; - -static void -adb_callback(isc_task_t *task, isc_event_t *event); - -static void -log_init(void) { - isc_logdestination_t destination; - unsigned int flags; - - /* - * Setup a logging context. - */ - isc_log_create(mctx, &lctx, &lcfg); - isc_log_setcontext(lctx); - dns_log_init(lctx); - dns_log_setcontext(lctx); - - /* - * Create and install the default channel. - */ - destination.file.stream = stderr; - destination.file.name = NULL; - destination.file.versions = ISC_LOG_ROLLNEVER; - destination.file.maximum_size = 0; - flags = ISC_LOG_PRINTTIME; - isc_log_createchannel(lcfg, "_default", ISC_LOG_TOFILEDESC, - ISC_LOG_DYNAMIC, &destination, flags); - - RUNTIME_CHECK(isc_log_usechannel(lcfg, "_default", NULL, NULL) == - ISC_R_SUCCESS); - isc_log_setdebuglevel(lctx, level); -} - -static void -print_addresses(dns_adbfind_t *adbfind) { - dns_adbaddrinfo_t *address; - - for (address = ISC_LIST_HEAD(adbfind->list); address != NULL; - address = ISC_LIST_NEXT(address, publink)) - { - isc_netaddr_t netaddr; - char text[ISC_NETADDR_FORMATSIZE]; - isc_netaddr_fromsockaddr(&netaddr, &address->sockaddr); - isc_netaddr_format(&netaddr, text, sizeof(text)); - printf("%s\n", text); - } -} - -static void -print_name(dns_name_t *name) { - char text[DNS_NAME_FORMATSIZE]; - - dns_name_format(name, text, sizeof(text)); - printf("%s\n", text); -} - -static void -do_find(bool want_event) { - isc_result_t result; - bool done = false; - unsigned int options; - - options = DNS_ADBFIND_INET | DNS_ADBFIND_INET6; - if (want_event) { - options |= DNS_ADBFIND_WANTEVENT | DNS_ADBFIND_EMPTYEVENT; - } - dns_fixedname_init(&target); - result = dns_adb_createfind(view->adb, task, adb_callback, NULL, - dns_fixedname_name(&fixed), dns_rootname, 0, - options, 0, dns_fixedname_name(&target), 0, - 0, NULL, &find); - if (result == ISC_R_SUCCESS) { - if (!ISC_LIST_EMPTY(find->list)) { - /* - * We have at least some of the addresses for the - * name. - */ - INSIST((find->options & DNS_ADBFIND_WANTEVENT) == 0); - print_addresses(find); - done = true; - } else { - /* - * We don't know any of the addresses for this - * name. - */ - if ((find->options & DNS_ADBFIND_WANTEVENT) == 0) { - /* - * And ADB isn't going to send us any events - * either. This query loses. - */ - done = true; - } - /* - * If the DNS_ADBFIND_WANTEVENT flag was set, we'll - * get an event when something happens. - */ - } - } else if (result == DNS_R_ALIAS) { - print_name(dns_fixedname_name(&target)); - done = true; - } else { - printf("dns_adb_createfind() returned %s\n", - isc_result_totext(result)); - done = true; - } - - if (done) { - if (find != NULL) { - dns_adb_destroyfind(&find); - } - isc_app_shutdown(); - } -} - -static void -adb_callback(isc_task_t *etask, isc_event_t *event) { - unsigned int type = event->ev_type; - - REQUIRE(etask == task); - - isc_event_free(&event); - dns_adb_destroyfind(&find); - - if (type == DNS_EVENT_ADBMOREADDRESSES) { - do_find(false); - } else if (type == DNS_EVENT_ADBNOMOREADDRESSES) { - printf("no more addresses\n"); - isc_app_shutdown(); - } else { - printf("unexpected ADB event type %u\n", type); - isc_app_shutdown(); - } -} - -static void -run(isc_task_t *xtask, isc_event_t *event) { - UNUSED(xtask); - do_find(true); - isc_event_free(&event); -} - -int -main(int argc, char *argv[]) { - bool verbose = false; - unsigned int workers = 2; - isc_timermgr_t *timermgr; - int ch; - isc_socketmgr_t *socketmgr; - dns_dispatchmgr_t *dispatchmgr; - dns_cache_t *cache; - isc_buffer_t b; - - RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS); - - dns_result_register(); - - mctx = NULL; - isc_mem_create(&mctx); - - while ((ch = isc_commandline_parse(argc, argv, "d:vw:")) != -1) { - switch (ch) { - case 'd': - level = (unsigned int)atoi(isc_commandline_argument); - break; - case 'v': - verbose = true; - break; - case 'w': - workers = (unsigned int)atoi(isc_commandline_argument); - break; - } - } - - log_init(); - - if (verbose) { - printf("%u workers\n", workers); - printf("IPv4: %s\n", isc_result_totext(isc_net_probeipv4())); - printf("IPv6: %s\n", isc_result_totext(isc_net_probeipv6())); - } - - taskmgr = NULL; - RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, NULL, &taskmgr) == - ISC_R_SUCCESS); - task = NULL; - RUNTIME_CHECK(isc_task_create(taskmgr, 0, &task) == ISC_R_SUCCESS); - isc_task_setname(task, "byname", NULL); - - dispatchmgr = NULL; - RUNTIME_CHECK(dns_dispatchmgr_create(mctx, &dispatchmgr) == - ISC_R_SUCCESS); - - timermgr = NULL; - RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == ISC_R_SUCCESS); - socketmgr = NULL; - RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS); - - cache = NULL; - RUNTIME_CHECK(dns_cache_create(mctx, mctx, taskmgr, timermgr, - dns_rdataclass_in, "", "rbt", 0, NULL, - &cache) == ISC_R_SUCCESS); - - view = NULL; - RUNTIME_CHECK(dns_view_create(mctx, dns_rdataclass_in, "default", - &view) == ISC_R_SUCCESS); - - { - unsigned int attrs; - dns_dispatch_t *disp4 = NULL; - dns_dispatch_t *disp6 = NULL; - - if (isc_net_probeipv4() == ISC_R_SUCCESS) { - isc_sockaddr_t any4; - isc_sockaddr_any(&any4); - - attrs = DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_UDP; - RUNTIME_CHECK( - dns_dispatch_getudp(dispatchmgr, socketmgr, - taskmgr, &any4, 512, 6, - 1024, 17, 19, attrs, attrs, - &disp4) == ISC_R_SUCCESS); - INSIST(disp4 != NULL); - } - - if (isc_net_probeipv6() == ISC_R_SUCCESS) { - isc_sockaddr_t any6; - - isc_sockaddr_any6(&any6); - - attrs = DNS_DISPATCHATTR_IPV6 | DNS_DISPATCHATTR_UDP; - RUNTIME_CHECK( - dns_dispatch_getudp(dispatchmgr, socketmgr, - taskmgr, &any6, 512, 6, - 1024, 17, 19, attrs, attrs, - &disp6) == ISC_R_SUCCESS); - INSIST(disp6 != NULL); - } - - RUNTIME_CHECK(dns_view_createresolver(view, taskmgr, 10, 1, - socketmgr, timermgr, 0, - dispatchmgr, disp4, - disp6) == ISC_R_SUCCESS); - - if (disp4 != NULL) { - dns_dispatch_detach(&disp4); - } - if (disp6 != NULL) { - dns_dispatch_detach(&disp6); - } - } - - { - struct in_addr ina; - isc_sockaddr_t sa; - isc_sockaddrlist_t sal; - - ISC_LIST_INIT(sal); - ina.s_addr = inet_addr("127.0.0.1"); - isc_sockaddr_fromin(&sa, &ina, 53); - ISC_LIST_APPEND(sal, &sa, link); - - REQUIRE(DNS_VIEW_VALID(view)); - RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname, - &sal, dns_fwdpolicy_only) == - ISC_R_SUCCESS); - } - - dns_view_setcache(view, cache, false); - dns_view_freeze(view); - - dns_cache_detach(&cache); - - printf("name = %s\n", argv[isc_commandline_index]); - isc_buffer_init(&b, argv[isc_commandline_index], - strlen(argv[isc_commandline_index])); - isc_buffer_add(&b, strlen(argv[isc_commandline_index])); - dns_fixedname_init(&fixed); - dns_fixedname_init(&target); - RUNTIME_CHECK(dns_name_fromtext(dns_fixedname_name(&fixed), &b, - dns_rootname, 0, - NULL) == ISC_R_SUCCESS); - - RUNTIME_CHECK(isc_app_onrun(mctx, task, run, NULL) == ISC_R_SUCCESS); - - (void)isc_app_run(); - - dns_view_detach(&view); - isc_task_shutdown(task); - isc_task_detach(&task); - - dns_dispatchmgr_destroy(&dispatchmgr); - - isc_taskmgr_destroy(&taskmgr); - - isc_socketmgr_destroy(&socketmgr); - isc_timermgr_destroy(&timermgr); - - isc_log_destroy(&lctx); - - if (verbose) { - isc_mem_stats(mctx, stdout); - } - isc_mem_destroy(&mctx); - - isc_app_finish(); - - return (0); -} diff --git a/bin/tests/optional/db_test.c b/bin/tests/optional/db_test.c deleted file mode 100644 index f4325ba171..0000000000 --- a/bin/tests/optional/db_test.c +++ /dev/null @@ -1,978 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAXHOLD 100 -#define MAXVERSIONS 100 - -typedef struct dbinfo { - dns_db_t *db; - dns_dbversion_t *version; - dns_dbversion_t *wversion; - dns_dbversion_t *rversions[MAXVERSIONS]; - int rcount; - dns_dbnode_t *hold_nodes[MAXHOLD]; - int hold_count; - dns_dbiterator_t *dbiterator; - dns_dbversion_t *iversion; - int pause_every; - bool ascending; - ISC_LINK(struct dbinfo) link; -} dbinfo; - -static isc_mem_t *mctx = NULL; -static char dbtype[128]; -static dns_dbtable_t *dbtable; -static ISC_LIST(dbinfo) dbs; -static dbinfo *cache_dbi = NULL; -static int pause_every = 0; -static bool ascending = true; - -static void -print_result(const char *message, isc_result_t result) { - if (message == NULL) { - message = ""; - } - printf("%s%sresult %08x: %s\n", message, (*message == '\0') ? "" : " ", - result, isc_result_totext(result)); -} - -static void -print_rdataset(dns_name_t *name, dns_rdataset_t *rdataset) { - isc_buffer_t text; - char t[1000]; - isc_result_t result; - isc_region_t r; - - isc_buffer_init(&text, t, sizeof(t)); - result = dns_rdataset_totext(rdataset, name, false, false, &text); - isc_buffer_usedregion(&text, &r); - if (result == ISC_R_SUCCESS) { - printf("%.*s", (int)r.length, (char *)r.base); - } else { - print_result("", result); - } -} - -static void -print_rdatasets(dns_name_t *name, dns_rdatasetiter_t *rdsiter) { - isc_result_t result; - dns_rdataset_t rdataset; - - dns_rdataset_init(&rdataset); - result = dns_rdatasetiter_first(rdsiter); - while (result == ISC_R_SUCCESS) { - dns_rdatasetiter_current(rdsiter, &rdataset); - print_rdataset(name, &rdataset); - dns_rdataset_disassociate(&rdataset); - result = dns_rdatasetiter_next(rdsiter); - } - if (result != ISC_R_NOMORE) { - print_result("", result); - } -} - -static dbinfo * -select_db(char *origintext) { - dns_fixedname_t forigin; - dns_name_t *origin; - isc_buffer_t source; - size_t len; - dbinfo *dbi; - isc_result_t result; - - if (strcasecmp(origintext, "cache") == 0) { - if (cache_dbi == NULL) { - printf("the cache does not exist\n"); - } - return (cache_dbi); - } - len = strlen(origintext); - isc_buffer_init(&source, origintext, len); - isc_buffer_add(&source, len); - origin = dns_fixedname_initname(&forigin); - result = dns_name_fromtext(origin, &source, dns_rootname, 0, NULL); - if (result != ISC_R_SUCCESS) { - print_result("bad name", result); - return (NULL); - } - - for (dbi = ISC_LIST_HEAD(dbs); dbi != NULL; - dbi = ISC_LIST_NEXT(dbi, link)) { - if (dns_name_compare(dns_db_origin(dbi->db), origin) == 0) { - break; - } - } - - return (dbi); -} - -static void -list(dbinfo *dbi, char *seektext) { - dns_fixedname_t fname; - dns_name_t *name; - dns_dbnode_t *node; - dns_rdatasetiter_t *rdsiter; - isc_result_t result; - int i; - size_t len; - dns_fixedname_t fseekname; - dns_name_t *seekname; - isc_buffer_t source; - - name = dns_fixedname_initname(&fname); - - if (dbi->dbiterator == NULL) { - INSIST(dbi->iversion == NULL); - if (dns_db_iszone(dbi->db)) { - if (dbi->version != NULL) { - dns_db_attachversion(dbi->db, dbi->version, - &dbi->iversion); - } else { - dns_db_currentversion(dbi->db, &dbi->iversion); - } - } - - result = dns_db_createiterator(dbi->db, 0, &dbi->dbiterator); - if (result == ISC_R_SUCCESS) { - if (seektext != NULL) { - len = strlen(seektext); - isc_buffer_init(&source, seektext, len); - isc_buffer_add(&source, len); - seekname = dns_fixedname_initname(&fseekname); - result = dns_name_fromtext( - seekname, &source, - dns_db_origin(dbi->db), 0, NULL); - if (result == ISC_R_SUCCESS) { - result = dns_dbiterator_seek( - dbi->dbiterator, seekname); - } - } else if (dbi->ascending) { - result = dns_dbiterator_first(dbi->dbiterator); - } else { - result = dns_dbiterator_last(dbi->dbiterator); - } - } - } else { - result = ISC_R_SUCCESS; - } - - node = NULL; - rdsiter = NULL; - i = 0; - while (result == ISC_R_SUCCESS) { - result = dns_dbiterator_current(dbi->dbiterator, &node, name); - if (result != ISC_R_SUCCESS && result != DNS_R_NEWORIGIN) { - break; - } - result = dns_db_allrdatasets(dbi->db, node, dbi->iversion, 0, - &rdsiter); - if (result != ISC_R_SUCCESS) { - dns_db_detachnode(dbi->db, &node); - break; - } - print_rdatasets(name, rdsiter); - dns_rdatasetiter_destroy(&rdsiter); - dns_db_detachnode(dbi->db, &node); - if (dbi->ascending) { - result = dns_dbiterator_next(dbi->dbiterator); - } else { - result = dns_dbiterator_prev(dbi->dbiterator); - } - i++; - if (result == ISC_R_SUCCESS && i == dbi->pause_every) { - printf("[more...]\n"); - result = dns_dbiterator_pause(dbi->dbiterator); - if (result == ISC_R_SUCCESS) { - return; - } - } - } - if (result != ISC_R_NOMORE) { - print_result("", result); - } - - dns_dbiterator_destroy(&dbi->dbiterator); - if (dbi->iversion != NULL) { - dns_db_closeversion(dbi->db, &dbi->iversion, false); - } -} - -static isc_result_t -load(const char *filename, const char *origintext, bool cache) { - dns_fixedname_t forigin; - dns_name_t *origin; - isc_result_t result; - isc_buffer_t source; - size_t len; - dbinfo *dbi; - unsigned int i; - - dbi = isc_mem_get(mctx, sizeof(*dbi)); - - dbi->db = NULL; - dbi->version = NULL; - dbi->wversion = NULL; - for (i = 0; i < MAXVERSIONS; i++) { - dbi->rversions[i] = NULL; - } - dbi->hold_count = 0; - for (i = 0; i < MAXHOLD; i++) { - dbi->hold_nodes[i] = NULL; - } - dbi->dbiterator = NULL; - dbi->iversion = NULL; - dbi->pause_every = pause_every; - dbi->ascending = ascending; - ISC_LINK_INIT(dbi, link); - - len = strlen(origintext); - isc_buffer_constinit(&source, origintext, len); - isc_buffer_add(&source, len); - origin = dns_fixedname_initname(&forigin); - result = dns_name_fromtext(origin, &source, dns_rootname, 0, NULL); - if (result != ISC_R_SUCCESS) { - isc_mem_put(mctx, dbi, sizeof(*dbi)); - return (result); - } - - result = dns_db_create(mctx, dbtype, origin, - cache ? dns_dbtype_cache : dns_dbtype_zone, - dns_rdataclass_in, 0, NULL, &dbi->db); - if (result != ISC_R_SUCCESS) { - isc_mem_put(mctx, dbi, sizeof(*dbi)); - return (result); - } - - printf("loading %s (%s)\n", filename, origintext); - result = dns_db_load(dbi->db, filename, dns_masterformat_text, 0); - if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) { - dns_db_detach(&dbi->db); - isc_mem_put(mctx, dbi, sizeof(*dbi)); - return (result); - } - printf("loaded\n"); - - if (cache) { - INSIST(cache_dbi == NULL); - dns_dbtable_adddefault(dbtable, dbi->db); - cache_dbi = dbi; - } else { - result = dns_dbtable_add(dbtable, dbi->db); - if (result != ISC_R_SUCCESS) { - dns_db_detach(&dbi->db); - isc_mem_put(mctx, dbi, sizeof(*dbi)); - return (result); - } - } - ISC_LIST_APPEND(dbs, dbi, link); - - return (ISC_R_SUCCESS); -} - -static void -unload_all(void) { - dbinfo *dbi, *dbi_next; - - for (dbi = ISC_LIST_HEAD(dbs); dbi != NULL; dbi = dbi_next) { - dbi_next = ISC_LIST_NEXT(dbi, link); - if (dns_db_iszone(dbi->db)) { - dns_dbtable_remove(dbtable, dbi->db); - } else { - INSIST(dbi == cache_dbi); - dns_dbtable_removedefault(dbtable); - cache_dbi = NULL; - } - dns_db_detach(&dbi->db); - ISC_LIST_UNLINK(dbs, dbi, link); - isc_mem_put(mctx, dbi, sizeof(*dbi)); - } -} - -#define DBI_CHECK(dbi) \ - if ((dbi) == NULL) { \ - printf("You must first select a database with !DB\n"); \ - continue; \ - } - -int -main(int argc, char *argv[]) { - dns_db_t *db; - dns_dbnode_t *node; - isc_result_t result; - dns_name_t name; - dns_offsets_t offsets; - size_t len; - isc_buffer_t source, target; - char s[1000]; - char b[255]; - dns_rdataset_t rdataset, sigrdataset; - int ch; - dns_rdatatype_t type = 1; - bool printnode = false; - bool addmode = false; - bool delmode = false; - bool holdmode = false; - bool verbose = false; - bool done = false; - bool quiet = false; - bool time_lookups = false; - bool found_as; - bool find_zonecut = false; - bool noexact_zonecut = false; - int i, v; - dns_rdatasetiter_t *rdsiter; - char t1[256]; - char t2[256]; - isc_buffer_t tb1, tb2; - isc_region_t r1, r2; - dns_fixedname_t foundname; - dns_name_t *fname; - unsigned int options = 0, zcoptions; - isc_time_t start, finish; - const char *origintext; - dbinfo *dbi; - dns_dbversion_t *version; - const dns_name_t *origin; - dns_trust_t trust = 0; - unsigned int addopts; - isc_log_t *lctx = NULL; - size_t n; - - dns_result_register(); - - isc_mem_create(&mctx); - RUNTIME_CHECK(dns_dbtable_create(mctx, dns_rdataclass_in, &dbtable) == - ISC_R_SUCCESS); - - snprintf(dbtype, sizeof(dbtype), "rbt"); - while ((ch = isc_commandline_parse(argc, argv, "c:d:t:z:P:Q:glpqvT")) != - -1) { - switch (ch) { - case 'c': - result = load(isc_commandline_argument, ".", true); - if (result != ISC_R_SUCCESS) { - printf("cache load(%s) %08x: %s\n", - isc_commandline_argument, result, - isc_result_totext(result)); - } - break; - case 'd': - n = strlcpy(dbtype, isc_commandline_argument, - sizeof(dbtype)); - if (n >= sizeof(dbtype)) { - fprintf(stderr, "bad db type '%s'\n", - isc_commandline_argument); - exit(1); - } - break; - case 'g': - options |= (DNS_DBFIND_GLUEOK | - DNS_DBFIND_VALIDATEGLUE); - break; - case 'l': - isc_log_create(mctx, &lctx, NULL); - isc_log_setcontext(lctx); - dns_log_init(lctx); - dns_log_setcontext(lctx); - break; - case 'q': - quiet = true; - verbose = false; - break; - case 'p': - printnode = true; - break; - case 'P': - pause_every = atoi(isc_commandline_argument); - break; - case 't': - type = atoi(isc_commandline_argument); - break; - case 'T': - time_lookups = true; - break; - case 'v': - verbose = true; - break; - case 'z': - origintext = strrchr(isc_commandline_argument, '/'); - if (origintext == NULL) { - origintext = isc_commandline_argument; - } else { - origintext++; /* Skip '/'. */ - } - result = load(isc_commandline_argument, origintext, - false); - if (result != ISC_R_SUCCESS) { - printf("zone load(%s) %08x: %s\n", - isc_commandline_argument, result, - isc_result_totext(result)); - } - break; - } - } - - argc -= isc_commandline_index; - argv += isc_commandline_index; - POST(argv); - - if (argc != 0) { - printf("ignoring trailing arguments\n"); - } - - /* - * Some final initialization... - */ - fname = dns_fixedname_initname(&foundname); - dbi = NULL; - origin = dns_rootname; - version = NULL; - - if (time_lookups) { - TIME_NOW(&start); - } - - while (!done) { - if (!quiet) { - printf("\n"); - } - if (fgets(s, sizeof(s), stdin) == NULL) { - done = true; - continue; - } - len = strlen(s); - if (len > 0U && s[len - 1] == '\n') { - s[len - 1] = '\0'; - len--; - } - if (verbose && dbi != NULL) { - if (dbi->wversion != NULL) { - printf("future version (%p)\n", dbi->wversion); - } - for (i = 0; i < dbi->rcount; i++) { - if (dbi->rversions[i] != NULL) { - printf("open version %d (%p)\n", i, - dbi->rversions[i]); - } - } - } - dns_name_init(&name, offsets); - if (strcmp(s, "!R") == 0) { - DBI_CHECK(dbi); - if (dbi->rcount == MAXVERSIONS) { - printf("too many open versions\n"); - continue; - } - dns_db_currentversion(dbi->db, - &dbi->rversions[dbi->rcount]); - printf("opened version %d\n", dbi->rcount); - dbi->version = dbi->rversions[dbi->rcount]; - version = dbi->version; - dbi->rcount++; - continue; - } else if (strcmp(s, "!W") == 0) { - DBI_CHECK(dbi); - if (dbi->wversion != NULL) { - printf("using existing future version\n"); - dbi->version = dbi->wversion; - version = dbi->version; - continue; - } - result = dns_db_newversion(dbi->db, &dbi->wversion); - if (result != ISC_R_SUCCESS) { - print_result("", result); - } else { - printf("newversion\n"); - } - dbi->version = dbi->wversion; - version = dbi->version; - continue; - } else if (strcmp(s, "!C") == 0) { - DBI_CHECK(dbi); - addmode = false; - delmode = false; - if (dbi->version == NULL) { - continue; - } - if (dbi->version == dbi->wversion) { - printf("closing future version\n"); - dbi->wversion = NULL; - } else { - for (i = 0; i < dbi->rcount; i++) { - if (dbi->version == dbi->rversions[i]) { - dbi->rversions[i] = NULL; - printf("closing open version " - "%d\n", - i); - break; - } - } - } - dns_db_closeversion(dbi->db, &dbi->version, true); - version = NULL; - continue; - } else if (strcmp(s, "!X") == 0) { - DBI_CHECK(dbi); - addmode = false; - delmode = false; - if (dbi->version == NULL) { - continue; - } - if (dbi->version == dbi->wversion) { - printf("aborting future version\n"); - dbi->wversion = NULL; - } else { - for (i = 0; i < dbi->rcount; i++) { - if (dbi->version == dbi->rversions[i]) { - dbi->rversions[i] = NULL; - printf("closing open version " - "%d\n", - i); - break; - } - } - } - dns_db_closeversion(dbi->db, &dbi->version, false); - version = NULL; - continue; - } else if (strcmp(s, "!A") == 0) { - DBI_CHECK(dbi); - delmode = false; - if (addmode) { - addmode = false; - } else { - addmode = true; - } - printf("addmode = %s\n", addmode ? "TRUE" : "FALSE"); - continue; - } else if (strcmp(s, "!D") == 0) { - DBI_CHECK(dbi); - addmode = false; - if (delmode) { - delmode = false; - } else { - delmode = true; - } - printf("delmode = %s\n", delmode ? "TRUE" : "FALSE"); - continue; - } else if (strcmp(s, "!H") == 0) { - DBI_CHECK(dbi); - if (holdmode) { - holdmode = false; - } else { - holdmode = true; - } - printf("holdmode = %s\n", holdmode ? "TRUE" : "FALSE"); - continue; - } else if (strcmp(s, "!HR") == 0) { - DBI_CHECK(dbi); - for (i = 0; i < dbi->hold_count; i++) { - dns_db_detachnode(dbi->db, &dbi->hold_nodes[i]); - } - dbi->hold_count = 0; - holdmode = false; - printf("held nodes have been detached\n"); - continue; - } else if (strcmp(s, "!VC") == 0) { - DBI_CHECK(dbi); - printf("switching to current version\n"); - dbi->version = NULL; - version = NULL; - continue; - } else if (strstr(s, "!V") == s) { - DBI_CHECK(dbi); - v = atoi(&s[2]); - if (v >= dbi->rcount || v < 0) { - printf("unknown open version %d\n", v); - continue; - } - if (dbi->rversions[v] == NULL) { - printf("version %d is not open\n", v); - continue; - } - printf("switching to open version %d\n", v); - dbi->version = dbi->rversions[v]; - version = dbi->version; - continue; - } else if (strstr(s, "!TR") == s) { - trust = (unsigned int)atoi(&s[3]); - printf("trust level is now %u\n", (unsigned int)trust); - continue; - } else if (strstr(s, "!T") == s) { - type = (unsigned int)atoi(&s[2]); - printf("now searching for type %u\n", type); - continue; - } else if (strcmp(s, "!G") == 0) { - if ((options & DNS_DBFIND_GLUEOK) != 0) { - options &= ~DNS_DBFIND_GLUEOK; - } else { - options |= DNS_DBFIND_GLUEOK; - } - printf("glue ok = %s\n", - ((options & DNS_DBFIND_GLUEOK) != 0) ? "TRUE" - : "FALSE"); - continue; - } else if (strcmp(s, "!GV") == 0) { - if ((options & DNS_DBFIND_VALIDATEGLUE) != 0) { - options &= ~DNS_DBFIND_VALIDATEGLUE; - } else { - options |= DNS_DBFIND_VALIDATEGLUE; - } - printf("validate glue = %s\n", - ((options & DNS_DBFIND_VALIDATEGLUE) != 0) - ? "TRUE" - : "FALSE"); - continue; - } else if (strcmp(s, "!WC") == 0) { - if ((options & DNS_DBFIND_NOWILD) != 0) { - options &= ~DNS_DBFIND_NOWILD; - } else { - options |= DNS_DBFIND_NOWILD; - } - printf("wildcard matching = %s\n", - ((options & DNS_DBFIND_NOWILD) == 0) ? "TRUE" - : "FALSE"); - continue; - } else if (strstr(s, "!LS ") == s) { - DBI_CHECK(dbi); - list(dbi, &s[4]); - continue; - } else if (strcmp(s, "!LS") == 0) { - DBI_CHECK(dbi); - list(dbi, NULL); - continue; - } else if (strstr(s, "!DU ") == s) { - DBI_CHECK(dbi); - result = dns_db_dump(dbi->db, dbi->version, s + 4); - if (result != ISC_R_SUCCESS) { - printf("\n"); - print_result("", result); - } - continue; - } else if (strcmp(s, "!PN") == 0) { - if (printnode) { - printnode = false; - } else { - printnode = true; - } - printf("printnode = %s\n", - printnode ? "TRUE" : "FALSE"); - continue; - } else if (strstr(s, "!P") == s) { - DBI_CHECK(dbi); - v = atoi(&s[2]); - dbi->pause_every = v; - continue; - } else if (strcmp(s, "!+") == 0) { - DBI_CHECK(dbi); - dbi->ascending = true; - continue; - } else if (strcmp(s, "!-") == 0) { - DBI_CHECK(dbi); - dbi->ascending = false; - continue; - } else if (strcmp(s, "!DB") == 0) { - dbi = NULL; - origin = dns_rootname; - version = NULL; - printf("now searching all databases\n"); - continue; - } else if (strncmp(s, "!DB ", 4) == 0) { - dbi = select_db(s + 4); - if (dbi != NULL) { - db = dbi->db; - origin = dns_db_origin(dbi->db); - version = dbi->version; - addmode = false; - delmode = false; - holdmode = false; - } else { - db = NULL; - version = NULL; - origin = dns_rootname; - printf("database not found; " - "now searching all databases\n"); - } - continue; - } else if (strcmp(s, "!ZC") == 0) { - if (find_zonecut) { - find_zonecut = false; - } else { - find_zonecut = true; - } - printf("find_zonecut = %s\n", - find_zonecut ? "TRUE" : "FALSE"); - continue; - } else if (strcmp(s, "!NZ") == 0) { - if (noexact_zonecut) { - noexact_zonecut = false; - } else { - noexact_zonecut = true; - } - printf("noexact_zonecut = %s\n", - noexact_zonecut ? "TRUE" : "FALSE"); - continue; - } - - isc_buffer_init(&source, s, len); - isc_buffer_add(&source, len); - isc_buffer_init(&target, b, sizeof(b)); - result = dns_name_fromtext(&name, &source, origin, 0, &target); - if (result != ISC_R_SUCCESS) { - print_result("bad name: ", result); - continue; - } - - if (dbi == NULL) { - zcoptions = 0; - if (noexact_zonecut) { - zcoptions |= DNS_DBTABLEFIND_NOEXACT; - } - db = NULL; - result = dns_dbtable_find(dbtable, &name, zcoptions, - &db); - if (result != ISC_R_SUCCESS && - result != DNS_R_PARTIALMATCH) { - if (!quiet) { - printf("\n"); - print_result("", result); - } - continue; - } - isc_buffer_init(&tb1, t1, sizeof(t1)); - result = dns_name_totext(dns_db_origin(db), false, - &tb1); - if (result != ISC_R_SUCCESS) { - printf("\n"); - print_result("", result); - dns_db_detach(&db); - continue; - } - isc_buffer_usedregion(&tb1, &r1); - printf("\ndatabase = %.*s (%s)\n", (int)r1.length, - r1.base, (dns_db_iszone(db)) ? "zone" : "cache"); - } - node = NULL; - dns_rdataset_init(&rdataset); - dns_rdataset_init(&sigrdataset); - - if (find_zonecut && dns_db_iscache(db)) { - zcoptions = options; - if (noexact_zonecut) { - zcoptions |= DNS_DBFIND_NOEXACT; - } - result = dns_db_findzonecut(db, &name, zcoptions, 0, - &node, fname, NULL, - &rdataset, &sigrdataset); - } else { - result = dns_db_find(db, &name, version, type, options, - 0, &node, fname, &rdataset, - &sigrdataset); - } - - if (!quiet) { - if (dbi != NULL) { - printf("\n"); - } - print_result("", result); - } - - found_as = false; - switch (result) { - case ISC_R_SUCCESS: - case DNS_R_GLUE: - case DNS_R_CNAME: - case DNS_R_ZONECUT: - break; - case DNS_R_DNAME: - case DNS_R_DELEGATION: - found_as = true; - break; - case DNS_R_NXRRSET: - if (dns_rdataset_isassociated(&rdataset)) { - break; - } - if (dbi != NULL) { - if (holdmode) { - RUNTIME_CHECK(dbi->hold_count < - MAXHOLD); - dbi->hold_nodes[dbi->hold_count++] = - node; - node = NULL; - } else { - dns_db_detachnode(db, &node); - } - } else { - dns_db_detachnode(db, &node); - dns_db_detach(&db); - } - continue; - case DNS_R_NXDOMAIN: - if (dns_rdataset_isassociated(&rdataset)) { - break; - } - /* FALLTHROUGH */ - default: - if (dbi == NULL) { - dns_db_detach(&db); - } - if (quiet) { - print_result("", result); - } - continue; - } - if (found_as && !quiet) { - isc_buffer_init(&tb1, t1, sizeof(t1)); - isc_buffer_init(&tb2, t2, sizeof(t2)); - result = dns_name_totext(&name, false, &tb1); - if (result != ISC_R_SUCCESS) { - print_result("", result); - dns_db_detachnode(db, &node); - if (dbi == NULL) { - dns_db_detach(&db); - } - continue; - } - result = dns_name_totext(fname, false, &tb2); - if (result != ISC_R_SUCCESS) { - print_result("", result); - dns_db_detachnode(db, &node); - if (dbi == NULL) { - dns_db_detach(&db); - } - continue; - } - isc_buffer_usedregion(&tb1, &r1); - isc_buffer_usedregion(&tb2, &r2); - printf("found %.*s as %.*s\n", (int)r1.length, r1.base, - (int)r2.length, r2.base); - } - - if (printnode) { - dns_db_printnode(db, node, stdout); - } - - if (!found_as && type == dns_rdatatype_any) { - rdsiter = NULL; - result = dns_db_allrdatasets(db, node, version, 0, - &rdsiter); - if (result == ISC_R_SUCCESS) { - if (!quiet) { - print_rdatasets(fname, rdsiter); - } - dns_rdatasetiter_destroy(&rdsiter); - } else { - print_result("", result); - } - } else { - if (!quiet) { - print_rdataset(fname, &rdataset); - } - if (dns_rdataset_isassociated(&sigrdataset)) { - if (!quiet) { - print_rdataset(fname, &sigrdataset); - } - dns_rdataset_disassociate(&sigrdataset); - } - if (dbi != NULL && addmode && !found_as) { - rdataset.ttl++; - rdataset.trust = trust; - if (dns_db_iszone(db)) { - addopts = DNS_DBADD_MERGE; - } else { - addopts = 0; - } - result = dns_db_addrdataset(db, node, version, - 0, &rdataset, - addopts, NULL); - if (result != ISC_R_SUCCESS) { - print_result("", result); - } - if (printnode) { - dns_db_printnode(db, node, stdout); - } - } else if (dbi != NULL && delmode && !found_as) { - result = dns_db_deleterdataset( - db, node, version, type, 0); - if (result != ISC_R_SUCCESS) { - print_result("", result); - } - if (printnode) { - dns_db_printnode(db, node, stdout); - } - } - dns_rdataset_disassociate(&rdataset); - } - - if (dbi != NULL) { - if (holdmode) { - RUNTIME_CHECK(dbi->hold_count < MAXHOLD); - dbi->hold_nodes[dbi->hold_count++] = node; - node = NULL; - } else { - dns_db_detachnode(db, &node); - } - } else { - dns_db_detachnode(db, &node); - dns_db_detach(&db); - } - } - - if (time_lookups) { - uint64_t usec; - - TIME_NOW(&finish); - - usec = isc_time_microdiff(&finish, &start); - - printf("elapsed time: %lu.%06lu seconds\n", - (unsigned long)(usec / 1000000), - (unsigned long)(usec % 1000000)); - } - - unload_all(); - - dns_dbtable_detach(&dbtable); - - if (lctx != NULL) { - isc_log_destroy(&lctx); - } - - if (!quiet) { - isc_mem_stats(mctx, stdout); - } - - return (0); -} diff --git a/bin/tests/optional/fsaccess_test.c b/bin/tests/optional/fsaccess_test.c deleted file mode 100644 index 5a422105b3..0000000000 --- a/bin/tests/optional/fsaccess_test.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include -#include -#include -#include /* Non-portable. */ -#include /* Non-portable. */ - -#include -#include -#include - -#define PATH "/tmp/fsaccess" - -int -main(void) { - isc_fsaccess_t access; - isc_result_t result; - FILE *fp; - int n; - - n = remove(PATH); - if (n != 0 && errno != ENOENT) { - fprintf(stderr, "unable to remove(%s)\n", PATH); - exit(1); - } - fp = fopen(PATH, "w"); - if (fp == NULL) { - fprintf(stderr, "unable to fopen(%s)\n", PATH); - exit(1); - } - n = chmod(PATH, 0); - if (n != 0) { - fprintf(stderr, "unable chmod(%s, 0)\n", PATH); - exit(1); - } - - access = 0; - - isc_fsaccess_add(ISC_FSACCESS_OWNER | ISC_FSACCESS_GROUP, - ISC_FSACCESS_READ | ISC_FSACCESS_WRITE, &access); - - printf("fsaccess=%u\n", access); - - isc_fsaccess_add(ISC_FSACCESS_OTHER, ISC_FSACCESS_READ, &access); - - printf("fsaccess=%u\n", access); - - result = isc_fsaccess_set(PATH, access); - if (result != ISC_R_SUCCESS) { - fprintf(stderr, "result = %s\n", isc_result_totext(result)); - } - (void)fclose(fp); - - return (0); -} diff --git a/bin/tests/optional/gsstest.c b/bin/tests/optional/gsstest.c deleted file mode 100644 index dfc1052435..0000000000 --- a/bin/tests/optional/gsstest.c +++ /dev/null @@ -1,562 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef GSSAPI -#include ISC_PLATFORM_GSSAPIHEADER - -#define CHECK(str, x) \ - { \ - if ((x) != ISC_R_SUCCESS) { \ - fprintf(stderr, "I:%d:%s: %s\n", __LINE__, (str), \ - isc_result_totext(x)); \ - goto end; \ - } \ - } - -static dns_fixedname_t servername, gssname; - -static isc_mem_t *mctx; -static dns_requestmgr_t *requestmgr; -static isc_sockaddr_t address; - -static dns_tsig_keyring_t *ring; -static dns_tsigkey_t *tsigkey = NULL; -static gss_ctx_id_t gssctx; -static gss_ctx_id_t *gssctxp = &gssctx; - -#define RUNCHECK(x) RUNTIME_CHECK((x) == ISC_R_SUCCESS) - -#define PORT 53 -#define TIMEOUT 30 - -static void -initctx1(isc_task_t *task, isc_event_t *event); -static void -sendquery(isc_task_t *task, isc_event_t *event); -static void -setup(); - -static void -console(isc_task_t *task, isc_event_t *event) { - char buf[32]; - int c; - - isc_event_t *ev = NULL; - - isc_event_free(&event); - - for (;;) { - printf("\nCommand => "); - c = scanf("%31s", buf); - - if (c == EOF || strcmp(buf, "quit") == 0) { - isc_app_shutdown(); - return; - } - - if (strcmp(buf, "initctx") == 0) { - ev = isc_event_allocate(mctx, (void *)1, 1, initctx1, - NULL, sizeof(*event)); - isc_task_send(task, &ev); - return; - } - - if (strcmp(buf, "query") == 0) { - ev = isc_event_allocate(mctx, (void *)1, 1, sendquery, - NULL, sizeof(*event)); - isc_task_send(task, &ev); - return; - } - - printf("Unknown command\n"); - } -} - -static void -recvresponse(isc_task_t *task, isc_event_t *event) { - dns_requestevent_t *reqev = (dns_requestevent_t *)event; - isc_result_t result, result2; - dns_message_t *query = NULL, *response = NULL; - isc_buffer_t outtoken; - isc_buffer_t outbuf; - char output[10 * 1024]; - - unsigned char array[DNS_NAME_MAXTEXT + 1]; - isc_buffer_init(&outtoken, array, sizeof(array)); - - UNUSED(task); - - REQUIRE(reqev != NULL); - - query = reqev->ev_arg; - - if (reqev->result != ISC_R_SUCCESS) { - fprintf(stderr, "I:request event result: %s\n", - isc_result_totext(reqev->result)); - goto end; - } - - response = NULL; - result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &response); - CHECK("dns_message_create", result); - - printf("\nReceived Response:\n"); - - result2 = dns_request_getresponse(reqev->request, response, - DNS_MESSAGEPARSE_PRESERVEORDER); - isc_buffer_init(&outbuf, output, sizeof(output)); - result = dns_message_totext(response, &dns_master_style_debug, 0, - &outbuf); - CHECK("dns_message_totext", result); - printf("%.*s\n", (int)isc_buffer_usedlength(&outbuf), - (char *)isc_buffer_base(&outbuf)); - - CHECK("dns_request_getresponse", result2); - - if (response != NULL) { - dns_message_destroy(&response); - } - -end: - if (query != NULL) { - dns_message_destroy(&query); - } - - if (reqev->request != NULL) { - dns_request_destroy(&reqev->request); - } - - isc_event_free(&event); - - event = isc_event_allocate(mctx, (void *)1, 1, console, NULL, - sizeof(*event)); - isc_task_send(task, &event); - return; -} - -static void -sendquery(isc_task_t *task, isc_event_t *event) { - dns_request_t *request = NULL; - dns_message_t *message = NULL; - dns_name_t *qname = NULL; - dns_rdataset_t *qrdataset = NULL; - isc_result_t result; - dns_fixedname_t queryname; - isc_buffer_t buf; - isc_buffer_t outbuf; - char output[10 * 1024]; - static char host[256]; - int c; - - isc_event_free(&event); - - printf("Query => "); - c = scanf("%255s", host); - if (c == EOF) { - return; - } - - dns_fixedname_init(&queryname); - isc_buffer_init(&buf, host, strlen(host)); - isc_buffer_add(&buf, strlen(host)); - result = dns_name_fromtext(dns_fixedname_name(&queryname), &buf, - dns_rootname, 0, NULL); - CHECK("dns_name_fromtext", result); - - result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &message); - if (result != ISC_R_SUCCESS) { - goto end; - } - - message->opcode = dns_opcode_query; - message->rdclass = dns_rdataclass_in; - message->id = (unsigned short)(random() & 0xFFFF); - - result = dns_message_gettempname(message, &qname); - if (result != ISC_R_SUCCESS) { - goto end; - } - - result = dns_message_gettemprdataset(message, &qrdataset); - if (result != ISC_R_SUCCESS) { - goto end; - } - - dns_name_init(qname, NULL); - dns_name_clone(dns_fixedname_name(&queryname), qname); - dns_rdataset_makequestion(qrdataset, dns_rdataclass_in, - dns_rdatatype_a); - ISC_LIST_APPEND(qname->list, qrdataset, link); - dns_message_addname(message, qname, DNS_SECTION_QUESTION); - - result = dns_request_create(requestmgr, message, &address, 0, tsigkey, - TIMEOUT, task, recvresponse, message, - &request); - CHECK("dns_request_create", result); - - printf("Submitting query:\n"); - isc_buffer_init(&outbuf, output, sizeof(output)); - result = dns_message_totext(message, &dns_master_style_debug, 0, - &outbuf); - CHECK("dns_message_totext", result); - printf("%.*s\n", (int)isc_buffer_usedlength(&outbuf), - (char *)isc_buffer_base(&outbuf)); - - return; - -end: - if (qname != NULL) { - dns_message_puttempname(message, &qname); - } - if (qrdataset != NULL) { - dns_message_puttemprdataset(message, &qrdataset); - } - if (message != NULL) { - dns_message_destroy(&message); - } -} - -static void -initctx2(isc_task_t *task, isc_event_t *event) { - dns_requestevent_t *reqev = (dns_requestevent_t *)event; - isc_result_t result; - dns_message_t *query = NULL, *response = NULL; - isc_buffer_t outtoken; - unsigned char array[DNS_NAME_MAXTEXT + 1]; - dns_rdataset_t *rdataset; - dns_rdatatype_t qtype; - dns_name_t *question_name; - - UNUSED(task); - - REQUIRE(reqev != NULL); - - query = reqev->ev_arg; - - if (reqev->result != ISC_R_SUCCESS) { - fprintf(stderr, "I:request event result: %s\n", - isc_result_totext(reqev->result)); - goto end; - } - - response = NULL; - result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &response); - CHECK("dns_message_create", result); - - result = dns_request_getresponse(reqev->request, response, - DNS_MESSAGEPARSE_PRESERVEORDER); - CHECK("dns_request_getresponse", result); - - if (response->rcode != dns_rcode_noerror) { - result = ISC_RESULTCLASS_DNSRCODE + response->rcode; - fprintf(stderr, "I:response rcode: %s\n", - isc_result_totext(result)); - goto end; - } - - printf("Received token from server, calling gss_init_sec_context()\n"); - isc_buffer_init(&outtoken, array, DNS_NAME_MAXTEXT + 1); - result = dns_tkey_processgssresponse( - query, response, dns_fixedname_name(&gssname), &gssctx, - &outtoken, &tsigkey, ring, NULL); - gssctx = *gssctxp; - CHECK("dns_tkey_processgssresponse", result); - printf("Context accepted\n"); - - question_name = NULL; - dns_message_currentname(response, DNS_SECTION_ANSWER, &question_name); - rdataset = ISC_LIST_HEAD(question_name->list); - INSIST(rdataset != NULL); - qtype = rdataset->type; - if (qtype == dns_rdatatype_tkey) { - printf("Received TKEY response from server\n"); - printf("Context completed\n"); - } else { - printf("Did not receive TKEY response from server\n"); - printf("Context not completed\n"); - dns_tsigkey_detach(&tsigkey); - tsigkey = NULL; - } - - dns_message_destroy(&response); - -end: - if (query != NULL) { - dns_message_destroy(&query); - } - - if (reqev->request != NULL) { - dns_request_destroy(&reqev->request); - } - - isc_event_free(&event); - - event = isc_event_allocate(mctx, (void *)1, 1, console, NULL, - sizeof(*event)); - isc_task_send(task, &event); - return; -} - -static void -initctx1(isc_task_t *task, isc_event_t *event) { - char gssid[512]; - char contextname[512]; - isc_result_t result; - isc_buffer_t buf; - dns_message_t *query; - dns_request_t *request; - int c; - - isc_event_free(&event); - - printf("Initctx - GSS name => "); - c = scanf("%511s", gssid); - if (c == EOF) { - return; - } - - snprintf(contextname, sizeof(contextname), "gsstest.context.%d.", - (int)time(NULL)); - - printf("Initctx - context name we're using: %s\n", contextname); - - printf("Negotiating GSSAPI context: "); - printf("%s", gssid); - printf("\n"); - - /* - * Setup a GSSAPI context with the server - */ - dns_fixedname_init(&servername); - isc_buffer_init(&buf, contextname, strlen(contextname)); - isc_buffer_add(&buf, strlen(contextname)); - result = dns_name_fromtext(dns_fixedname_name(&servername), &buf, - dns_rootname, 0, NULL); - CHECK("dns_name_fromtext", result); - - /* Make name happen */ - dns_fixedname_init(&gssname); - isc_buffer_init(&buf, gssid, strlen(gssid)); - isc_buffer_add(&buf, strlen(gssid)); - result = dns_name_fromtext(dns_fixedname_name(&gssname), &buf, - dns_rootname, 0, NULL); - CHECK("dns_name_fromtext", result); - - query = NULL; - result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &query); - CHECK("dns_message_create", result); - - printf("Calling gss_init_sec_context()\n"); - gssctx = GSS_C_NO_CONTEXT; - result = dns_tkey_buildgssquery(query, dns_fixedname_name(&servername), - dns_fixedname_name(&gssname), NULL, - 36000, &gssctx, true, mctx, NULL); - CHECK("dns_tkey_buildgssquery", result); - - printf("Sending context token to server\n"); - request = NULL; - result = dns_request_create(requestmgr, query, &address, 0, NULL, - TIMEOUT, task, initctx2, query, &request); - CHECK("dns_request_create", result); - - return; -end: - event = isc_event_allocate(mctx, (void *)1, 1, console, NULL, - sizeof(*event)); - isc_task_send(task, &event); - return; -} - -static void -setup(void) { - for (;;) { - char serveraddress[512]; - struct in_addr inaddr; - int c; - - printf("Server IP => "); - c = scanf("%511s", serveraddress); - - if (c == EOF || strcmp(serveraddress, "quit") == 0) { - isc_app_shutdown(); - return; - } - - if (inet_pton(AF_INET, serveraddress, &inaddr) == 1) { - isc_sockaddr_fromin(&address, &inaddr, PORT); - return; - } - } -} - -int -main(int argc, char *argv[]) { - isc_taskmgr_t *taskmgr; - isc_timermgr_t *timermgr; - isc_socketmgr_t *socketmgr; - isc_socket_t *sock; - unsigned int attrs, attrmask; - isc_sockaddr_t bind_any; - dns_dispatchmgr_t *dispatchmgr; - dns_dispatch_t *dispatchv4; - dns_view_t *view; - isc_task_t *task; - isc_log_t *lctx = NULL; - isc_logconfig_t *lcfg = NULL; - isc_logdestination_t destination; - - UNUSED(argv); - UNUSED(argc); - - RUNCHECK(isc_app_start()); - - dns_result_register(); - - mctx = NULL; - isc_mem_create(&mctx); - - isc_log_create(mctx, &lctx, &lcfg); - isc_log_setcontext(lctx); - dns_log_init(lctx); - dns_log_setcontext(lctx); - - /* - * Create and install the default channel. - */ - destination.file.stream = stderr; - destination.file.name = NULL; - destination.file.versions = ISC_LOG_ROLLNEVER; - destination.file.maximum_size = 0; - isc_log_createchannel(lcfg, "_default", ISC_LOG_TOFILEDESC, - ISC_LOG_DYNAMIC, &destination, ISC_LOG_PRINTTIME); - - RUNCHECK(isc_log_usechannel(lcfg, "_default", NULL, NULL)); - - isc_log_setdebuglevel(lctx, 9); - - RUNCHECK(dst_lib_init(mctx, NULL)); - - taskmgr = NULL; - RUNCHECK(isc_taskmgr_create(mctx, 1, 0, NULL, &taskmgr)); - task = NULL; - RUNCHECK(isc_task_create(taskmgr, 0, &task)); - timermgr = NULL; - RUNCHECK(isc_timermgr_create(mctx, &timermgr)); - socketmgr = NULL; - RUNCHECK(isc_socketmgr_create(mctx, &socketmgr)); - dispatchmgr = NULL; - RUNCHECK(dns_dispatchmgr_create(mctx, &dispatchmgr)); - isc_sockaddr_any(&bind_any); - attrs = DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_MAKEQUERY | - DNS_DISPATCHATTR_IPV4; - attrmask = DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_TCP | - DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_IPV6; - dispatchv4 = NULL; - RUNCHECK(dns_dispatch_getudp(dispatchmgr, socketmgr, taskmgr, &bind_any, - 4096, 4, 2, 3, 5, attrs, attrmask, - &dispatchv4)); - requestmgr = NULL; - RUNCHECK(dns_requestmgr_create(mctx, timermgr, socketmgr, taskmgr, - dispatchmgr, dispatchv4, NULL, - &requestmgr)); - - ring = NULL; - RUNCHECK(dns_tsigkeyring_create(mctx, &ring)); - - view = NULL; - RUNCHECK(dns_view_create(mctx, 0, "_test", &view)); - dns_view_setkeyring(view, ring); - - sock = NULL; - RUNCHECK(isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, - &sock)); - - setup(); - - RUNCHECK(isc_app_onrun(mctx, task, console, NULL)); - - (void)isc_app_run(); - - if (tsigkey) { - dns_tsigkey_detach(&tsigkey); - } - - dns_requestmgr_shutdown(requestmgr); - dns_requestmgr_detach(&requestmgr); - - dns_dispatch_detach(&dispatchv4); - dns_dispatchmgr_destroy(&dispatchmgr); - - isc_timermgr_destroy(&timermgr); - - isc_task_detach(&task); - isc_taskmgr_destroy(&taskmgr); - - isc_socket_detach(&sock); - isc_socketmgr_destroy(&socketmgr); - - isc_mem_stats(mctx, stdout); - - dns_view_detach(&view); - - dst_lib_destroy(); - - isc_mem_stats(mctx, stdout); - isc_mem_destroy(&mctx); - - isc_app_finish(); - - return (0); -} -#else /* ifdef GSSAPI */ -int -main(int argc, char *argv[]) { - UNUSED(argc); - UNUSED(argv); - fprintf(stderr, "R:GSSAPIONLY\n"); - return (0); -} -#endif /* ifdef GSSAPI */ diff --git a/bin/tests/optional/inter_test.c b/bin/tests/optional/inter_test.c deleted file mode 100644 index 3d1ab921a7..0000000000 --- a/bin/tests/optional/inter_test.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -#include -#include -#include -#include - -int -main(int argc, char **argv) { - isc_mem_t *mctx = NULL; - isc_interfaceiter_t *iter = NULL; - isc_interface_t ifdata; - isc_result_t result; - const char *res; - char buf[128]; - - UNUSED(argc); - UNUSED(argv); - - isc_mem_create(&mctx); - result = isc_interfaceiter_create(mctx, &iter); - if (result != ISC_R_SUCCESS) { - goto cleanup; - } - result = isc_interfaceiter_first(iter); - while (result == ISC_R_SUCCESS) { - result = isc_interfaceiter_current(iter, &ifdata); - if (result != ISC_R_SUCCESS) { - fprintf(stdout, "isc_interfaceiter_current: %s", - isc_result_totext(result)); - continue; - } - fprintf(stdout, "%s %u %x\n", ifdata.name, ifdata.af, - ifdata.flags); - INSIST(ifdata.af == AF_INET || ifdata.af == AF_INET6); - res = inet_ntop(ifdata.af, &ifdata.address.type, buf, - sizeof(buf)); - if (ifdata.address.zone != 0) { - fprintf(stdout, "address = %s (zone %u)\n", - res == NULL ? "BAD" : res, ifdata.address.zone); - } else { - fprintf(stdout, "address = %s\n", - res == NULL ? "BAD" : res); - } - INSIST(ifdata.address.family == ifdata.af); - res = inet_ntop(ifdata.af, &ifdata.netmask.type, buf, - sizeof(buf)); - fprintf(stdout, "netmask = %s\n", res == NULL ? "BAD" : res); - INSIST(ifdata.netmask.family == ifdata.af); - if ((ifdata.flags & INTERFACE_F_POINTTOPOINT) != 0) { - res = inet_ntop(ifdata.af, &ifdata.dstaddress.type, buf, - sizeof(buf)); - fprintf(stdout, "dstaddress = %s\n", - res == NULL ? "BAD" : res); - - INSIST(ifdata.dstaddress.family == ifdata.af); - } - result = isc_interfaceiter_next(iter); - if (result != ISC_R_SUCCESS && result != ISC_R_NOMORE) { - fprintf(stdout, "isc_interfaceiter_next: %s", - isc_result_totext(result)); - continue; - } - } - isc_interfaceiter_destroy(&iter); - - fprintf(stdout, "\nPass 2\n\n"); - - result = isc_interfaceiter_create(mctx, &iter); - if (result != ISC_R_SUCCESS) { - goto cleanup; - } - result = isc_interfaceiter_first(iter); - while (result == ISC_R_SUCCESS) { - result = isc_interfaceiter_current(iter, &ifdata); - if (result != ISC_R_SUCCESS) { - fprintf(stdout, "isc_interfaceiter_current: %s", - isc_result_totext(result)); - continue; - } - fprintf(stdout, "%s %u %x\n", ifdata.name, ifdata.af, - ifdata.flags); - INSIST(ifdata.af == AF_INET || ifdata.af == AF_INET6); - res = inet_ntop(ifdata.af, &ifdata.address.type, buf, - sizeof(buf)); - if (ifdata.address.zone != 0) { - fprintf(stdout, "address = %s (zone %u)\n", - res == NULL ? "BAD" : res, ifdata.address.zone); - } else { - fprintf(stdout, "address = %s\n", - res == NULL ? "BAD" : res); - } - INSIST(ifdata.address.family == ifdata.af); - res = inet_ntop(ifdata.af, &ifdata.netmask.type, buf, - sizeof(buf)); - fprintf(stdout, "netmask = %s\n", res == NULL ? "BAD" : res); - INSIST(ifdata.netmask.family == ifdata.af); - if ((ifdata.flags & INTERFACE_F_POINTTOPOINT) != 0) { - res = inet_ntop(ifdata.af, &ifdata.dstaddress.type, buf, - sizeof(buf)); - fprintf(stdout, "dstaddress = %s\n", - res == NULL ? "BAD" : res); - - INSIST(ifdata.dstaddress.family == ifdata.af); - } - result = isc_interfaceiter_next(iter); - if (result != ISC_R_SUCCESS && result != ISC_R_NOMORE) { - fprintf(stdout, "isc_interfaceiter_next: %s", - isc_result_totext(result)); - continue; - } - } - isc_interfaceiter_destroy(&iter); -cleanup: - isc_mem_destroy(&mctx); - - return (0); -} diff --git a/bin/tests/optional/lex_test.c b/bin/tests/optional/lex_test.c deleted file mode 100644 index 95aada0815..0000000000 --- a/bin/tests/optional/lex_test.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include -#include -#include -#include -#include - -isc_mem_t *mctx; -isc_lex_t *lex; - -isc_lexspecials_t specials; - -static void -print_token(isc_token_t *tokenp, FILE *stream) { - switch (tokenp->type) { - case isc_tokentype_unknown: - fprintf(stream, "UNKNOWN"); - break; - case isc_tokentype_string: - fprintf(stream, "STRING %.*s", - (int)tokenp->value.as_region.length, - tokenp->value.as_region.base); - break; - case isc_tokentype_number: - fprintf(stream, "NUMBER %lu", tokenp->value.as_ulong); - break; - case isc_tokentype_qstring: - fprintf(stream, "QSTRING \"%.*s\"", - (int)tokenp->value.as_region.length, - tokenp->value.as_region.base); - break; - case isc_tokentype_eol: - fprintf(stream, "EOL"); - break; - case isc_tokentype_eof: - fprintf(stream, "EOF"); - break; - case isc_tokentype_initialws: - fprintf(stream, "INITIALWS"); - break; - case isc_tokentype_special: - fprintf(stream, "SPECIAL %c", tokenp->value.as_char); - break; - case isc_tokentype_nomore: - fprintf(stream, "NOMORE"); - break; - default: - FATAL_ERROR(__FILE__, __LINE__, "Unexpected type %d", - tokenp->type); - } -} - -int -main(int argc, char *argv[]) { - isc_token_t token; - isc_result_t result; - int quiet = 0; - int c; - int masterfile = 1; - int stats = 0; - unsigned int options = 0; - int done = 0; - - while ((c = isc_commandline_parse(argc, argv, "qmcs")) != -1) { - switch (c) { - case 'q': - quiet = 1; - break; - case 'm': - masterfile = 1; - break; - case 'c': - masterfile = 0; - break; - case 's': - stats = 1; - break; - } - } - - isc_mem_create(&mctx); - RUNTIME_CHECK(isc_lex_create(mctx, 256, &lex) == ISC_R_SUCCESS); - - if (masterfile) { - /* Set up to lex DNS master file. */ - - specials['('] = 1; - specials[')'] = 1; - specials['"'] = 1; - isc_lex_setspecials(lex, specials); - options = ISC_LEXOPT_DNSMULTILINE | ISC_LEXOPT_ESCAPE | - ISC_LEXOPT_EOF | ISC_LEXOPT_QSTRING | - ISC_LEXOPT_NOMORE; - isc_lex_setcomments(lex, ISC_LEXCOMMENT_DNSMASTERFILE); - } else { - /* Set up to lex DNS config file. */ - - specials['{'] = 1; - specials['}'] = 1; - specials[';'] = 1; - specials['/'] = 1; - specials['"'] = 1; - specials['!'] = 1; - specials['*'] = 1; - isc_lex_setspecials(lex, specials); - options = ISC_LEXOPT_EOF | ISC_LEXOPT_QSTRING | - ISC_LEXOPT_NUMBER | ISC_LEXOPT_NOMORE; - isc_lex_setcomments(lex, (ISC_LEXCOMMENT_C | - ISC_LEXCOMMENT_CPLUSPLUS | - ISC_LEXCOMMENT_SHELL)); - } - - RUNTIME_CHECK(isc_lex_openstream(lex, stdin) == ISC_R_SUCCESS); - - while ((result = isc_lex_gettoken(lex, options, &token)) == - ISC_R_SUCCESS && - !done) - { - if (!quiet) { - char *name = isc_lex_getsourcename(lex); - print_token(&token, stdout); - printf(" line = %lu file = %s\n", - isc_lex_getsourceline(lex), - (name == NULL) ? "" : name); - } - if (token.type == isc_tokentype_eof) { - isc_lex_close(lex); - } - if (token.type == isc_tokentype_nomore) { - done = 1; - } - } - if (result != ISC_R_SUCCESS) { - printf("Result: %s\n", isc_result_totext(result)); - } - - isc_lex_close(lex); - isc_lex_destroy(&lex); - if (!quiet && stats) { - isc_mem_stats(mctx, stdout); - } - isc_mem_destroy(&mctx); - - return (0); -} diff --git a/bin/tests/optional/lfsr_test.c b/bin/tests/optional/lfsr_test.c deleted file mode 100644 index e9d2481fab..0000000000 --- a/bin/tests/optional/lfsr_test.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include -#include - -#include -#include -#include - -uint32_t state[1024 * 64]; - -int -main(int argc, char **argv) { - isc_lfsr_t lfsr1, lfsr2; - int i; - uint32_t temp; - - UNUSED(argc); - UNUSED(argv); - - /* - * Verify that returned values are reproducible. - */ - isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL); - for (i = 0; i < 32; i++) { - isc_lfsr_generate(&lfsr1, &state[i], 4); - printf("lfsr1: state[%2d] = %08x\n", i, state[i]); - } - isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL); - for (i = 0; i < 32; i++) { - isc_lfsr_generate(&lfsr1, &temp, 4); - if (state[i] != temp) { - printf("lfsr1: state[%2d] = %08x, " - "but new state is %08x\n", - i, state[i], temp); - } - } - - /* - * Now do the same with skipping. - */ - isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL); - for (i = 0; i < 32; i++) { - isc_lfsr_generate(&lfsr1, &state[i], 4); - isc_lfsr_skip(&lfsr1, 32); - printf("lfsr1: state[%2d] = %08x\n", i, state[i]); - } - isc_lfsr_init(&lfsr1, 0, 32, 0x80000057U, 0, NULL, NULL); - for (i = 0; i < 32; i++) { - isc_lfsr_generate(&lfsr1, &temp, 4); - isc_lfsr_skip(&lfsr1, 32); - if (state[i] != temp) { - printf("lfsr1: state[%2d] = %08x, " - "but new state is %08x\n", - i, state[i], temp); - } - } - - /* - * Try to find the period of the LFSR. - * - * x^16 + x^5 + x^3 + x^2 + 1 - */ - isc_lfsr_init(&lfsr2, 0, 16, 0x00008016U, 0, NULL, NULL); - for (i = 0; i < 32; i++) { - isc_lfsr_generate(&lfsr2, &state[i], 4); - printf("lfsr2: state[%2d] = %08x\n", i, state[i]); - } - isc_lfsr_init(&lfsr2, 0, 16, 0x00008016U, 0, NULL, NULL); - for (i = 0; i < 32; i++) { - isc_lfsr_generate(&lfsr2, &temp, 4); - if (state[i] != temp) { - printf("lfsr2: state[%2d] = %08x, " - "but new state is %08x\n", - i, state[i], temp); - } - } - - return (0); -} diff --git a/bin/tests/optional/log_test.c b/bin/tests/optional/log_test.c deleted file mode 100644 index 750bcccc5c..0000000000 --- a/bin/tests/optional/log_test.c +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#define TEST_FILE "/tmp/test_log" -#define SYSLOG_FILE "/var/log/daemon.log" -#define FILE_VERSIONS 10 - -char usage[] = "Usage: %s [-m] [-s syslog_logfile] [-r file_versions]\n"; - -#define CHECK(expr) \ - result = expr; \ - if (result != ISC_R_SUCCESS) { \ - fprintf(stderr, "%s: " #expr "%s: exiting\n", progname, \ - isc_result_totext(result)); \ - } - -int -main(int argc, char **argv) { - const char *progname, *syslog_file, *message; - int ch, i, file_versions, stderr_line; - bool show_final_mem = false; - isc_log_t *lctx; - isc_logconfig_t *lcfg; - isc_mem_t *mctx; - isc_result_t result; - isc_logdestination_t destination; - const isc_logcategory_t *category; - const isc_logmodule_t *module; - - progname = strrchr(*argv, '/'); - if (progname != NULL) { - progname++; - } else { - progname = *argv; - } - - syslog_file = SYSLOG_FILE; - file_versions = FILE_VERSIONS; - - while ((ch = isc_commandline_parse(argc, argv, "ms:r:")) != -1) { - switch (ch) { - case 'm': - show_final_mem = true; - break; - case 's': - syslog_file = isc_commandline_argument; - break; - case 'r': - file_versions = atoi(isc_commandline_argument); - if (file_versions < 0 && - file_versions != ISC_LOG_ROLLNEVER && - file_versions != ISC_LOG_ROLLINFINITE) - { - fprintf(stderr, - "%s: file rotations must be " - "%d (ISC_LOG_ROLLNEVER),\n\t" - "%d (ISC_LOG_ROLLINFINITE) " - "or > 0\n", - progname, ISC_LOG_ROLLNEVER, - ISC_LOG_ROLLINFINITE); - exit(1); - } - break; - case '?': - fprintf(stderr, usage, progname); - exit(1); - } - } - - argc -= isc_commandline_index; - argv += isc_commandline_index; - POST(argv); - - if (argc > 0) { - fprintf(stderr, usage, progname); - exit(1); - } - - fprintf(stderr, "EXPECT:\n%s%d%s%s%s", - "8 lines to stderr (first 4 numbered, #3 repeated)\n", - file_versions == 0 || file_versions == ISC_LOG_ROLLNEVER - ? 1 - : file_versions > 0 ? file_versions + 1 - : FILE_VERSIONS + 1, - " " TEST_FILE " files, and\n", "2 lines to syslog\n", - "lines ending with exclamation marks are errors\n\n"); - - isc_log_opensyslog(progname, LOG_PID, LOG_DAEMON); - - mctx = NULL; - lctx = NULL; - lcfg = NULL; - - isc_mem_create(&mctx); - isc_log_create(mctx, &lctx, &lcfg); - - isc_log_settag(lcfg, progname); - - isc_log_setcontext(lctx); - dns_log_init(lctx); - dns_log_setcontext(lctx); - - /* - * Test isc_log_categorybyname and isc_log_modulebyname. - */ - category = isc_log_categorybyname(lctx, "notify"); - if (category != NULL) { - fprintf(stderr, "%s category found. (expected)\n", - category->name); - } else { - fprintf(stderr, "notify category not found!\n"); - } - - module = isc_log_modulebyname(lctx, "xyzzy"); - if (module != NULL) { - fprintf(stderr, "%s module found!\n", module->name); - } else { - fprintf(stderr, "xyzzy module not found. (expected)\n"); - } - - /* - * Create a file channel to test file opening, size limiting and - * version rolling. - */ - - destination.file.name = TEST_FILE; - destination.file.maximum_size = 1; - destination.file.versions = file_versions; - - isc_log_createchannel( - lcfg, "file_test", ISC_LOG_TOFILE, ISC_LOG_INFO, &destination, - ISC_LOG_PRINTTIME | ISC_LOG_PRINTTAG | ISC_LOG_PRINTLEVEL | - ISC_LOG_PRINTCATEGORY | ISC_LOG_PRINTMODULE); - - /* - * Create a dynamic debugging channel to a file descriptor. - */ - destination.file.stream = stderr; - - isc_log_createchannel(lcfg, "debug_test", ISC_LOG_TOFILEDESC, - ISC_LOG_DYNAMIC, &destination, - ISC_LOG_PRINTTIME | ISC_LOG_PRINTLEVEL | - ISC_LOG_DEBUGONLY); - - /* - * Test the usability of the four predefined logging channels. - */ - CHECK(isc_log_usechannel(lcfg, "default_syslog", - DNS_LOGCATEGORY_DATABASE, - DNS_LOGMODULE_CACHE)); - CHECK(isc_log_usechannel(lcfg, "default_stderr", - DNS_LOGCATEGORY_DATABASE, - DNS_LOGMODULE_CACHE)); - CHECK(isc_log_usechannel(lcfg, "default_debug", - DNS_LOGCATEGORY_DATABASE, - DNS_LOGMODULE_CACHE)); - CHECK(isc_log_usechannel(lcfg, "null", DNS_LOGCATEGORY_DATABASE, NULL)); - - /* - * Use the custom channels. - */ - CHECK(isc_log_usechannel(lcfg, "file_test", DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_DB)); - - CHECK(isc_log_usechannel(lcfg, "debug_test", DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_RBTDB)); - - fprintf(stderr, "\n==> stderr begin\n"); - - /* - * Write to the internal default by testing both a category for which - * no channel has been specified and a category which was specified - * but not with the named module. - */ - stderr_line = 1; - - isc_log_write(lctx, DNS_LOGCATEGORY_SECURITY, DNS_LOGMODULE_RBT, - ISC_LOG_CRITICAL, "%s (%d)", - "Unspecified category and unspecified module to stderr", - stderr_line++); - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBT, - ISC_LOG_CRITICAL, "%s (%d)", - "Specified category and unspecified module to stderr", - stderr_line++); - - /* - * Write to default_syslog, default_stderr and default_debug. - */ - isc_log_write(lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE, - ISC_LOG_WARNING, "%s (%d twice)", - "Using the predefined channels to syslog+stderr", - stderr_line++); - - /* - * Write to predefined null channel. - */ - isc_log_write(lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_RBTDB, - ISC_LOG_INFO, "This is to null and should not appear!"); - - /* - * Reset the internal default to use syslog instead of stderr, - * and test it. - */ - CHECK(isc_log_usechannel(lcfg, "default_syslog", - ISC_LOGCATEGORY_DEFAULT, NULL)); - isc_log_write(lctx, DNS_LOGCATEGORY_SECURITY, DNS_LOGMODULE_RBT, - ISC_LOG_ERROR, "%s%s", - "This message to the redefined default category should ", - "be second in syslog"); - /* - * Write to the file channel. - */ - if (file_versions >= 0 || file_versions == ISC_LOG_ROLLINFINITE) { - /* - * If file_versions is 0 or ISC_LOG_ROLLINFINITE, write - * the "should not appear" and "should be in file" messages - * to ensure they get rolled. - */ - if (file_versions <= 0) { - file_versions = FILE_VERSIONS; - } else { - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_DB, ISC_LOG_NOTICE, - "This should be rolled over " - "and not appear!"); - } - - for (i = file_versions - 1; i >= 0; i--) { - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_DB, ISC_LOG_NOTICE, - "should be in file %d/%d", i, - file_versions - 1); - } - - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DB, - ISC_LOG_NOTICE, "should be in base file"); - } else { - file_versions = FILE_VERSIONS; - for (i = 1; i <= file_versions; i++) { - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, - DNS_LOGMODULE_DB, ISC_LOG_NOTICE, - "This is message %d in the log file", i); - } - } - - /* - * Write a debugging message to a category that has no - * debugging channels for the named module. - */ - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DB, - ISC_LOG_DEBUG(1), - "This debug message should not appear!"); - - /* - * Write debugging messages to a dynamic debugging channel. - */ - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBTDB, - ISC_LOG_CRITICAL, - "This critical message should " - "not appear because the debug level is 0!"); - - isc_log_setdebuglevel(lctx, 3); - - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBTDB, - ISC_LOG_DEBUG(1), "%s (%d)", - "Dynamic debugging to stderr", stderr_line++); - isc_log_write(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBTDB, - ISC_LOG_DEBUG(5), - "This debug level is too high and should not appear!"); - - /* - * Test out the duplicate filtering using the debug_test channel. - */ - isc_log_setduplicateinterval(lcfg, 10); - message = "This message should appear only once on stderr"; - - isc_log_write1(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBTDB, - ISC_LOG_CRITICAL, "%s", message); - isc_log_write1(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBTDB, - ISC_LOG_CRITICAL, "%s", message); - - isc_log_setduplicateinterval(lcfg, 1); - message = "This message should appear twice on stderr"; - - isc_log_write1(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBTDB, - ISC_LOG_CRITICAL, "%s", message); - sleep(2); - isc_log_write1(lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_RBTDB, - ISC_LOG_CRITICAL, "%s", message); - - /* - * Review where everything went. - * XXXDCL NT - */ - fputc('\n', stderr); - if (system("head " TEST_FILE "*; rm -f " TEST_FILE "*") != 0) { - fprintf(stderr, "system(\"head " TEST_FILE "*; rm -f " TEST_FILE - "*\") failed\n"); - goto cleanup; - } - - /* This is highly system specific. */ - if (freopen(syslog_file, "r", stdin) == NULL) { - fprintf(stderr, "freopen(%s, \"r\", stdin) failed\n", - syslog_file); - goto cleanup; - } - fprintf(stderr, "\n==> %s <==\n", syslog_file); - if (system("tail -2") != 0) { - fprintf(stderr, "system(\"tail -2\") failed\n"); - goto cleanup; - } - fputc('\n', stderr); - -cleanup: - isc_log_destroy(&lctx); - - if (show_final_mem) { - isc_mem_stats(mctx, stderr); - } - - return (0); -} diff --git a/bin/tests/optional/master_test.c b/bin/tests/optional/master_test.c deleted file mode 100644 index 50ced0fc7f..0000000000 --- a/bin/tests/optional/master_test.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -isc_mem_t *mctx; - -static isc_result_t -print_dataset(void *arg, const dns_name_t *owner, dns_rdataset_t *dataset) { - char buf[64 * 1024]; - isc_buffer_t target; - isc_result_t result; - - UNUSED(arg); - - isc_buffer_init(&target, buf, 64 * 1024); - result = dns_rdataset_totext(dataset, owner, false, false, &target); - if (result == ISC_R_SUCCESS) { - fprintf(stdout, "%.*s\n", (int)target.used, - (char *)target.base); - } else { - fprintf(stdout, "dns_rdataset_totext: %s\n", - dns_result_totext(result)); - } - - return (ISC_R_SUCCESS); -} - -int -main(int argc, char *argv[]) { - isc_result_t result; - dns_name_t origin; - isc_buffer_t source; - isc_buffer_t target; - unsigned char name_buf[255]; - dns_rdatacallbacks_t callbacks; - - UNUSED(argc); - - isc_mem_create(&mctx); - - if (argv[1]) { - isc_buffer_init(&source, argv[1], strlen(argv[1])); - isc_buffer_add(&source, strlen(argv[1])); - isc_buffer_setactive(&source, strlen(argv[1])); - isc_buffer_init(&target, name_buf, 255); - dns_name_init(&origin, NULL); - result = dns_name_fromtext(&origin, &source, dns_rootname, 0, - &target); - if (result != ISC_R_SUCCESS) { - fprintf(stdout, "dns_name_fromtext: %s\n", - dns_result_totext(result)); - exit(1); - } - - dns_rdatacallbacks_init_stdio(&callbacks); - callbacks.add = print_dataset; - - result = dns_master_loadfile( - argv[1], &origin, &origin, dns_rdataclass_in, 0, 0, - &callbacks, NULL, NULL, mctx, dns_masterformat_text, 0); - fprintf(stdout, "dns_master_loadfile: %s\n", - dns_result_totext(result)); - } - return (0); -} diff --git a/bin/tests/optional/mempool_test.c b/bin/tests/optional/mempool_test.c deleted file mode 100644 index 485443c909..0000000000 --- a/bin/tests/optional/mempool_test.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -isc_mem_t *mctx; - -int -main(int argc, char *argv[]) { - void *items1[50]; - void *items2[50]; - void *tmp; - isc_mempool_t *mp1, *mp2; - unsigned int i, j; - isc_mutex_t lock; - - UNUSED(argc); - UNUSED(argv); - - isc_mem_debugging = ISC_MEM_DEBUGRECORD; - - isc_mutex_init(&lock); - - mctx = NULL; - isc_mem_create(&mctx); - - mp1 = NULL; - isc_mempool_create(mctx, 24, &mp1); - - mp2 = NULL; - isc_mempool_create(mctx, 31, &mp2); - - isc_mempool_associatelock(mp1, &lock); - isc_mempool_associatelock(mp2, &lock); - - isc_mem_stats(mctx, stderr); - - isc_mempool_setfreemax(mp1, 10); - isc_mempool_setfillcount(mp1, 10); - isc_mempool_setmaxalloc(mp1, 30); - - /* - * Allocate 30 items from the pool. This is our max. - */ - for (i = 0; i < 30; i++) { - items1[i] = isc_mempool_get(mp1); - RUNTIME_CHECK(items1[i] != NULL); - } - - /* - * Try to allocate one more. This should fail. - */ - tmp = isc_mempool_get(mp1); - RUNTIME_CHECK(tmp == NULL); - - /* - * Free the first 11 items. Verify that there are 10 free items on - * the free list (which is our max). - */ - - for (i = 0; i < 11; i++) { - isc_mempool_put(mp1, items1[i]); - items1[i] = NULL; - } - - RUNTIME_CHECK(isc_mempool_getfreecount(mp1) == 10); - RUNTIME_CHECK(isc_mempool_getallocated(mp1) == 19); - - isc_mem_stats(mctx, stderr); - - /* - * Now, beat up on mp2 for a while. Allocate 50 items, then free - * them, then allocate 50 more, etc. - */ - isc_mempool_setfreemax(mp2, 25); - isc_mempool_setfillcount(mp2, 25); - for (j = 0; j < 5000; j++) { - for (i = 0; i < 50; i++) { - items2[i] = isc_mempool_get(mp2); - RUNTIME_CHECK(items2[i] != NULL); - } - for (i = 0; i < 50; i++) { - isc_mempool_put(mp2, items2[i]); - items2[i] = NULL; - } - } - - /* - * Free all the other items and blow away this pool. - */ - for (i = 11; i < 30; i++) { - isc_mempool_put(mp1, items1[i]); - items1[i] = NULL; - } - - isc_mempool_destroy(&mp1); - - isc_mem_stats(mctx, stderr); - - isc_mempool_destroy(&mp2); - - isc_mem_stats(mctx, stderr); - - isc_mem_destroy(&mctx); - - isc_mutex_destroy(&lock); - - return (0); -} diff --git a/bin/tests/optional/name_test.c b/bin/tests/optional/name_test.c deleted file mode 100644 index 06afedf938..0000000000 --- a/bin/tests/optional/name_test.c +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include -#include - -#include -#include - -static void -print_wirename(isc_region_t *name) { - unsigned char *ccurr, *cend; - - if (name->length == 0) { - printf("\n"); - return; - } - ccurr = name->base; - cend = ccurr + name->length; - while (ccurr != cend) { - printf("%02x ", *ccurr++); - } - printf("\n"); -} - -static void -print_name(dns_name_t *name) { - isc_result_t result; - isc_buffer_t source; - isc_region_t r; - char s[1000]; - - isc_buffer_init(&source, s, sizeof(s)); - if (dns_name_countlabels(name) > 0) { - result = dns_name_totext(name, false, &source); - } else { - result = ISC_R_SUCCESS; - } - if (result == ISC_R_SUCCESS) { - isc_buffer_usedregion(&source, &r); - if (r.length > 0) { - printf("%.*s\n", (int)r.length, r.base); - } else { - printf("\n"); - } - } else { - printf("error: %s\n", dns_result_totext(result)); - } -} - -int -main(int argc, char *argv[]) { - char s[1000]; - isc_result_t result; - dns_fixedname_t wname, wname2, oname, compname, downname; - isc_buffer_t source; - isc_region_t r; - dns_name_t *name, *comp, *down; - const dns_name_t *origin; - unsigned int downcase = 0; - size_t len; - bool quiet = false; - bool concatenate = false; - bool got_name = false; - bool check_absolute = false; - bool check_wildcard = false; - bool test_downcase = false; - bool inplace = false; - bool want_split = false; - unsigned int labels, split_label = 0; - dns_fixedname_t fprefix, fsuffix; - dns_name_t *prefix, *suffix; - int ch; - - while ((ch = isc_commandline_parse(argc, argv, "acdiqs:w")) != -1) { - switch (ch) { - case 'a': - check_absolute = true; - break; - case 'c': - concatenate = true; - break; - case 'd': - test_downcase = true; - break; - case 'i': - inplace = true; - break; - case 'q': - quiet = true; - break; - case 's': - want_split = true; - split_label = atoi(isc_commandline_argument); - break; - case 'w': - check_wildcard = true; - break; - } - } - - argc -= isc_commandline_index; - argv += isc_commandline_index; - - if (argc > 0) { - if (strcasecmp("none", argv[0]) == 0) { - origin = NULL; - } else { - len = strlen(argv[0]); - isc_buffer_init(&source, argv[0], len); - isc_buffer_add(&source, len); - dns_fixedname_init(&oname); - result = dns_name_fromtext(dns_fixedname_name(&oname), - &source, dns_rootname, 0, - NULL); - if (result != 0) { - fprintf(stderr, - "dns_name_fromtext() failed: %s\n", - dns_result_totext(result)); - exit(1); - } - origin = dns_fixedname_name(&oname); - } - } else if (concatenate) { - origin = NULL; - } else { - origin = dns_rootname; - } - - if (argc >= 1) { - if (strcasecmp("none", argv[1]) == 0) { - comp = NULL; - } else { - len = strlen(argv[1]); - isc_buffer_init(&source, argv[1], len); - isc_buffer_add(&source, len); - comp = dns_fixedname_initname(&compname); - result = dns_name_fromtext(comp, &source, origin, 0, - NULL); - if (result != 0) { - fprintf(stderr, - "dns_name_fromtext() failed: %s\n", - dns_result_totext(result)); - exit(1); - } - } - } else { - comp = NULL; - } - - name = dns_fixedname_initname(&wname); - dns_fixedname_init(&wname2); - while (fgets(s, sizeof(s), stdin) != NULL) { - len = strlen(s); - if (len > 0U && s[len - 1] == '\n') { - s[len - 1] = '\0'; - len--; - } - isc_buffer_init(&source, s, len); - isc_buffer_add(&source, len); - - if (len > 0U) { - result = dns_name_fromtext(name, &source, origin, - downcase, NULL); - } else { - if (name == dns_fixedname_name(&wname)) { - dns_fixedname_init(&wname); - } else { - dns_fixedname_init(&wname2); - } - result = ISC_R_SUCCESS; - } - - if (result != ISC_R_SUCCESS) { - printf("%s\n", dns_result_totext(result)); - if (name == dns_fixedname_name(&wname)) { - dns_fixedname_init(&wname); - } else { - dns_fixedname_init(&wname2); - } - continue; - } - - if (check_absolute && dns_name_countlabels(name) > 0) { - if (dns_name_isabsolute(name)) { - printf("absolute\n"); - } else { - printf("relative\n"); - } - } - if (check_wildcard && dns_name_countlabels(name) > 0) { - if (dns_name_iswildcard(name)) { - printf("wildcard\n"); - } else { - printf("not wildcard\n"); - } - } - dns_name_toregion(name, &r); - if (!quiet) { - print_wirename(&r); - printf("%u labels, %u bytes.\n", - dns_name_countlabels(name), r.length); - } - - if (concatenate) { - if (got_name) { - printf("Concatenating.\n"); - result = dns_name_concatenate( - dns_fixedname_name(&wname), - dns_fixedname_name(&wname2), - dns_fixedname_name(&wname2), NULL); - name = dns_fixedname_name(&wname2); - if (result == ISC_R_SUCCESS) { - if (check_absolute && - dns_name_countlabels(name) > 0) { - if (dns_name_isabsolute(name)) { - printf("absolute\n"); - } else { - printf("relative\n"); - } - } - if (check_wildcard && - dns_name_countlabels(name) > 0) { - if (dns_name_iswildcard(name)) { - printf("wildcard\n"); - } else { - printf("not " - "wildcard\n"); - } - } - dns_name_toregion(name, &r); - if (!quiet) { - print_wirename(&r); - printf("%u labels, " - "%u bytes.\n", - dns_name_countlabels( - name), - r.length); - } - } else { - printf("%s\n", - dns_result_totext(result)); - } - got_name = false; - } else { - got_name = true; - } - } - isc_buffer_init(&source, s, sizeof(s)); - if (dns_name_countlabels(name) > 0) { - result = dns_name_totext(name, false, &source); - } else { - result = ISC_R_SUCCESS; - } - if (result == ISC_R_SUCCESS) { - isc_buffer_usedregion(&source, &r); - if (r.length > 0) { - printf("%.*s\n", (int)r.length, r.base); - } else { - printf("\n"); - } - if (!quiet) { - printf("%u bytes.\n", source.used); - } - } else { - printf("%s\n", dns_result_totext(result)); - } - - if (test_downcase) { - if (inplace) { - down = name; - } else { - down = dns_fixedname_initname(&downname); - } - result = dns_name_downcase(name, down, NULL); - INSIST(result == ISC_R_SUCCESS); - if (!quiet) { - dns_name_toregion(down, &r); - print_wirename(&r); - printf("%u labels, %u bytes.\n", - dns_name_countlabels(down), r.length); - } - isc_buffer_init(&source, s, sizeof(s)); - print_name(down); - } - - if (comp != NULL && dns_name_countlabels(name) > 0) { - int order; - unsigned int nlabels; - dns_namereln_t namereln; - - namereln = dns_name_fullcompare(name, comp, &order, - &nlabels); - if (!quiet) { - if (order < 0) { - printf("<"); - } else if (order > 0) { - printf(">"); - } else { - printf("="); - } - switch (namereln) { - case dns_namereln_contains: - printf(", contains"); - break; - case dns_namereln_subdomain: - printf(", subdomain"); - break; - case dns_namereln_commonancestor: - printf(", common ancestor"); - break; - default: - break; - } - if (namereln != dns_namereln_none && - namereln != dns_namereln_equal) { - printf(", nlabels = %u", nlabels); - } - printf("\n"); - } - printf("dns_name_equal() returns %s\n", - dns_name_equal(name, comp) ? "TRUE" : "FALSE"); - } - - labels = dns_name_countlabels(name); - if (want_split && split_label < labels) { - prefix = dns_fixedname_initname(&fprefix); - suffix = dns_fixedname_initname(&fsuffix); - printf("splitting at label %u: ", split_label); - dns_name_split(name, split_label, prefix, suffix); - printf("\n prefix = "); - print_name(prefix); - printf(" suffix = "); - print_name(suffix); - } - - if (concatenate) { - if (got_name) { - name = dns_fixedname_name(&wname2); - } else { - name = dns_fixedname_name(&wname); - } - } - } - - return (0); -} diff --git a/bin/tests/optional/nsecify.c b/bin/tests/optional/nsecify.c deleted file mode 100644 index c762003376..0000000000 --- a/bin/tests/optional/nsecify.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -static isc_mem_t *mctx = NULL; - -ISC_PLATFORM_NORETURN_PRE static inline void -fatal(const char *message) ISC_PLATFORM_NORETURN_POST; - -static inline void -fatal(const char *message) { - fprintf(stderr, "%s\n", message); - exit(1); -} - -static inline void -check_result(isc_result_t result, const char *message) { - if (result != ISC_R_SUCCESS) { - fprintf(stderr, "%s: %s\n", message, isc_result_totext(result)); - exit(1); - } -} - -static inline bool -active_node(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) { - dns_rdatasetiter_t *rdsiter; - bool active = false; - isc_result_t result; - dns_rdataset_t rdataset; - - dns_rdataset_init(&rdataset); - rdsiter = NULL; - result = dns_db_allrdatasets(db, node, version, 0, &rdsiter); - check_result(result, "dns_db_allrdatasets()"); - result = dns_rdatasetiter_first(rdsiter); - while (result == ISC_R_SUCCESS) { - dns_rdatasetiter_current(rdsiter, &rdataset); - if (rdataset.type != dns_rdatatype_nsec) { - active = true; - } - dns_rdataset_disassociate(&rdataset); - if (!active) { - result = dns_rdatasetiter_next(rdsiter); - } else { - result = ISC_R_NOMORE; - } - } - if (result != ISC_R_NOMORE) { - fatal("rdataset iteration failed"); - } - dns_rdatasetiter_destroy(&rdsiter); - - if (!active) { - /* - * Make sure there is no NSEC record for this node. - */ - result = dns_db_deleterdataset(db, node, version, - dns_rdatatype_nsec, 0); - if (result == DNS_R_UNCHANGED) { - result = ISC_R_SUCCESS; - } - check_result(result, "dns_db_deleterdataset"); - } - - return (active); -} - -static inline isc_result_t -next_active(dns_db_t *db, dns_dbversion_t *version, dns_dbiterator_t *dbiter, - dns_name_t *name, dns_dbnode_t **nodep) { - isc_result_t result; - bool active; - - do { - active = false; - result = dns_dbiterator_current(dbiter, nodep, name); - if (result == ISC_R_SUCCESS) { - active = active_node(db, version, *nodep); - if (!active) { - dns_db_detachnode(db, nodep); - result = dns_dbiterator_next(dbiter); - } - } - } while (result == ISC_R_SUCCESS && !active); - - return (result); -} - -static void -nsecify(char *filename) { - isc_result_t result; - dns_db_t *db; - dns_dbversion_t *wversion; - dns_dbnode_t *node, *nextnode; - const char *origintext; - dns_fixedname_t fname, fnextname; - dns_name_t *name, *nextname, *target; - isc_buffer_t b; - size_t len; - dns_dbiterator_t *dbiter; - char newfilename[1024]; - - name = dns_fixedname_initname(&fname); - nextname = dns_fixedname_initname(&fnextname); - - origintext = strrchr(filename, '/'); - if (origintext == NULL) { - origintext = filename; - } else { - origintext++; /* Skip '/'. */ - } - len = strlen(origintext); - isc_buffer_constinit(&b, origintext, len); - isc_buffer_add(&b, len); - result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL); - check_result(result, "dns_name_fromtext()"); - - db = NULL; - result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone, - dns_rdataclass_in, 0, NULL, &db); - check_result(result, "dns_db_create()"); - result = dns_db_load(db, filename, dns_masterformat_text, 0); - if (result == DNS_R_SEENINCLUDE) { - result = ISC_R_SUCCESS; - } - check_result(result, "dns_db_load()"); - wversion = NULL; - result = dns_db_newversion(db, &wversion); - check_result(result, "dns_db_newversion()"); - dbiter = NULL; - result = dns_db_createiterator(db, 0, &dbiter); - check_result(result, "dns_db_createiterator()"); - result = dns_dbiterator_first(dbiter); - check_result(result, "dns_dbiterator_first()"); - node = NULL; - result = next_active(db, wversion, dbiter, name, &node); - while (result == ISC_R_SUCCESS) { - nextnode = NULL; - result = dns_dbiterator_next(dbiter); - if (result == ISC_R_SUCCESS) { - result = next_active(db, wversion, dbiter, nextname, - &nextnode); - } - if (result == ISC_R_SUCCESS) { - target = nextname; - } else if (result == ISC_R_NOMORE) { - target = dns_db_origin(db); - } else { - target = NULL; /* Make compiler happy. */ - fatal("db iteration failed"); - } - dns_nsec_build(db, wversion, node, target, 3600); /* XXX BEW */ - dns_db_detachnode(db, &node); - node = nextnode; - } - if (result != ISC_R_NOMORE) { - fatal("db iteration failed"); - } - dns_dbiterator_destroy(&dbiter); - /* - * XXXRTH For now, we don't increment the SOA serial. - */ - dns_db_closeversion(db, &wversion, true); - len = strlen(filename); - if (len + 4 + 1 > sizeof(newfilename)) { - fatal("filename too long"); - } - snprintf(newfilename, sizeof(newfilename), "%s.new", filename); - result = dns_db_dump(db, NULL, newfilename); - check_result(result, "dns_db_dump"); - dns_db_detach(&db); -} - -int -main(int argc, char *argv[]) { - int i; - - dns_result_register(); - - isc_mem_create(&mctx); - - argc--; - argv++; - - for (i = 0; i < argc; i++) { - nsecify(argv[i]); - } - - /* isc_mem_stats(mctx, stdout); */ - isc_mem_destroy(&mctx); - - return (0); -} diff --git a/bin/tests/optional/ratelimiter_test.c b/bin/tests/optional/ratelimiter_test.c deleted file mode 100644 index fd2111565b..0000000000 --- a/bin/tests/optional/ratelimiter_test.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -isc_ratelimiter_t *rlim = NULL; -isc_taskmgr_t *taskmgr = NULL; -isc_timermgr_t *timermgr = NULL; -isc_task_t *g_task = NULL; -isc_mem_t *mctx = NULL; - -static void -utick(isc_task_t *task, isc_event_t *event); -static void -shutdown_rl(isc_task_t *task, isc_event_t *event); -static void -shutdown_all(isc_task_t *task, isc_event_t *event); - -typedef struct { - int milliseconds; - void (*fun)(isc_task_t *, isc_event_t *); -} schedule_t; - -schedule_t schedule[] = { { 100, utick }, { 200, utick }, - { 300, utick }, { 3000, utick }, - { 3100, utick }, { 3200, utick }, - { 3300, shutdown_rl }, { 5000, utick }, - { 6000, shutdown_all } }; - -#define NEVENTS (int)(sizeof(schedule) / sizeof(schedule[0])) - -isc_timer_t *timers[NEVENTS]; - -static void -ltick(isc_task_t *task, isc_event_t *event) { - UNUSED(task); - printf("** ltick%s **\n", - (event->ev_attributes & ISC_EVENTATTR_CANCELED) != 0 ? " (" - "canceled" - ")" - : ""); - isc_event_free(&event); -} - -static void -utick(isc_task_t *task, isc_event_t *event) { - isc_result_t result; - UNUSED(task); - event->ev_action = ltick; - event->ev_sender = NULL; - result = isc_ratelimiter_enqueue(rlim, g_task, &event); - printf("enqueue: %s\n", result == ISC_R_SUCCESS ? "ok" : "failed"); -} - -static void -shutdown_rl(isc_task_t *task, isc_event_t *event) { - UNUSED(task); - UNUSED(event); - printf("shutdown ratelimiter\n"); - isc_ratelimiter_shutdown(rlim); -} - -static void -shutdown_all(isc_task_t *task, isc_event_t *event) { - int i; - UNUSED(task); - UNUSED(event); - printf("shutdown all\n"); - for (i = 0; i < NEVENTS; i++) { - isc_timer_detach(&timers[i]); - } - - isc_app_shutdown(); -} - -int -main(int argc, char *argv[]) { - isc_interval_t linterval; - int i; - - UNUSED(argc); - UNUSED(argv); - - isc_app_start(); - isc_interval_set(&linterval, 1, 0); - - isc_mem_create(&mctx); - RUNTIME_CHECK(isc_taskmgr_create(mctx, 3, 0, NULL, &taskmgr) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_create(taskmgr, 0, &g_task) == ISC_R_SUCCESS); - - RUNTIME_CHECK(isc_ratelimiter_create(mctx, timermgr, g_task, &rlim) == - ISC_R_SUCCESS); - - RUNTIME_CHECK(isc_ratelimiter_setinterval(rlim, &linterval) == - ISC_R_SUCCESS); - - for (i = 0; i < NEVENTS; i++) { - isc_interval_t uinterval; - int ms = schedule[i].milliseconds; - isc_interval_set(&uinterval, ms / 1000, (ms % 1000) * 1000000); - timers[i] = NULL; - RUNTIME_CHECK(isc_timer_create(timermgr, isc_timertype_once, - NULL, &uinterval, g_task, - schedule[i].fun, NULL, - &timers[i]) == ISC_R_SUCCESS); - } - - isc_app_run(); - - isc_task_destroy(&g_task); - - isc_ratelimiter_detach(&rlim); - - isc_timermgr_destroy(&timermgr); - isc_taskmgr_destroy(&taskmgr); - - isc_mem_stats(mctx, stdout); - - isc_app_finish(); - return (0); -} diff --git a/bin/tests/optional/rbt_test.c b/bin/tests/optional/rbt_test.c deleted file mode 100644 index 4bba6553f1..0000000000 --- a/bin/tests/optional/rbt_test.c +++ /dev/null @@ -1,429 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -const char *progname; -isc_mem_t *mctx; - -#define DNSNAMELEN 255 - -static dns_name_t * -create_name(char *s) { - int length; - isc_result_t result; - isc_buffer_t source, target; - static dns_name_t *name; - - if (s == NULL || *s == '\0') { - printf("missing name argument\n"); - return (NULL); - } - - length = strlen(s); - - isc_buffer_init(&source, s, length); - isc_buffer_add(&source, length); - - /* - * It isn't really necessary in this program to create individual - * memory spaces for each name structure and its associated character - * string. It is done here to provide a relatively easy way to test - * the callback from dns_rbt_deletename that is supposed to free the - * data associated with a node. - * - * The buffer for the actual name will immediately follow the - * name structure. - */ - name = isc_mem_get(mctx, sizeof(*name) + DNSNAMELEN); - - dns_name_init(name, NULL); - isc_buffer_init(&target, name + 1, DNSNAMELEN); - - result = dns_name_fromtext(name, &source, dns_rootname, 0, &target); - - if (result != ISC_R_SUCCESS) { - printf("dns_name_fromtext(%s) failed: %s\n", s, - dns_result_totext(result)); - return (NULL); - } - - return (name); -} - -static void -delete_name(void *data, void *arg) { - dns_name_t *name; - - UNUSED(arg); - name = data; - isc_mem_put(mctx, name, sizeof(*name) + DNSNAMELEN); -} - -static void -print_name(dns_name_t *name) { - isc_buffer_t target; - char buffer[1024]; - - isc_buffer_init(&target, buffer, sizeof(buffer)); - - /* - * false means absolute names have the final dot added. - */ - dns_name_totext(name, false, &target); - - printf("%.*s", (int)target.used, (char *)target.base); -} - -static void -detail(dns_rbt_t *rbt, dns_name_t *name) { - dns_name_t *foundname, *origin, *fullname; - dns_fixedname_t fixedfoundname, fixedorigin, fixedfullname; - dns_rbtnode_t *node1, *node2; - dns_rbtnodechain_t chain; - isc_result_t result; - bool nodes_should_match = false; - - dns_rbtnodechain_init(&chain); - - origin = dns_fixedname_initname(&fixedorigin); - fullname = dns_fixedname_initname(&fixedfullname); - foundname = dns_fixedname_initname(&fixedfoundname); - - node1 = node2 = NULL; - - printf("checking chain information for "); - print_name(name); - printf("\n"); - - result = dns_rbt_findnode(rbt, name, foundname, &node1, &chain, - DNS_RBTFIND_EMPTYDATA, NULL, NULL); - - switch (result) { - case ISC_R_SUCCESS: - printf(" found exact."); - nodes_should_match = true; - break; - case DNS_R_PARTIALMATCH: - printf(" found parent."); - break; - case ISC_R_NOTFOUND: - printf(" name not found."); - break; - default: - printf(" unexpected result: %s\n", dns_result_totext(result)); - return; - } - - if (node1 != NULL && node1->data != NULL) { - printf(" data at node: "); - print_name(node1->data); - } else { - printf(" no data at node."); - } - - if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) { - printf("\n name from dns_rbt_findnode: "); - print_name(foundname); - } - - result = dns_rbtnodechain_current(&chain, foundname, origin, &node2); - - if (result == ISC_R_SUCCESS) { - printf("\n name from dns_rbtnodechain_current: "); - - result = dns_name_concatenate(foundname, origin, fullname, - NULL); - if (result == ISC_R_SUCCESS) { - print_name(fullname); - } else { - printf("%s\n", dns_result_totext(result)); - } - printf("\n (foundname = "); - print_name(foundname); - printf(", origin = "); - print_name(origin); - printf(")\n"); - if (nodes_should_match && node1 != node2) { - printf(" nodes returned from each function " - "DO NOT match!\n"); - } - } else { - printf("\n result from dns_rbtnodechain_current: %s\n", - dns_result_totext(result)); - } - - printf(" level_matches = %u, level_count = %u\n", chain.level_matches, - chain.level_count); -} - -static void -iterate(dns_rbt_t *rbt, bool forward) { - dns_name_t foundname, *origin; - dns_rbtnodechain_t chain; - dns_fixedname_t fixedorigin; - isc_result_t result; - isc_result_t (*move)(dns_rbtnodechain_t * chain, dns_name_t * name, - dns_name_t * origin); - - dns_rbtnodechain_init(&chain); - - dns_name_init(&foundname, NULL); - origin = dns_fixedname_initname(&fixedorigin); - - if (forward) { - printf("iterating forward\n"); - move = dns_rbtnodechain_next; - - result = dns_rbtnodechain_first(&chain, rbt, &foundname, - origin); - } else { - printf("iterating backward\n"); - move = dns_rbtnodechain_prev; - - result = dns_rbtnodechain_last(&chain, rbt, &foundname, origin); - } - - if (result != ISC_R_SUCCESS && result != DNS_R_NEWORIGIN) { - printf("start not found!\n"); - } else { - for (;;) { - if (result == DNS_R_NEWORIGIN) { - printf(" new origin: "); - print_name(origin); - printf("\n"); - } - - if (result == ISC_R_SUCCESS || - result == DNS_R_NEWORIGIN) { - print_name(&foundname); - printf("\n"); - } else { - if (result != ISC_R_NOMORE) { - printf("UNEXPECTED ITERATION ERROR: %s", - dns_result_totext(result)); - } - break; - } - - result = move(&chain, &foundname, origin); - } - } -} - -#define CMDCHECK(s) (strncasecmp(command, (s), length) == 0) -#define PRINTERR(r) \ - if (r != ISC_R_SUCCESS) \ - printf("... %s\n", dns_result_totext(r)); - -int -main(int argc, char **argv) { - char *command, *arg, buffer[1024]; - const char *whitespace; - dns_name_t *name, *foundname; - dns_fixedname_t fixedname; - dns_rbt_t *rbt = NULL; - int length, ch; - bool show_final_mem = false; - isc_result_t result; - void *data; - - progname = strrchr(*argv, '/'); - if (progname != NULL) { - progname++; - } else { - progname = *argv; - } - - while ((ch = isc_commandline_parse(argc, argv, "m")) != -1) { - switch (ch) { - case 'm': - show_final_mem = true; - break; - } - } - - argc -= isc_commandline_index; - argv += isc_commandline_index; - POST(argv); - - if (argc > 1) { - printf("Usage: %s [-m]\n", progname); - exit(1); - } - - setbuf(stdout, NULL); - - /* - * So isc_mem_stats() can report any allocation leaks. - */ - isc_mem_debugging = ISC_MEM_DEBUGRECORD; - - isc_mem_create(&mctx); - - result = dns_rbt_create(mctx, delete_name, NULL, &rbt); - if (result != ISC_R_SUCCESS) { - printf("dns_rbt_create: %s: exiting\n", - dns_result_totext(result)); - exit(1); - } - - whitespace = " \t"; - - while (fgets(buffer, sizeof(buffer), stdin) != NULL) { - length = strlen(buffer); - - if (buffer[length - 1] != '\n') { - printf("line to long (%lu max), ignored\n", - (unsigned long)sizeof(buffer) - 2); - continue; - } - - buffer[length - 1] = '\0'; - - command = buffer + strspn(buffer, whitespace); - - if (*command == '#') { - continue; - } - - arg = strpbrk(command, whitespace); - if (arg != NULL) { - *arg++ = '\0'; - arg += strspn(arg, whitespace); - } - - length = strlen(command); - if (*command != '\0') { - if (CMDCHECK("add")) { - name = create_name(arg); - if (name != NULL) { - printf("adding name %s\n", arg); - result = dns_rbt_addname(rbt, name, - name); - PRINTERR(result); - } - } else if (CMDCHECK("delete")) { - name = create_name(arg); - if (name != NULL) { - printf("deleting name %s\n", arg); - result = dns_rbt_deletename(rbt, name, - false); - PRINTERR(result); - delete_name(name, NULL); - } - } else if (CMDCHECK("nuke")) { - name = create_name(arg); - if (name != NULL) { - printf("nuking name %s " - "and its descendants\n", - arg); - result = dns_rbt_deletename(rbt, name, - true); - PRINTERR(result); - delete_name(name, NULL); - } - } else if (CMDCHECK("search")) { - name = create_name(arg); - if (name != NULL) { - printf("searching for name %s ... ", - arg); - - foundname = dns_fixedname_initname( - &fixedname); - data = NULL; - - result = dns_rbt_findname( - rbt, name, 0, foundname, &data); - switch (result) { - case ISC_R_SUCCESS: - printf("found exact: "); - print_name(data); - putchar('\n'); - break; - case DNS_R_PARTIALMATCH: - printf("found parent: "); - print_name(data); - printf("\n\t(foundname: "); - print_name(foundname); - printf(")\n"); - break; - case ISC_R_NOTFOUND: - printf("NOT FOUND!\n"); - break; - case ISC_R_NOMEMORY: - printf("OUT OF MEMORY!\n"); - break; - default: - printf("UNEXPECTED RESULT\n"); - } - - delete_name(name, NULL); - } - } else if (CMDCHECK("check")) { - /* - * Or "chain". I know, I know. Lame name. - * I was having a hard time thinking of a - * name (especially one that did not have - * a conflicting first letter with another - * command) that would differentiate this - * from the search command. - * - * But it is just a test program, eh? - */ - name = create_name(arg); - if (name != NULL) { - detail(rbt, name); - - delete_name(name, NULL); - } - } else if (CMDCHECK("forward")) { - iterate(rbt, true); - } else if (CMDCHECK("backward")) { - iterate(rbt, false); - } else if (CMDCHECK("print")) { - if (arg == NULL || *arg == '\0') { - dns_rbt_printtext(rbt, NULL, stdout); - } else { - printf("usage: print\n"); - } - } else if (CMDCHECK("quit")) { - if (arg == NULL || *arg == '\0') { - break; - } else { - printf("usage: quit\n"); - } - } else { - printf("a(dd) NAME, d(elete) NAME, " - "s(earch) NAME, p(rint), or q(uit)\n"); - } - } - } - - dns_rbt_destroy(&rbt); - - if (show_final_mem) { - isc_mem_stats(mctx, stderr); - } - - return (0); -} diff --git a/bin/tests/optional/rbt_test.out b/bin/tests/optional/rbt_test.out deleted file mode 100644 index 95bf4f9835..0000000000 --- a/bin/tests/optional/rbt_test.out +++ /dev/null @@ -1,395 +0,0 @@ -adding name a.vix.com -adding name b.vix.com -adding name c.vix.com -vix.com. (black) - ++ BEG down from vix.com. - b (black) - a (RED from b) - NULL - NULL - c (RED from b) - NULL - NULL - -- END down from vix.com. - NULL - NULL -adding name a.b.c.d.e.f.vix.com -adding name b.b.c.d.e.f.vix.com -adding name c.b.c.d.e.f.vix.com -vix.com. (black) - ++ BEG down from vix.com. - b (black) - a (black from b) - NULL - NULL - c (black from b) - NULL - b.c.d.e.f (RED from c) - ++ BEG down from b.c.d.e.f - b (black) - a (RED from b) - NULL - NULL - c (RED from b) - NULL - NULL - -- END down from b.c.d.e.f - NULL - NULL - -- END down from vix.com. - NULL - NULL -adding name a.d.e.f.vix.com -adding name q.d.e.f.vix.com -adding name d.e.f.vix.com -vix.com. (black) - ++ BEG down from vix.com. - b (black) - a (black from b) - NULL - NULL - c (black from b) - NULL - d.e.f (RED from c) - ++ BEG down from d.e.f - b.c (black) - ++ BEG down from b.c - b (black) - a (RED from b) - NULL - NULL - c (RED from b) - NULL - NULL - -- END down from b.c - a (RED from b.c) - NULL - NULL - q (RED from b.c) - NULL - NULL - -- END down from d.e.f - NULL - NULL - -- END down from vix.com. - NULL - NULL -adding name g.h.vix.com -vix.com. (black) - ++ BEG down from vix.com. - b (black) - a (black from b) - NULL - NULL - d.e.f (black from b) - ++ BEG down from d.e.f - b.c (black) - ++ BEG down from b.c - b (black) - a (RED from b) - NULL - NULL - c (RED from b) - NULL - NULL - -- END down from b.c - a (RED from b.c) - NULL - NULL - q (RED from b.c) - NULL - NULL - -- END down from d.e.f - c (RED from d.e.f) - NULL - NULL - g.h (RED from d.e.f) - NULL - NULL - -- END down from vix.com. - NULL - NULL -searching for name q.d.e.f.vix.com ... found exact: q.d.e.f.vix.com. -searching for name just-parent.a.vix.com ... found parent: a.vix.com. - (foundname: a.vix.com.) -searching for name no-real-parent.vix.com ... NOT FOUND! -searching for name does.not.exist.at.all ... NOT FOUND! -iterating forward - new origin: . -vix.com - new origin: vix.com. -a -b -c -d.e.f - new origin: d.e.f.vix.com. -a -b.c - new origin: b.c.d.e.f.vix.com. -a -b -c - new origin: d.e.f.vix.com. -q - new origin: vix.com. -g.h -iterating backward - new origin: vix.com. -g.h - new origin: d.e.f.vix.com. -q - new origin: b.c.d.e.f.vix.com. -c -b -a - new origin: d.e.f.vix.com. -b.c -a - new origin: vix.com. -d.e.f -c -b -a - new origin: . -vix.com -checking chain information for vix.com. - found exact. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: vix.com. - (foundname = vix.com, origin = .) - level_matches = 0, level_count = 0 -checking chain information for zzz.com. - name not found. no data at node. - name from dns_rbtnodechain_current: g.h.vix.com. - (foundname = g.h, origin = vix.com.) - level_matches = 0, level_count = 1 -checking chain information for 0.vix.com. - found parent. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: vix.com. - (foundname = vix.com, origin = .) - level_matches = 0, level_count = 0 -checking chain information for d.vix.com. - found parent. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: c.vix.com. - (foundname = c, origin = vix.com.) - level_matches = 0, level_count = 1 -checking chain information for f.vix.com. - found parent. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: c.vix.com. - (foundname = c, origin = vix.com.) - level_matches = 0, level_count = 1 -checking chain information for a.e.f.vix.com. - found parent. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: c.vix.com. - (foundname = c, origin = vix.com.) - level_matches = 0, level_count = 1 -checking chain information for z.e.f.vix.com. - found parent. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: q.d.e.f.vix.com. - (foundname = q, origin = d.e.f.vix.com.) - level_matches = 0, level_count = 2 -checking chain information for g.vix.com. - found parent. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: q.d.e.f.vix.com. - (foundname = q, origin = d.e.f.vix.com.) - level_matches = 0, level_count = 2 -checking chain information for i.vix.com. - found parent. no data at node. - name from dns_rbt_findnode: vix.com. - name from dns_rbtnodechain_current: g.h.vix.com. - (foundname = g.h, origin = vix.com.) - level_matches = 0, level_count = 1 -checking chain information for b.c.vix.com. - found parent. data at node: c.vix.com. - name from dns_rbt_findnode: c.vix.com. - name from dns_rbtnodechain_current: c.vix.com. - (foundname = c, origin = vix.com.) - level_matches = 1, level_count = 1 -nuking name d.e.f.vix.com and its descendants -vix.com. (black) - ++ BEG down from vix.com. - b (black) - a (black from b) - NULL - NULL - g.h (black from b) - c (RED from g.h) - NULL - NULL - NULL - -- END down from vix.com. - NULL - NULL -adding name x.a.vix.com -adding name y.x.a.vix.com -vix.com. (black) - ++ BEG down from vix.com. - b (black) - a (black from b) - ++ BEG down from a - x (black) - ++ BEG down from x - y (black) - NULL - NULL - -- END down from x - NULL - NULL - -- END down from a - NULL - NULL - g.h (black from b) - c (RED from g.h) - NULL - NULL - NULL - -- END down from vix.com. - NULL - NULL -deleting name a.vix.com -deleting name x.a.vix.com -vix.com. (black) - ++ BEG down from vix.com. - b (black) - a (black from b) - ++ BEG down from a - x (black) - ++ BEG down from x - y (black) - NULL - NULL - -- END down from x - NULL - NULL - -- END down from a - NULL - NULL - g.h (black from b) - c (RED from g.h) - NULL - NULL - NULL - -- END down from vix.com. - NULL - NULL -deleting name b.vix.com -deleting name c.vix.com -vix.com. (black) - ++ BEG down from vix.com. - g.h (black) - a (RED from g.h) - ++ BEG down from a - x (black) - ++ BEG down from x - y (black) - NULL - NULL - -- END down from x - NULL - NULL - -- END down from a - NULL - NULL - NULL - -- END down from vix.com. - NULL - NULL -deleting name y.x.a.vix.com -vix.com. (black) - ++ BEG down from vix.com. - g.h (black) - a (RED from g.h) - ++ BEG down from a - x (black) - NULL - NULL - -- END down from a - NULL - NULL - NULL - -- END down from vix.com. - NULL - NULL -deleting name g.h.vix.com. -adding name \[b100000].vix.com. -adding name \[b010000].vix.com. -adding name \[b001000].vix.com. -adding name \[b000100].vix.com. -adding name \[b000010].vix.com. -adding name \[b000001].vix.com. -vix.com. (black) - ++ BEG down from vix.com. - \[x80/6] (black) - \[x0/1] (RED from \[x80/6]) - ++ BEG down from \[x0/1] - \[x80/5] (black) - \[x0/1] (RED from \[x80/5]) - ++ BEG down from \[x0/1] - \[x8/4] (black) - \[x0/1] (RED from \[x8/4]) - ++ BEG down from \[x0/1] - \[x8/3] (black) - \[x0/1] (RED from \[x8/3]) - ++ BEG down from \[x0/1] - \[x8/2] (black) - \[x4/2] (RED from \[x8/2]) - NULL - NULL - NULL - -- END down from \[x0/1] - NULL - NULL - NULL - -- END down from \[x0/1] - NULL - NULL - NULL - -- END down from \[x0/1] - NULL - NULL - NULL - -- END down from \[x0/1] - NULL - NULL - a (RED from \[x80/6]) - ++ BEG down from a - x (black) - NULL - NULL - -- END down from a - NULL - NULL - -- END down from vix.com. - NULL - NULL -searching for name \[b000100].vix.com. ... found exact: \[x10/6].vix.com. -adding name vix.com. -nuking name vix.com. and its descendants -adding name a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. -adding name b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. -b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. (black) - ++ BEG down from b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. - a (black) - NULL - NULL - -- END down from b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. - NULL - NULL -adding name . -nuking name . and its descendants -adding name \[xFFFF/16].\[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/256].com -adding name \[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/128].com -\[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/128].com. (black) - ++ BEG down from \[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/128].com. - \[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/144] (black) - NULL - NULL - -- END down from \[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/128].com. - NULL - NULL diff --git a/bin/tests/optional/rbt_test.txt b/bin/tests/optional/rbt_test.txt deleted file mode 100644 index 4821c34c0f..0000000000 --- a/bin/tests/optional/rbt_test.txt +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -add a.vix.com -add b.vix.com -add c.vix.com -print -add a.b.c.d.e.f.vix.com -add b.b.c.d.e.f.vix.com -add c.b.c.d.e.f.vix.com -print -add a.d.e.f.vix.com -add q.d.e.f.vix.com -add d.e.f.vix.com -print -add g.h.vix.com -print -search q.d.e.f.vix.com -search just-parent.a.vix.com -search no-real-parent.vix.com -search does.not.exist.at.all -forward -backward -# existing name -check vix.com. -# greater than stop node, which has down pointer -check zzz.com. -# less than lowest in level (would be left link from stop node) -check 0.vix.com -# greater than stop node, no down pointer -check d.vix.com -# superdomain stored in existing node -check f.vix.com -# common ancestor stored in existing node; existing is successor -check a.e.f.vix.com -# common ancestor stored in existing node; existing is less but not predecessor -check z.e.f.vix.com -# -check g.vix.com -# -check i.vix.com -# -check b.c.vix.com -nuke d.e.f.vix.com -print -add x.a.vix.com -add y.x.a.vix.com -print -delete a.vix.com -delete x.a.vix.com -print -delete b.vix.com -delete c.vix.com -print -delete y.x.a.vix.com -print -delete g.h.vix.com. -add \[b100000].vix.com. -add \[b010000].vix.com. -add \[b001000].vix.com. -add \[b000100].vix.com. -add \[b000010].vix.com. -add \[b000001].vix.com. -p -search \[b000100].vix.com. -# zap the entire tree -add vix.com. -nuke vix.com. -add a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. -add b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w. -print -add . -# zap it again -nuke . -# test splitting of maximal bitstring -add \[xFFFF/16].\[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/256].com -add \[xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF/128].com -print -quit diff --git a/bin/tests/optional/rwlock_test.c b/bin/tests/optional/rwlock_test.c deleted file mode 100644 index 587f025ae5..0000000000 --- a/bin/tests/optional/rwlock_test.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#define sleep(x) Sleep(1000 * x) -#endif /* ifdef WIN32 */ - -isc_rwlock_t lock; - -static isc_threadresult_t -#ifdef WIN32 - WINAPI -#endif /* ifdef WIN32 */ - run1(void *arg) { - char *message = arg; - - RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) == - ISC_R_SUCCESS); - printf("%s got READ lock\n", message); - sleep(1); - printf("%s giving up READ lock\n", message); - RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) == - ISC_R_SUCCESS); - printf("%s got READ lock\n", message); - sleep(1); - printf("%s giving up READ lock\n", message); - RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_write) == - ISC_R_SUCCESS); - printf("%s got WRITE lock\n", message); - sleep(1); - printf("%s giving up WRITE lock\n", message); - RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_write) == - ISC_R_SUCCESS); - return ((isc_threadresult_t)0); -} - -static isc_threadresult_t -#ifdef WIN32 - WINAPI -#endif /* ifdef WIN32 */ - run2(void *arg) { - char *message = arg; - - RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_write) == - ISC_R_SUCCESS); - printf("%s got WRITE lock\n", message); - sleep(1); - printf("%s giving up WRITE lock\n", message); - RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_write) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_write) == - ISC_R_SUCCESS); - printf("%s got WRITE lock\n", message); - sleep(1); - printf("%s giving up WRITE lock\n", message); - RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_write) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_rwlock_lock(&lock, isc_rwlocktype_read) == - ISC_R_SUCCESS); - printf("%s got READ lock\n", message); - sleep(1); - printf("%s giving up READ lock\n", message); - RUNTIME_CHECK(isc_rwlock_unlock(&lock, isc_rwlocktype_read) == - ISC_R_SUCCESS); - return ((isc_threadresult_t)0); -} - -int -main(int argc, char *argv[]) { - unsigned int nworkers; - unsigned int i; - isc_thread_t workers[100]; - char name[100]; - void *dupname; - - if (argc > 1) { - nworkers = atoi(argv[1]); - } else { - nworkers = 2; - } - if (nworkers > 100) { - nworkers = 100; - } - printf("%u workers\n", nworkers); - - RUNTIME_CHECK(isc_rwlock_init(&lock, 5, 10) == ISC_R_SUCCESS); - - for (i = 0; i < nworkers; i++) { - snprintf(name, sizeof(name), "%02u", i); - dupname = strdup(name); - RUNTIME_CHECK(dupname != NULL); - if (i != 0 && i % 3 == 0) { - isc_thread_create(run1, dupname, &workers[i]); - } else { - isc_thread_create(run2, dupname, &workers[i]); - } - } - - for (i = 0; i < nworkers; i++) { - isc_thread_join(workers[i], NULL); - } - - isc_rwlock_destroy(&lock); - - return (0); -} diff --git a/bin/tests/optional/serial_test.c b/bin/tests/optional/serial_test.c deleted file mode 100644 index bd901fdd86..0000000000 --- a/bin/tests/optional/serial_test.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include - -int -main() { - uint32_t a, b; - char buf[1024]; - char *s, *e; - - while (fgets(buf, sizeof(buf), stdin) != NULL) { - buf[sizeof(buf) - 1] = '\0'; - s = buf; - a = strtoul(s, &e, 0); - if (s == e) { - continue; - } - s = e; - b = strtoul(s, &e, 0); - if (s == e) { - continue; - } - fprintf(stdout, "%u %u gt:%d lt:%d ge:%d le:%d eq:%d ne:%d\n", - a, b, isc_serial_gt(a, b), isc_serial_lt(a, b), - isc_serial_ge(a, b), isc_serial_le(a, b), - isc_serial_eq(a, b), isc_serial_ne(a, b)); - } - return (0); -} diff --git a/bin/tests/optional/shutdown_test.c b/bin/tests/optional/shutdown_test.c deleted file mode 100644 index 234b8867be..0000000000 --- a/bin/tests/optional/shutdown_test.c +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -typedef struct { - isc_mem_t *mctx; - isc_task_t *task; - isc_timer_t *timer; - unsigned int ticks; - char name[16]; - bool exiting; - isc_task_t *peer; -} t_info; - -#define MAX_TASKS 3 -#define T2_SHUTDOWNOK (ISC_EVENTCLASS(1024) + 0) -#define T2_SHUTDOWNDONE (ISC_EVENTCLASS(1024) + 1) -#define FOO_EVENT (ISC_EVENTCLASS(1024) + 2) - -static t_info tasks[MAX_TASKS]; -static unsigned int task_count; -static isc_taskmgr_t *task_manager; -static isc_timermgr_t *timer_manager; - -static void -t1_shutdown(isc_task_t *task, isc_event_t *event) { - t_info *info = event->ev_arg; - - printf("task %s (%p) t1_shutdown\n", info->name, task); - isc_task_detach(&info->task); - isc_event_free(&event); -} - -static void -t2_shutdown(isc_task_t *task, isc_event_t *event) { - t_info *info = event->ev_arg; - - printf("task %s (%p) t2_shutdown\n", info->name, task); - info->exiting = true; - isc_event_free(&event); -} - -static void -shutdown_action(isc_task_t *task, isc_event_t *event) { - t_info *info = event->ev_arg; - isc_event_t *nevent; - - INSIST(event->ev_type == ISC_TASKEVENT_SHUTDOWN); - - printf("task %s (%p) shutdown\n", info->name, task); - if (strcmp(info->name, "0") == 0) { - isc_timer_detach(&info->timer); - nevent = isc_event_allocate(info->mctx, info, T2_SHUTDOWNOK, - t2_shutdown, &tasks[1], - sizeof(*event)); - RUNTIME_CHECK(nevent != NULL); - info->exiting = true; - isc_task_sendanddetach(&info->peer, &nevent); - } - isc_event_free(&event); -} - -static void -foo_event(isc_task_t *task, isc_event_t *event) { - printf("task(%p) foo\n", task); - isc_event_free(&event); -} - -static void -tick(isc_task_t *task, isc_event_t *event) { - t_info *info = event->ev_arg; - isc_event_t *nevent; - - INSIST(event->ev_type == ISC_TIMEREVENT_TICK); - - printf("task %s (%p) tick\n", info->name, task); - - info->ticks++; - if (strcmp(info->name, "1") == 0) { - if (info->ticks == 10) { - isc_app_shutdown(); - } else if (info->ticks >= 15 && info->exiting) { - isc_timer_detach(&info->timer); - isc_task_detach(&info->task); - nevent = isc_event_allocate( - info->mctx, info, T2_SHUTDOWNDONE, t1_shutdown, - &tasks[0], sizeof(*event)); - RUNTIME_CHECK(nevent != NULL); - isc_task_send(info->peer, &nevent); - isc_task_detach(&info->peer); - } - } else if (strcmp(info->name, "foo") == 0) { - isc_timer_detach(&info->timer); - nevent = isc_event_allocate(info->mctx, info, FOO_EVENT, - foo_event, task, sizeof(*event)); - RUNTIME_CHECK(nevent != NULL); - isc_task_sendanddetach(&task, &nevent); - } - - isc_event_free(&event); -} - -static t_info * -new_task(isc_mem_t *mctx, const char *name) { - t_info *ti; - isc_time_t expires; - isc_interval_t interval; - - RUNTIME_CHECK(task_count < MAX_TASKS); - ti = &tasks[task_count]; - ti->mctx = mctx; - ti->task = NULL; - ti->timer = NULL; - ti->ticks = 0; - if (name != NULL) { - INSIST(strlen(name) < sizeof(ti->name)); - strlcpy(ti->name, name, sizeof(ti->name)); - } else { - snprintf(ti->name, sizeof(ti->name), "%u", task_count); - } - RUNTIME_CHECK(isc_task_create(task_manager, 0, &ti->task) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(ti->task, shutdown_action, ti) == - ISC_R_SUCCESS); - - isc_time_settoepoch(&expires); - isc_interval_set(&interval, 1, 0); - RUNTIME_CHECK(isc_timer_create(timer_manager, isc_timertype_ticker, - &expires, &interval, ti->task, tick, ti, - &ti->timer) == ISC_R_SUCCESS); - - task_count++; - - return (ti); -} - -int -main(int argc, char *argv[]) { - unsigned int workers; - t_info *t1, *t2; - isc_task_t *task; - isc_mem_t *mctx, *mctx2; - - RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS); - - if (argc > 1) { - workers = atoi(argv[1]); - if (workers < 1) { - workers = 1; - } - if (workers > 8192) { - workers = 8192; - } - } else { - workers = 2; - } - printf("%u workers\n", workers); - - mctx = NULL; - isc_mem_create(&mctx); - mctx2 = NULL; - isc_mem_create(&mctx2); - RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, NULL, - &task_manager) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_timermgr_create(mctx, &timer_manager) == - ISC_R_SUCCESS); - - t1 = new_task(mctx, NULL); - t2 = new_task(mctx2, NULL); - isc_task_attach(t2->task, &t1->peer); - isc_task_attach(t1->task, &t2->peer); - - /* - * Test run-triggered shutdown. - */ - (void)new_task(mctx2, "foo"); - - /* - * Test implicit shutdown. - */ - task = NULL; - RUNTIME_CHECK(isc_task_create(task_manager, 0, &task) == ISC_R_SUCCESS); - isc_task_detach(&task); - - /* - * Test anti-zombie code. - */ - RUNTIME_CHECK(isc_task_create(task_manager, 0, &task) == ISC_R_SUCCESS); - isc_task_detach(&task); - - RUNTIME_CHECK(isc_app_run() == ISC_R_SUCCESS); - - isc_taskmgr_destroy(&task_manager); - isc_timermgr_destroy(&timer_manager); - - printf("Statistics for mctx:\n"); - isc_mem_stats(mctx, stdout); - isc_mem_destroy(&mctx); - printf("Statistics for mctx2:\n"); - isc_mem_stats(mctx2, stdout); - isc_mem_destroy(&mctx2); - - isc_app_finish(); - - return (0); -} diff --git a/bin/tests/optional/sig0_test.c b/bin/tests/optional/sig0_test.c deleted file mode 100644 index 233fc5914d..0000000000 --- a/bin/tests/optional/sig0_test.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define CHECK(str, x) \ - { \ - if ((x) != ISC_R_SUCCESS) { \ - printf("%s: %s\n", (str), isc_result_totext(x)); \ - exit(-1); \ - } \ - } - -isc_mutex_t lock; -dst_key_t *key; -isc_mem_t *mctx; -unsigned char qdata[1024], rdata[1024]; -isc_buffer_t qbuffer, rbuffer; -isc_taskmgr_t *taskmgr; -isc_task_t *task1; -isc_log_t *lctx = NULL; -isc_logconfig_t *logconfig = NULL; -isc_socket_t *s; -isc_sockaddr_t address; -char output[10 * 1024]; -isc_buffer_t outbuf; -static const dns_master_style_t *style = &dns_master_style_debug; - -static void -senddone(isc_task_t *task, isc_event_t *event) { - isc_socketevent_t *sevent = (isc_socketevent_t *)event; - - REQUIRE(sevent != NULL); - REQUIRE(sevent->ev_type == ISC_SOCKEVENT_SENDDONE); - REQUIRE(task == task1); - - printf("senddone\n"); - - isc_event_free(&event); -} - -static void -recvdone(isc_task_t *task, isc_event_t *event) { - isc_socketevent_t *sevent = (isc_socketevent_t *)event; - isc_buffer_t source; - isc_result_t result; - dns_message_t *response; - - REQUIRE(sevent != NULL); - REQUIRE(sevent->ev_type == ISC_SOCKEVENT_RECVDONE); - REQUIRE(task == task1); - - printf("recvdone\n"); - if (sevent->result != ISC_R_SUCCESS) { - printf("failed\n"); - exit(-1); - } - - isc_buffer_init(&source, sevent->region.base, sevent->region.length); - isc_buffer_add(&source, sevent->n); - - response = NULL; - result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &response); - CHECK("dns_message_create", result); - result = dns_message_parse(response, &source, 0); - CHECK("dns_message_parse", result); - - isc_buffer_init(&outbuf, output, sizeof(output)); - result = dns_message_totext(response, style, 0, &outbuf); - CHECK("dns_message_totext", result); - printf("%.*s\n", (int)isc_buffer_usedlength(&outbuf), - (char *)isc_buffer_base(&outbuf)); - - dns_message_destroy(&response); - isc_event_free(&event); - - isc_app_shutdown(); -} - -static void -buildquery(void) { - isc_result_t result; - dns_rdataset_t *question = NULL; - dns_name_t *qname = NULL; - isc_region_t r, inr; - dns_message_t *query; - char nametext[] = "host.example"; - isc_buffer_t namesrc, namedst; - unsigned char namedata[256]; - isc_sockaddr_t sa; - dns_compress_t cctx; - - query = NULL; - result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &query); - CHECK("dns_message_create", result); - result = dns_message_setsig0key(query, key); - CHECK("dns_message_setsig0key", result); - - result = dns_message_gettemprdataset(query, &question); - CHECK("dns_message_gettemprdataset", result); - dns_rdataset_makequestion(question, dns_rdataclass_in, dns_rdatatype_a); - result = dns_message_gettempname(query, &qname); - CHECK("dns_message_gettempname", result); - isc_buffer_init(&namesrc, nametext, strlen(nametext)); - isc_buffer_add(&namesrc, strlen(nametext)); - isc_buffer_init(&namedst, namedata, sizeof(namedata)); - dns_name_init(qname, NULL); - result = dns_name_fromtext(qname, &namesrc, dns_rootname, 0, &namedst); - CHECK("dns_name_fromtext", result); - ISC_LIST_APPEND(qname->list, question, link); - dns_message_addname(query, qname, DNS_SECTION_QUESTION); - - isc_buffer_init(&qbuffer, qdata, sizeof(qdata)); - - result = dns_compress_init(&cctx, -1, mctx); - CHECK("dns_compress_init", result); - result = dns_message_renderbegin(query, &cctx, &qbuffer); - CHECK("dns_message_renderbegin", result); - result = dns_message_rendersection(query, DNS_SECTION_QUESTION, 0); - CHECK("dns_message_rendersection(question)", result); - result = dns_message_rendersection(query, DNS_SECTION_ANSWER, 0); - CHECK("dns_message_rendersection(answer)", result); - result = dns_message_rendersection(query, DNS_SECTION_AUTHORITY, 0); - CHECK("dns_message_rendersection(auth)", result); - result = dns_message_rendersection(query, DNS_SECTION_ADDITIONAL, 0); - CHECK("dns_message_rendersection(add)", result); - result = dns_message_renderend(query); - CHECK("dns_message_renderend", result); - dns_compress_invalidate(&cctx); - - isc_buffer_init(&outbuf, output, sizeof(output)); - result = dns_message_totext(query, style, 0, &outbuf); - CHECK("dns_message_totext", result); - printf("%.*s\n", (int)isc_buffer_usedlength(&outbuf), - (char *)isc_buffer_base(&outbuf)); - - isc_buffer_usedregion(&qbuffer, &r); - isc_sockaddr_any(&sa); - result = isc_socket_bind(s, &sa, 0); - CHECK("isc_socket_bind", result); - result = isc_socket_sendto(s, &r, task1, senddone, NULL, &address, - NULL); - CHECK("isc_socket_sendto", result); - - inr.base = rdata; - inr.length = sizeof(rdata); - result = isc_socket_recv(s, &inr, 1, task1, recvdone, NULL); - CHECK("isc_socket_recv", result); - dns_message_destroy(&query); -} - -int -main(int argc, char *argv[]) { - bool verbose = false; - isc_socketmgr_t *socketmgr; - isc_timermgr_t *timermgr; - struct in_addr inaddr; - dns_fixedname_t fname; - dns_name_t *name; - isc_buffer_t b; - int ch; - isc_result_t result; - in_port_t port = 53; - - RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS); - - isc_mutex_init(&lock); - - mctx = NULL; - isc_mem_create(&mctx); - - while ((ch = isc_commandline_parse(argc, argv, "vp:")) != -1) { - switch (ch) { - case 'v': - verbose = true; - break; - case 'p': - port = (unsigned int)atoi(isc_commandline_argument); - break; - } - } - - RUNTIME_CHECK(dst_lib_init(mctx, NULL) == ISC_R_SUCCESS); - - dns_result_register(); - dst_result_register(); - - taskmgr = NULL; - RUNTIME_CHECK(isc_taskmgr_create(mctx, 2, 0, NULL, &taskmgr) == - ISC_R_SUCCESS); - task1 = NULL; - RUNTIME_CHECK(isc_task_create(taskmgr, 0, &task1) == ISC_R_SUCCESS); - - timermgr = NULL; - RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == ISC_R_SUCCESS); - socketmgr = NULL; - RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS); - - isc_log_create(mctx, &lctx, &logconfig); - - s = NULL; - RUNTIME_CHECK(isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, - &s) == ISC_R_SUCCESS); - - inaddr.s_addr = htonl(INADDR_LOOPBACK); - isc_sockaddr_fromin(&address, &inaddr, port); - - name = dns_fixedname_initname(&fname); - isc_buffer_constinit(&b, "child.example.", strlen("child.example.")); - isc_buffer_add(&b, strlen("child.example.")); - result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL); - CHECK("dns_name_fromtext", result); - - key = NULL; - result = dst_key_fromfile(name, 33180, DNS_KEYALG_RSASHA1, - DST_TYPE_PUBLIC | DST_TYPE_PRIVATE, NULL, - mctx, &key); - CHECK("dst_key_fromfile", result); - - buildquery(); - - (void)isc_app_run(); - - isc_task_shutdown(task1); - isc_task_detach(&task1); - isc_taskmgr_destroy(&taskmgr); - - isc_socket_detach(&s); - isc_socketmgr_destroy(&socketmgr); - isc_timermgr_destroy(&timermgr); - - dst_key_free(&key); - - dst_lib_destroy(); - - isc_log_destroy(&lctx); - - if (verbose) { - isc_mem_stats(mctx, stdout); - } - isc_mem_destroy(&mctx); - - isc_mutex_destroy(&lock); - - isc_app_finish(); - - return (0); -} diff --git a/bin/tests/optional/sock_test.c b/bin/tests/optional/sock_test.c deleted file mode 100644 index 4cdec293bd..0000000000 --- a/bin/tests/optional/sock_test.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -isc_mem_t *mctx; -isc_taskmgr_t *manager; - -static void -my_shutdown(isc_task_t *task, isc_event_t *event) { - char *name = event->ev_arg; - - printf("shutdown %s (%p)\n", name, task); - fflush(stdout); - isc_event_free(&event); -} - -static void -my_send(isc_task_t *task, isc_event_t *event) { - isc_socket_t *sock; - isc_socketevent_t *dev; - - sock = event->ev_sender; - dev = (isc_socketevent_t *)event; - - printf("my_send: %s task %p\n\t(sock %p, base %p, length %u, n %u, " - "result %u)\n", - (char *)(event->ev_arg), task, sock, dev->region.base, - dev->region.length, dev->n, dev->result); - - if (dev->result != ISC_R_SUCCESS) { - isc_socket_detach(&sock); - isc_task_shutdown(task); - } - - if (dev->region.base != NULL) { - isc_mem_put(mctx, dev->region.base, dev->region.length); - } - - isc_event_free(&event); -} - -static void -my_recv(isc_task_t *task, isc_event_t *event) { - isc_socket_t *sock; - isc_socketevent_t *dev; - isc_region_t region; - char buf[1024]; - char host[256]; - - sock = event->ev_sender; - dev = (isc_socketevent_t *)event; - - printf("Socket %s (sock %p, base %p, length %u, n %u, result %u)\n", - (char *)(event->ev_arg), sock, dev->region.base, - dev->region.length, dev->n, dev->result); - if (dev->address.type.sa.sa_family == AF_INET6) { - inet_ntop(AF_INET6, &dev->address.type.sin6.sin6_addr, host, - sizeof(host)); - printf("\tFrom: %s port %d\n", host, - ntohs(dev->address.type.sin6.sin6_port)); - } else { - inet_ntop(AF_INET, &dev->address.type.sin.sin_addr, host, - sizeof(host)); - printf("\tFrom: %s port %d\n", host, - ntohs(dev->address.type.sin.sin_port)); - } - - if (dev->result != ISC_R_SUCCESS) { - isc_socket_detach(&sock); - - if (dev->region.base != NULL) { - isc_mem_put(mctx, dev->region.base, dev->region.length); - } - isc_event_free(&event); - - isc_task_shutdown(task); - return; - } - - /* - * Echo the data back. - */ - if (strcmp(event->ev_arg, "so2") != 0) { - region = dev->region; - snprintf(buf, sizeof(buf), "\r\nReceived: %.*s\r\n\r\n", - (int)dev->n, (char *)region.base); - region.base = isc_mem_get(mctx, strlen(buf) + 1); - { - region.length = strlen(buf) + 1; - strlcpy((char *)region.base, buf, region.length); - } - isc_socket_send(sock, ®ion, task, my_send, event->ev_arg); - } else { - region = dev->region; - printf("\r\nReceived: %.*s\r\n\r\n", (int)dev->n, - (char *)region.base); - } - - isc_socket_recv(sock, &dev->region, 1, task, my_recv, event->ev_arg); - - isc_event_free(&event); -} - -static void -my_http_get(isc_task_t *task, isc_event_t *event) { - isc_socket_t *sock; - isc_socketevent_t *dev; - - sock = event->ev_sender; - dev = (isc_socketevent_t *)event; - - printf("my_http_get: %s task %p\n\t(sock %p, base %p, length %u, " - "n %u, result %u)\n", - (char *)(event->ev_arg), task, sock, dev->region.base, - dev->region.length, dev->n, dev->result); - - if (dev->result != ISC_R_SUCCESS) { - isc_socket_detach(&sock); - isc_task_shutdown(task); - if (dev->region.base != NULL) { - isc_mem_put(mctx, dev->region.base, dev->region.length); - } - isc_event_free(&event); - return; - } - - isc_socket_recv(sock, &dev->region, 1, task, my_recv, event->ev_arg); - - isc_event_free(&event); -} - -static void -my_connect(isc_task_t *task, isc_event_t *event) { - isc_socket_t *sock; - isc_socket_connev_t *dev; - isc_region_t region; - char buf[1024]; - - sock = event->ev_sender; - dev = (isc_socket_connev_t *)event; - - printf("%s: Connection result: %u\n", (char *)(event->ev_arg), - dev->result); - - if (dev->result != ISC_R_SUCCESS) { - isc_socket_detach(&sock); - isc_event_free(&event); - isc_task_shutdown(task); - return; - } - - /* - * Send a GET string, and set up to receive (and just display) - * the result. - */ - snprintf(buf, sizeof(buf), - "GET / HTTP/1.1\r\nHost: www.flame.org\r\n" - "Connection: Close\r\n\r\n"); - region.base = isc_mem_get(mctx, strlen(buf) + 1); - { - region.length = strlen(buf) + 1; - strlcpy((char *)region.base, buf, region.length); - } - - isc_socket_send(sock, ®ion, task, my_http_get, event->ev_arg); - - isc_event_free(&event); -} - -static void -my_listen(isc_task_t *task, isc_event_t *event) { - char *name = event->ev_arg; - isc_socket_newconnev_t *dev; - isc_region_t region; - isc_socket_t *oldsock; - isc_task_t *newtask; - - dev = (isc_socket_newconnev_t *)event; - - printf("newcon %s (task %p, oldsock %p, newsock %p, result %u)\n", name, - task, event->ev_sender, dev->newsocket, dev->result); - fflush(stdout); - - if (dev->result == ISC_R_SUCCESS) { - /* - * Queue another listen on this socket. - */ - RUNTIME_CHECK(isc_socket_accept(event->ev_sender, task, - my_listen, event->ev_arg) == - ISC_R_SUCCESS); - - region.base = isc_mem_get(mctx, 20); - region.length = 20; - - /* - * Create a new task for this socket, and queue up a - * recv on it. - */ - newtask = NULL; - RUNTIME_CHECK(isc_task_create(manager, 0, &newtask) == - ISC_R_SUCCESS); - isc_socket_recv(dev->newsocket, ®ion, 1, newtask, my_recv, - event->ev_arg); - isc_task_detach(&newtask); - } else { - printf("detaching from socket %p\n", event->ev_sender); - oldsock = event->ev_sender; - - isc_socket_detach(&oldsock); - - isc_event_free(&event); - isc_task_shutdown(task); - return; - } - - isc_event_free(&event); -} - -static void -timeout(isc_task_t *task, isc_event_t *event) { - isc_socket_t *sock = event->ev_arg; - - printf("Timeout, canceling IO on socket %p (task %p)\n", sock, task); - - isc_socket_cancel(sock, NULL, ISC_SOCKCANCEL_ALL); - isc_timer_detach((isc_timer_t **)&event->ev_sender); - isc_event_free(&event); -} - -static char one[] = "1"; -static char two[] = "2"; -static char xso1[] = "so1"; -static char xso2[] = "so2"; - -int -main(int argc, char *argv[]) { - isc_task_t *t1, *t2; - isc_timermgr_t *timgr; - isc_time_t expires; - isc_interval_t interval; - isc_timer_t *ti1; - unsigned int workers; - isc_socketmgr_t *socketmgr; - isc_socket_t *so1, *so2; - isc_sockaddr_t sockaddr; - struct in_addr ina; - struct in6_addr in6a; - isc_result_t result; - int pf; - - if (argc > 1) { - workers = atoi(argv[1]); - if (workers < 1) { - workers = 1; - } - if (workers > 8192) { - workers = 8192; - } - } else { - workers = 2; - } - printf("%u workers\n", workers); - - if (isc_net_probeipv6() == ISC_R_SUCCESS) { - pf = PF_INET6; - } else { - pf = PF_INET; - } - - /* - * EVERYTHING needs a memory context. - */ - mctx = NULL; - isc_mem_create(&mctx); - - /* - * The task manager is independent (other than memory context) - */ - manager = NULL; - RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, NULL, &manager) == - ISC_R_SUCCESS); - - /* - * Timer manager depends only on the memory context as well. - */ - timgr = NULL; - RUNTIME_CHECK(isc_timermgr_create(mctx, &timgr) == ISC_R_SUCCESS); - - t1 = NULL; - RUNTIME_CHECK(isc_task_create(manager, 0, &t1) == ISC_R_SUCCESS); - t2 = NULL; - RUNTIME_CHECK(isc_task_create(manager, 0, &t2) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t1, my_shutdown, one) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t2, my_shutdown, two) == - ISC_R_SUCCESS); - - printf("task 1 = %p\n", t1); - printf("task 2 = %p\n", t2); - - socketmgr = NULL; - RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS); - - /* - * Open up a listener socket. - */ - so1 = NULL; - - if (pf == PF_INET6) { - in6a = in6addr_any; - isc_sockaddr_fromin6(&sockaddr, &in6a, 5544); - } else { - ina.s_addr = INADDR_ANY; - isc_sockaddr_fromin(&sockaddr, &ina, 5544); - } - RUNTIME_CHECK(isc_socket_create(socketmgr, pf, isc_sockettype_tcp, - &so1) == ISC_R_SUCCESS); - result = isc_socket_bind(so1, &sockaddr, ISC_SOCKET_REUSEADDRESS); - RUNTIME_CHECK(result == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_socket_listen(so1, 0) == ISC_R_SUCCESS); - - /* - * Queue up the first accept event. - */ - RUNTIME_CHECK(isc_socket_accept(so1, t1, my_listen, xso1) == - ISC_R_SUCCESS); - isc_time_settoepoch(&expires); - isc_interval_set(&interval, 10, 0); - ti1 = NULL; - RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_once, &expires, - &interval, t1, timeout, so1, - &ti1) == ISC_R_SUCCESS); - - /* - * Open up a socket that will connect to www.flame.org, port 80. - * Why not. :) - */ - so2 = NULL; - ina.s_addr = inet_addr("204.152.184.97"); - if (0 && pf == PF_INET6) { - isc_sockaddr_v6fromin(&sockaddr, &ina, 80); - } else { - isc_sockaddr_fromin(&sockaddr, &ina, 80); - } - RUNTIME_CHECK(isc_socket_create(socketmgr, isc_sockaddr_pf(&sockaddr), - isc_sockettype_tcp, - &so2) == ISC_R_SUCCESS); - - RUNTIME_CHECK(isc_socket_connect(so2, &sockaddr, t2, my_connect, - xso2) == ISC_R_SUCCESS); - - /* - * Detaching these is safe, since the socket will attach to the - * task for any outstanding requests. - */ - isc_task_detach(&t1); - isc_task_detach(&t2); - - /* - * Wait a short while. - */ -#ifndef WIN32 - sleep(10); -#else /* ifndef WIN32 */ - Sleep(10000); -#endif /* ifndef WIN32 */ - - fprintf(stderr, "Destroying socket manager\n"); - isc_socketmgr_destroy(&socketmgr); - - fprintf(stderr, "Destroying timer manager\n"); - isc_timermgr_destroy(&timgr); - - fprintf(stderr, "Destroying task manager\n"); - isc_taskmgr_destroy(&manager); - - isc_mem_stats(mctx, stdout); - isc_mem_destroy(&mctx); - - return (0); -} diff --git a/bin/tests/optional/sym_test.c b/bin/tests/optional/sym_test.c deleted file mode 100644 index 3221892907..0000000000 --- a/bin/tests/optional/sym_test.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include -#include -#include - -isc_mem_t *mctx; -isc_symtab_t *st; - -static void -undefine_action(char *key, unsigned int type, isc_symvalue_t value, void *arg) { - UNUSED(arg); - - INSIST(type == 1); - isc_mem_free(mctx, key); - isc_mem_free(mctx, value.as_pointer); -} - -int -main(int argc, char *argv[]) { - char s[1000], *cp, *key; - size_t len; - isc_result_t result; - isc_symvalue_t value; - int trace = 0; - int c; - isc_symexists_t exists_policy = isc_symexists_reject; - bool case_sensitive = false; - - while ((c = isc_commandline_parse(argc, argv, "tarc")) != -1) { - switch (c) { - case 't': - trace = 1; - break; - case 'a': - exists_policy = isc_symexists_add; - break; - case 'r': - exists_policy = isc_symexists_replace; - break; - case 'c': - case_sensitive = true; - break; - } - } - - isc_mem_create(&mctx); - RUNTIME_CHECK(isc_symtab_create(mctx, 691, undefine_action, NULL, - case_sensitive, &st) == ISC_R_SUCCESS); - - while (fgets(s, sizeof(s), stdin) != NULL) { - len = strlen(s); - if (len > 0U && s[len - 1] == '\n') { - s[len - 1] = '\0'; - len--; - } - - cp = s; - - if (cp[0] == '!') { - cp++; - result = isc_symtab_undefine(st, cp, 1); - if (trace || result != ISC_R_SUCCESS) { - printf("undefine('%s'): %s\n", cp, - isc_result_totext(result)); - } - } else { - key = cp; - while (*cp != '\0' && *cp != ' ' && *cp != '\t') { - cp++; - } - if (*cp == '\0') { - result = isc_symtab_lookup(st, key, 0, &value); - if (trace || result != ISC_R_SUCCESS) { - printf("lookup('%s'): %s", key, - isc_result_totext(result)); - if (result == ISC_R_SUCCESS) { - cp = value.as_pointer; - printf(", value == '%s'", cp); - } - printf("\n"); - } - } else { - *cp++ = '\0'; - key = isc_mem_strdup(mctx, key); - value.as_pointer = isc_mem_strdup(mctx, cp); - result = isc_symtab_define(st, key, 1, value, - exists_policy); - if (trace || result != ISC_R_SUCCESS) { - printf("define('%s', '%s'): %s\n", key, - cp, isc_result_totext(result)); - if (result != ISC_R_SUCCESS) { - undefine_action(key, 1, value, - NULL); - } - } - } - } - } - - isc_symtab_destroy(&st); - isc_mem_stats(mctx, stdout); - isc_mem_destroy(&mctx); - - return (0); -} diff --git a/bin/tests/optional/task_test.c b/bin/tests/optional/task_test.c deleted file mode 100644 index 68adfbb497..0000000000 --- a/bin/tests/optional/task_test.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include - -isc_mem_t *mctx = NULL; - -static void -my_callback(isc_task_t *task, isc_event_t *event) { - int i, j; - char *name = event->ev_arg; - - j = 0; - for (i = 0; i < 1000000; i++) { - j += 100; - } - printf("task %s (%p): %d\n", name, task, j); - isc_event_free(&event); -} - -static void -my_shutdown(isc_task_t *task, isc_event_t *event) { - char *name = event->ev_arg; - - printf("shutdown %s (%p)\n", name, task); - isc_event_free(&event); -} - -static void -my_tick(isc_task_t *task, isc_event_t *event) { - char *name = event->ev_arg; - - printf("task %p tick %s\n", task, name); - isc_event_free(&event); -} - -static char one[] = "1"; -static char two[] = "2"; -static char three[] = "3"; -static char four[] = "4"; -static char foo[] = "foo"; -static char bar[] = "bar"; - -int -main(int argc, char *argv[]) { - isc_taskmgr_t *manager = NULL; - isc_task_t *t1 = NULL, *t2 = NULL; - isc_task_t *t3 = NULL, *t4 = NULL; - isc_event_t *event; - unsigned int workers; - isc_timermgr_t *timgr; - isc_timer_t *ti1, *ti2; - struct isc_interval interval; - - if (argc > 1) { - workers = atoi(argv[1]); - if (workers < 1) { - workers = 1; - } - if (workers > 8192) { - workers = 8192; - } - } else { - workers = 2; - } - printf("%u workers\n", workers); - - isc_mem_create(&mctx); - - RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, NULL, &manager) == - ISC_R_SUCCESS); - - RUNTIME_CHECK(isc_task_create(manager, 0, &t1) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_create(manager, 0, &t2) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_create(manager, 0, &t3) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_create(manager, 0, &t4) == ISC_R_SUCCESS); - - RUNTIME_CHECK(isc_task_onshutdown(t1, my_shutdown, one) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t2, my_shutdown, two) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t3, my_shutdown, three) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t4, my_shutdown, four) == - ISC_R_SUCCESS); - - timgr = NULL; - RUNTIME_CHECK(isc_timermgr_create(mctx, &timgr) == ISC_R_SUCCESS); - ti1 = NULL; - - isc_interval_set(&interval, 1, 0); - RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_ticker, NULL, - &interval, t1, my_tick, foo, - &ti1) == ISC_R_SUCCESS); - - ti2 = NULL; - isc_interval_set(&interval, 1, 0); - RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_ticker, NULL, - &interval, t2, my_tick, bar, - &ti2) == ISC_R_SUCCESS); - - printf("task 1 = %p\n", t1); - printf("task 2 = %p\n", t2); -#ifndef WIN32 - sleep(2); -#else /* ifndef WIN32 */ - Sleep(2000); -#endif /* ifndef WIN32 */ - - /* - * Note: (void *)1 is used as a sender here, since some compilers - * don't like casting a function pointer to a (void *). - * - * In a real use, it is more likely the sender would be a - * structure (socket, timer, task, etc) but this is just a test - * program. - */ - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one, - sizeof(*event)); - isc_task_send(t1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, two, - sizeof(*event)); - isc_task_send(t2, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, three, - sizeof(*event)); - isc_task_send(t3, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, four, - sizeof(*event)); - isc_task_send(t4, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, two, - sizeof(*event)); - isc_task_send(t2, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, three, - sizeof(*event)); - isc_task_send(t3, &event); - event = isc_event_allocate(mctx, (void *)1, 1, my_callback, four, - sizeof(*event)); - isc_task_send(t4, &event); - isc_task_purgerange(t3, NULL, ISC_EVENTTYPE_FIRSTEVENT, - ISC_EVENTTYPE_LASTEVENT, NULL); - - isc_task_detach(&t1); - isc_task_detach(&t2); - isc_task_detach(&t3); - isc_task_detach(&t4); - -#ifndef WIN32 - sleep(10); -#else /* ifndef WIN32 */ - Sleep(10000); -#endif /* ifndef WIN32 */ - printf("destroy\n"); - isc_timer_detach(&ti1); - isc_timer_detach(&ti2); - isc_timermgr_destroy(&timgr); - isc_taskmgr_destroy(&manager); - printf("destroyed\n"); - - isc_mem_stats(mctx, stdout); - isc_mem_destroy(&mctx); - - return (0); -} diff --git a/bin/tests/optional/timer_test.c b/bin/tests/optional/timer_test.c deleted file mode 100644 index 39dc84093b..0000000000 --- a/bin/tests/optional/timer_test.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -isc_mem_t *mctx1, *mctx2, *mctx3; -isc_task_t *t1, *t2, *t3; -isc_timer_t *ti1, *ti2, *ti3; -int tick_count = 0; - -static void -shutdown_task(isc_task_t *task, isc_event_t *event) { - char *name = event->ev_arg; - - printf("task %p shutdown %s\n", task, name); - isc_event_free(&event); -} - -static void -tick(isc_task_t *task, isc_event_t *event) { - char *name = event->ev_arg; - - INSIST(event->ev_type == ISC_TIMEREVENT_TICK); - - printf("task %s (%p) tick\n", name, task); - - tick_count++; - if (ti3 != NULL && tick_count % 3 == 0) { - isc_timer_touch(ti3); - } - - if (ti3 != NULL && tick_count == 7) { - isc_time_t expires; - isc_interval_t interval; - - isc_interval_set(&interval, 5, 0); - (void)isc_time_nowplusinterval(&expires, &interval); - isc_interval_set(&interval, 4, 0); - printf("*** resetting ti3 ***\n"); - RUNTIME_CHECK(isc_timer_reset(ti3, isc_timertype_once, &expires, - &interval, - true) == ISC_R_SUCCESS); - } - - isc_event_free(&event); -} - -static void -timeout(isc_task_t *task, isc_event_t *event) { - char *name = event->ev_arg; - const char *type; - - INSIST(event->ev_type == ISC_TIMEREVENT_IDLE || - event->ev_type == ISC_TIMEREVENT_LIFE); - - if (event->ev_type == ISC_TIMEREVENT_IDLE) { - type = "idle"; - } else { - type = "life"; - } - printf("task %s (%p) %s timeout\n", name, task, type); - - if (strcmp(name, "3") == 0) { - printf("*** saving task 3 ***\n"); - isc_event_free(&event); - return; - } - - isc_event_free(&event); - isc_task_shutdown(task); -} - -static char one[] = "1"; -static char two[] = "2"; -static char three[] = "3"; - -int -main(int argc, char *argv[]) { - isc_taskmgr_t *manager = NULL; - isc_timermgr_t *timgr = NULL; - unsigned int workers; - isc_time_t expires, now; - isc_interval_t interval; - - if (argc > 1) { - workers = atoi(argv[1]); - if (workers < 1) { - workers = 1; - } - if (workers > 8192) { - workers = 8192; - } - } else { - workers = 2; - } - printf("%u workers\n", workers); - - isc_mem_create(&mctx1); - RUNTIME_CHECK(isc_taskmgr_create(mctx1, workers, 0, NULL, &manager) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_timermgr_create(mctx1, &timgr) == ISC_R_SUCCESS); - - RUNTIME_CHECK(isc_task_create(manager, 0, &t1) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_create(manager, 0, &t2) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_create(manager, 0, &t3) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t1, shutdown_task, one) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t2, shutdown_task, two) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_task_onshutdown(t3, shutdown_task, three) == - ISC_R_SUCCESS); - - printf("task 1: %p\n", t1); - printf("task 2: %p\n", t2); - printf("task 3: %p\n", t3); - - TIME_NOW(&now); - - isc_interval_set(&interval, 2, 0); - RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_once, NULL, - &interval, t2, timeout, two, - &ti2) == ISC_R_SUCCESS); - - isc_interval_set(&interval, 1, 0); - RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_ticker, NULL, - &interval, t1, tick, one, - &ti1) == ISC_R_SUCCESS); - - isc_interval_set(&interval, 10, 0); - RUNTIME_CHECK(isc_time_add(&now, &interval, &expires) == ISC_R_SUCCESS); - isc_interval_set(&interval, 2, 0); - RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_once, &expires, - &interval, t3, timeout, three, - &ti3) == ISC_R_SUCCESS); - - isc_task_detach(&t1); - isc_task_detach(&t2); - isc_task_detach(&t3); - -#ifndef WIN32 - sleep(15); -#else /* ifndef WIN32 */ - Sleep(15000); -#endif /* ifndef WIN32 */ - printf("destroy\n"); - isc_timer_detach(&ti1); - isc_timer_detach(&ti2); - isc_timer_detach(&ti3); -#ifndef WIN32 - sleep(2); -#else /* ifndef WIN32 */ - Sleep(2000); -#endif /* ifndef WIN32 */ - isc_timermgr_destroy(&timgr); - isc_taskmgr_destroy(&manager); - printf("destroyed\n"); - - printf("Statistics for mctx1:\n"); - isc_mem_stats(mctx1, stdout); - isc_mem_destroy(&mctx1); - - return (0); -} diff --git a/bin/tests/optional/zone_test.c b/bin/tests/optional/zone_test.c deleted file mode 100644 index e250aab941..0000000000 --- a/bin/tests/optional/zone_test.c +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -static int debug = 0; -static int quiet = 0; -static int stats = 0; -static isc_mem_t *mctx = NULL; -dns_zone_t *zone = NULL; -isc_taskmgr_t *taskmgr = NULL; -isc_timermgr_t *timermgr = NULL; -isc_socketmgr_t *socketmgr = NULL; -dns_zonemgr_t *zonemgr = NULL; -dns_zonetype_t zonetype = dns_zone_master; -isc_sockaddr_t addr; - -#define ERRRET(result, function) \ - do { \ - if (result != ISC_R_SUCCESS) { \ - fprintf(stderr, "%s() returned %s\n", function, \ - dns_result_totext(result)); \ - return; \ - } \ - } while (0) - -#define ERRCONT(result, function) \ - if (result != ISC_R_SUCCESS) { \ - fprintf(stderr, "%s() returned %s\n", function, \ - dns_result_totext(result)); \ - continue; \ - } else \ - (void)NULL - -static void -usage(void) { - fprintf(stderr, "usage: zone_test [-dqsSM] [-c class] [-f file] " - "zone\n"); - exit(1); -} - -static void -setup(const char *zonename, const char *filename, const char *classname) { - isc_result_t result; - dns_rdataclass_t rdclass; - isc_consttextregion_t region; - isc_buffer_t buffer; - dns_fixedname_t fixorigin; - dns_name_t *origin; - const char *rbt = "rbt"; - - if (debug) { - fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n", - zonename, filename, classname); - } - result = dns_zone_create(&zone, mctx); - ERRRET(result, "dns_zone_new"); - - dns_zone_settype(zone, zonetype); - - isc_buffer_constinit(&buffer, zonename, strlen(zonename)); - isc_buffer_add(&buffer, strlen(zonename)); - dns_fixedname_init(&fixorigin); - result = dns_name_fromtext(dns_fixedname_name(&fixorigin), &buffer, - dns_rootname, 0, NULL); - ERRRET(result, "dns_name_fromtext"); - origin = dns_fixedname_name(&fixorigin); - - result = dns_zone_setorigin(zone, origin); - ERRRET(result, "dns_zone_setorigin"); - - dns_zone_setdbtype(zone, 1, &rbt); - - result = dns_zone_setfile(zone, filename, dns_masterformat_text, - &dns_master_style_default); - ERRRET(result, "dns_zone_setfile"); - - region.base = classname; - region.length = strlen(classname); - result = dns_rdataclass_fromtext(&rdclass, - (isc_textregion_t *)(void *)®ion); - ERRRET(result, "dns_rdataclass_fromtext"); - - dns_zone_setclass(zone, rdclass); - - if (zonetype == dns_zone_slave) { - dns_zone_setmasters(zone, &addr, 1); - } - - result = dns_zone_load(zone, false); - ERRRET(result, "dns_zone_load"); - - result = dns_zonemgr_managezone(zonemgr, zone); - ERRRET(result, "dns_zonemgr_managezone"); -} - -static void -print_rdataset(dns_name_t *name, dns_rdataset_t *rdataset) { - isc_buffer_t text; - char t[1000]; - isc_result_t result; - isc_region_t r; - - isc_buffer_init(&text, t, sizeof(t)); - result = dns_rdataset_totext(rdataset, name, false, false, &text); - isc_buffer_usedregion(&text, &r); - if (result == ISC_R_SUCCESS) { - printf("%.*s", (int)r.length, (char *)r.base); - } else { - printf("%s\n", dns_result_totext(result)); - } -} - -static void -query(void) { - char buf[1024]; - dns_fixedname_t name; - dns_fixedname_t found; - dns_db_t *db; - isc_buffer_t buffer; - isc_result_t result; - dns_rdataset_t rdataset; - dns_rdataset_t sigset; - fd_set rfdset = { { 0 } }; - - db = NULL; - result = dns_zone_getdb(zone, &db); - if (result != ISC_R_SUCCESS) { - fprintf(stderr, "%s() returned %s\n", "dns_zone_getdb", - dns_result_totext(result)); - return; - } - - dns_fixedname_init(&found); - dns_rdataset_init(&rdataset); - dns_rdataset_init(&sigset); - - do { - char *s; - fprintf(stdout, "zone_test "); - fflush(stdout); - FD_ZERO(&rfdset); - FD_SET(0, &rfdset); - select(1, &rfdset, NULL, NULL, NULL); - if (fgets(buf, sizeof(buf), stdin) == NULL) { - fprintf(stdout, "\n"); - break; - } - buf[sizeof(buf) - 1] = '\0'; - - s = strchr(buf, '\n'); - if (s != NULL) { - *s = '\0'; - } - s = strchr(buf, '\r'); - if (s != NULL) { - *s = '\0'; - } - if (strcmp(buf, "dump") == 0) { - dns_zone_dumptostream(zone, stdout, - dns_masterformat_text, - &dns_master_style_default, 0); - continue; - } - if (strlen(buf) == 0U) { - continue; - } - dns_fixedname_init(&name); - isc_buffer_init(&buffer, buf, strlen(buf)); - isc_buffer_add(&buffer, strlen(buf)); - result = dns_name_fromtext(dns_fixedname_name(&name), &buffer, - dns_rootname, 0, NULL); - ERRCONT(result, "dns_name_fromtext"); - - result = dns_db_find(db, dns_fixedname_name(&name), - NULL /*version*/, dns_rdatatype_a, - 0 /*options*/, 0 /*time*/, NULL /*nodep*/, - dns_fixedname_name(&found), &rdataset, - &sigset); - fprintf(stderr, "%s() returned %s\n", "dns_db_find", - dns_result_totext(result)); - switch (result) { - case DNS_R_DELEGATION: - print_rdataset(dns_fixedname_name(&found), &rdataset); - break; - case ISC_R_SUCCESS: - print_rdataset(dns_fixedname_name(&name), &rdataset); - break; - default: - break; - } - - if (dns_rdataset_isassociated(&rdataset)) { - dns_rdataset_disassociate(&rdataset); - } - if (dns_rdataset_isassociated(&sigset)) { - dns_rdataset_disassociate(&sigset); - } - } while (1); - dns_rdataset_invalidate(&rdataset); - dns_db_detach(&db); -} - -int -main(int argc, char **argv) { - int c; - char *filename = NULL; - const char *classname = "IN"; - - while ((c = isc_commandline_parse(argc, argv, "cdf:m:qsMS")) != EOF) { - switch (c) { - case 'c': - classname = isc_commandline_argument; - break; - case 'd': - debug++; - break; - case 'f': - if (filename != NULL) { - usage(); - } - filename = isc_commandline_argument; - break; - case 'm': - memset(&addr, 0, sizeof(addr)); - addr.type.sin.sin_family = AF_INET; - if (inet_pton(AF_INET, isc_commandline_argument, - &addr.type.sin.sin_addr) != 1) { - fprintf(stderr, "bad master address '%s'\n", - isc_commandline_argument); - exit(1); - } - addr.type.sin.sin_port = htons(53); - break; - case 'q': - quiet++; - break; - case 's': - stats++; - break; - case 'S': - zonetype = dns_zone_slave; - break; - case 'M': - zonetype = dns_zone_master; - break; - default: - usage(); - } - } - - if (argv[isc_commandline_index] == NULL) { - usage(); - } - - RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS); - isc_mem_create(&mctx); - RUNTIME_CHECK(isc_taskmgr_create(mctx, 2, 0, NULL, &taskmgr) == - ISC_R_SUCCESS); - RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == ISC_R_SUCCESS); - RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS); - RUNTIME_CHECK(dns_zonemgr_create(mctx, taskmgr, timermgr, socketmgr, - &zonemgr) == ISC_R_SUCCESS); - if (filename == NULL) { - filename = argv[isc_commandline_index]; - } - setup(argv[isc_commandline_index], filename, classname); - query(); - if (zone != NULL) { - dns_zone_detach(&zone); - } - dns_zonemgr_shutdown(zonemgr); - dns_zonemgr_detach(&zonemgr); - isc_socketmgr_destroy(&socketmgr); - isc_taskmgr_destroy(&taskmgr); - isc_timermgr_destroy(&timermgr); - if (!quiet && stats) { - isc_mem_stats(mctx, stdout); - } - isc_mem_destroy(&mctx); - - return (0); -} diff --git a/bin/tests/pkcs11/.gitignore b/bin/tests/pkcs11/.gitignore deleted file mode 100644 index a259902b21..0000000000 --- a/bin/tests/pkcs11/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -create -find -genrsa -login -privrsa -pubrsa -random -session -sha1 -sign -verify -pkcs11-hmacmd5 -pkcs11-md5sum diff --git a/bin/tests/pkcs11/README b/bin/tests/pkcs11/README deleted file mode 100644 index 2b594d9a7d..0000000000 --- a/bin/tests/pkcs11/README +++ /dev/null @@ -1,15 +0,0 @@ -"pkcs11-hmacmd5" is here to check for the presence of a known bug in -the Thales nCipher PKCS#11 provider library. To test for the bug, use -pkcs11-hmacmd5 to hash a test vector from RFC 2104, and determine -whether the resulting digest is is correct. For instance: - - echo -n "Hi There" | \ - ./pkcs11-hmacmd5 -p -k '0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b' - -...must return "9294727a3638bb1c13f48ef8158bfc9d". - -If any other value is returned, then the provider library is buggy, -and theflag PK11_MD5_HMAC_REPLACE must be defined in -lib/isc/include/pk11/site.h -However, if the correct value is returned, then it is safe to turn -off PK11_MD5_HMAC_REPLACE. (It is on by default.) diff --git a/bin/tests/pkcs11/benchmarks/.gitignore b/bin/tests/pkcs11/benchmarks/.gitignore deleted file mode 100644 index 08c0a263bc..0000000000 --- a/bin/tests/pkcs11/benchmarks/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.dSYM/ diff --git a/bin/tests/pkcs11/benchmarks/create.c b/bin/tests/pkcs11/benchmarks/create.c deleted file mode 100644 index 954b81c19b..0000000000 --- a/bin/tests/pkcs11/benchmarks/create.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* create [-m module] [-s $slot] [-p pin] [-t] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -CK_BYTE buf[1024]; -char label[16]; - -static CK_BBOOL truevalue = TRUE; -static CK_BBOOL falsevalue = FALSE; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_OBJECT_HANDLE *hKey; - CK_OBJECT_CLASS kClass = CKO_DATA; - CK_ULONG len = sizeof(buf); - CK_ATTRIBUTE kTemplate[] = { - { CKA_CLASS, &kClass, (CK_ULONG)sizeof(kClass) }, - { CKA_TOKEN, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_PRIVATE, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_LABEL, (CK_BYTE_PTR)label, (CK_ULONG)sizeof(label) }, - { CKA_VALUE, buf, (CK_ULONG)sizeof(buf) } - }; - pk11_context_t pctx; - char *lib_name = NULL; - char *pin = NULL; - int error = 0; - int c, errflg = 0; - int ontoken = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:tn:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - break; - case 't': - ontoken = 1; - break; - case 'p': - pin = isc_commandline_argument; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tcreate [-m module] [-s slot] [-t] [-n " - "count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Allocate handles */ - hKey = (CK_SESSION_HANDLE *)malloc(count * sizeof(CK_SESSION_HANDLE)); - if (hKey == NULL) { - perror("malloc"); - exit(1); - } - for (i = 0; i < count; i++) - hKey[i] = CK_INVALID_HANDLE; - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = getpass("Enter Pin: "); - } - - result = pk11_get_session(&pctx, OP_ANY, true, true, true, - (const char *)pin, slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NODIGESTSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - exit(1); - } - - if (pin != NULL) { - memset(pin, 0, strlen((char *)pin)); - } - - hSession = pctx.session; - - /* Randomize the buffer */ - rv = pkcs_C_GenerateRandom(hSession, buf, len); - if (rv != CKR_OK) { - fprintf(stderr, "C_GenerateRandom: Error = 0x%.8lX\n", rv); - goto exit_objects; - } - - if (ontoken) { - kTemplate[1].pValue = &truevalue; - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_objects; - } - - for (i = 0; i < count; i++) { - (void)snprintf(label, sizeof(label), "obj%u", i); - kTemplate[3].ulValueLen = strlen(label); - rv = pkcs_C_CreateObject(hSession, kTemplate, 5, &hKey[i]); - if (rv != CKR_OK) { - fprintf(stderr, "C_CreateObject[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - if (i == 0) { - goto exit_objects; - } - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_objects; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u created objects in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g created objects/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_objects: - for (i = 0; i < count; i++) { - /* Destroy objects */ - if (hKey[i] == CK_INVALID_HANDLE) { - continue; - } - rv = pkcs_C_DestroyObject(hSession, hKey[i]); - if ((rv != CKR_OK) && !errflg) { - fprintf(stderr, - "C_DestroyObject[%u]: Error = 0x%.8lX\n", i, - rv); - errflg = 1; - } - } - - free(hKey); - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/find.c b/bin/tests/pkcs11/benchmarks/find.c deleted file mode 100644 index 2fb8968040..0000000000 --- a/bin/tests/pkcs11/benchmarks/find.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* find [-m module] [-s $slot] [-p pin] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -CK_BYTE label[] = "foo??bar!!"; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_ATTRIBUTE sTemplate[] = { - { CKA_LABEL, label, (CK_ULONG)sizeof(label) }, - }; - CK_OBJECT_HANDLE sKey = CK_INVALID_HANDLE; - CK_ULONG found = 0; - pk11_context_t pctx; - pk11_optype_t op_type = OP_RSA; - char *lib_name = NULL; - char *pin = NULL; - int error = 0; - int c, errflg = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:n:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - op_type = OP_ANY; - break; - case 'p': - pin = isc_commandline_argument; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tfind [-m module] [-s slot] [-p pin] [-n " - "count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = getpass("Enter Pin: "); - } - - result = pk11_get_session(&pctx, op_type, false, false, true, - (const char *)pin, slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NODIGESTSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - exit(1); - } - - if (pin != NULL) { - memset(pin, 0, strlen((char *)pin)); - } - - hSession = pctx.session; - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_objects; - } - - for (i = 0; !error && (i < count); i++) { - rv = pkcs_C_FindObjectsInit(hSession, sTemplate, 1); - if (rv != CKR_OK) { - fprintf(stderr, - "C_FindObjectsInit[%u]: Error = 0x%.8lX\n", i, - rv); - error = 1; - break; - } - - rv = pkcs_C_FindObjects(hSession, &sKey, 1, &found); - if (rv != CKR_OK) { - fprintf(stderr, "C_FindObjects[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - /* no break here! */ - } - - rv = pkcs_C_FindObjectsFinal(hSession); - if (rv != CKR_OK) { - fprintf(stderr, - "C_FindObjectsFinal[%u]: Error = 0x%.8lX\n", i, - rv); - error = 1; - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_objects; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u object searches in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g object searches/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_objects: - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/genrsa.c b/bin/tests/pkcs11/benchmarks/genrsa.c deleted file mode 100644 index 7431598a4f..0000000000 --- a/bin/tests/pkcs11/benchmarks/genrsa.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* genrsa [-m module] [-s $slot] [-p pin] [-t] [-b bits] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -static CK_BBOOL truevalue = TRUE; -static CK_BBOOL falsevalue = FALSE; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_MECHANISM mech = { CKM_RSA_PKCS_KEY_PAIR_GEN, NULL, 0 }; - CK_OBJECT_HANDLE *pubKey; - CK_OBJECT_HANDLE *privKey; - CK_OBJECT_CLASS pubClass = CKO_PUBLIC_KEY; - CK_OBJECT_CLASS privClass = CKO_PRIVATE_KEY; - CK_KEY_TYPE kType = CKK_RSA; - CK_ULONG bits = 1024; - CK_BYTE exponent[] = { 0x01, 0x00, 0x01 }; - CK_ATTRIBUTE pubTemplate[] = { - { CKA_CLASS, &pubClass, (CK_ULONG)sizeof(pubClass) }, - { CKA_KEY_TYPE, &kType, (CK_ULONG)sizeof(kType) }, - { CKA_TOKEN, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_PRIVATE, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_VERIFY, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_MODULUS_BITS, &bits, (CK_ULONG)sizeof(bits) }, - { CKA_PUBLIC_EXPONENT, exponent, (CK_ULONG)sizeof(exponent) } - }; - CK_ATTRIBUTE privTemplate[] = { - { CKA_CLASS, &privClass, (CK_ULONG)sizeof(privClass) }, - { CKA_KEY_TYPE, &kType, (CK_ULONG)sizeof(kType) }, - { CKA_TOKEN, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_PRIVATE, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_SIGN, &truevalue, (CK_ULONG)sizeof(truevalue) }, - }; - pk11_context_t pctx; - pk11_optype_t op_type = OP_RSA; - char *lib_name = NULL; - char *pin = NULL; - int error = 0; - int c, errflg = 0; - int ontoken = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:tb:n:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - op_type = OP_ANY; - break; - case 'p': - pin = isc_commandline_argument; - break; - case 't': - ontoken = 1; - break; - case 'b': - bits = (CK_ULONG)atoi(isc_commandline_argument); - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tgenrsa [-m module] [-s slot] [-p pin] " - "[-t] [-b bits] [-n count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Allocate handles */ - pubKey = (CK_SESSION_HANDLE *)malloc(count * sizeof(CK_SESSION_HANDLE)); - if (pubKey == NULL) { - perror("malloc"); - exit(1); - } - privKey = - (CK_SESSION_HANDLE *)malloc(count * sizeof(CK_SESSION_HANDLE)); - if (privKey == NULL) { - free(pubKey); - perror("malloc"); - exit(1); - } - for (i = 0; i < count; i++) { - pubKey[i] = CK_INVALID_HANDLE; - privKey[i] = CK_INVALID_HANDLE; - } - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = getpass("Enter Pin: "); - } - - result = pk11_get_session(&pctx, op_type, false, true, true, - (const char *)pin, slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NODIGESTSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - exit(1); - } - - if (pin != NULL) { - memset(pin, 0, strlen((char *)pin)); - } - - hSession = pctx.session; - - if (ontoken) { - pubTemplate[2].pValue = &truevalue; - privTemplate[2].pValue = &truevalue; - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_keys; - } - - for (i = 0; i < count; i++) { - rv = pkcs_C_GenerateKeyPair(hSession, &mech, pubTemplate, 7, - privTemplate, 5, &pubKey[i], - &privKey[i]); - if (rv != CKR_OK) { - fprintf(stderr, - "C_GenerateKeyPair[%u]: Error = 0x%.8lX\n", i, - rv); - error = 1; - if (i == 0) { - goto exit_keys; - } - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_keys; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u generated RSA in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g generated RSA/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_keys: - for (i = 0; i < count; i++) { - /* Destroy keys */ - if (pubKey[i] == CK_INVALID_HANDLE) { - goto destroy_priv; - } - rv = pkcs_C_DestroyObject(hSession, pubKey[i]); - if ((rv != CKR_OK) && !errflg) { - fprintf(stderr, - "C_DestroyObject[pub%u]: Error = 0x%.8lX\n", i, - rv); - errflg = 1; - } - destroy_priv: - if (privKey[i] == CK_INVALID_HANDLE) { - continue; - } - rv = pkcs_C_DestroyObject(hSession, privKey[i]); - if ((rv != CKR_OK) && !errflg) { - fprintf(stderr, - "C_DestroyObject[priv%u]: Error = 0x%.8lX\n", i, - rv); - errflg = 1; - } - } - - free(pubKey); - free(privKey); - - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/login.c b/bin/tests/pkcs11/benchmarks/login.c deleted file mode 100644 index aecbfa9cea..0000000000 --- a/bin/tests/pkcs11/benchmarks/login.c +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* login [-m module] [-s $slot] [-p pin] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -int -main(int argc, char *argv[]) { - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE *hSession; - CK_UTF8CHAR *pin = NULL; - char *lib_name = NULL; - int error = 0; - int c, errflg = 0; - unsigned int count = 1000; - unsigned int i, j; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:n:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - break; - case 'p': - pin = (CK_UTF8CHAR *)isc_commandline_argument; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tlogin [-m module] [-s slot] [-p pin] [-n " - "count]\n"); - exit(1); - } - - /* allocate sessions */ - hSession = - (CK_SESSION_HANDLE *)malloc(count * sizeof(CK_SESSION_HANDLE)); - if (hSession == NULL) { - perror("malloc"); - exit(1); - } - for (i = 0; i < count; i++) - hSession[i] = CK_INVALID_HANDLE; - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = (CK_UTF8CHAR *)getpass("Enter Pin: "); - } - - rv = pkcs_C_Initialize(NULL_PTR); - if (rv != CKR_OK) { - if (rv == 0xfe) { - fprintf(stderr, "Can't load or link module \"%s\"\n", - pk11_get_lib_name()); - } else { - fprintf(stderr, "C_Initialize: Error = 0x%.8lX\n", rv); - } - free(hSession); - exit(1); - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_program; - } - - /* loop */ - for (i = 0; i < count; i++) { - /* Open sessions */ - rv = pkcs_C_OpenSession(slot, CKF_SERIAL_SESSION, NULL_PTR, - NULL_PTR, &hSession[i]); - if (rv != CKR_OK) { - fprintf(stderr, "C_OpenSession[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - if (i == 0) { - goto exit_program; - } - break; - } - - /* Logon */ - rv = pkcs_C_Login(hSession[i], CKU_USER, pin, - strlen((char *)pin)); - if (rv != CKR_OK) { - fprintf(stderr, "C_Login[%u]: Error = 0x%.8lX\n", i, - rv); - error = 1; - if (i == 0) { - goto exit_program; - } - break; - } - - /* Logoff */ - rv = pkcs_C_Logout(hSession[i]); - if (rv != CKR_OK) { - fprintf(stderr, "C_Logout[%u]: Error = 0x%.8lX\n", i, - rv); - error = 1; - if (i == 0) { - goto exit_program; - } - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_program; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u logins in %ld.%09lds\n", i, endtime.tv_sec, endtime.tv_nsec); - if (i > 0) { - printf("%g logins/s\n", - i / ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - - for (j = 0; j < i; j++) { - if (hSession[j] == CK_INVALID_HANDLE) { - continue; - } - /* Close sessions */ - rv = pkcs_C_CloseSession(hSession[j]); - if ((rv != CKR_OK) && !errflg) { - fprintf(stderr, "C_CloseSession[%u]: Error = 0x%.8lX\n", - j, rv); - errflg = 1; - } - } - -exit_program: - free(hSession); - - rv = pkcs_C_Finalize(NULL_PTR); - if (rv != CKR_OK) { - fprintf(stderr, "C_Finalize: Error = 0x%.8lX\n", rv); - } - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/privrsa.c b/bin/tests/pkcs11/benchmarks/privrsa.c deleted file mode 100644 index 545e4f62bb..0000000000 --- a/bin/tests/pkcs11/benchmarks/privrsa.c +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* privrsa [-m module] [-s $slot] [-p pin] [-t] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -CK_BYTE modulus[] = { - 0x00, 0xb7, 0x9c, 0x1f, 0x05, 0xa3, 0xc2, 0x99, 0x44, 0x82, 0x20, 0x78, - 0x43, 0x7f, 0x5f, 0x3b, 0x10, 0xd7, 0x9e, 0x61, 0x42, 0xd2, 0x7a, 0x90, - 0x50, 0x8a, 0x99, 0x33, 0xe7, 0xca, 0xc8, 0x5f, 0x16, 0x1c, 0x56, 0xf8, - 0xc1, 0x06, 0x2f, 0x96, 0xe7, 0x54, 0xf2, 0x85, 0x89, 0x41, 0x36, 0xf5, - 0x4c, 0xa4, 0x0d, 0x62, 0xd3, 0x42, 0x51, 0x6b, 0x9f, 0xdc, 0x36, 0xcb, - 0xad, 0x56, 0xf4, 0xbd, 0x2a, 0x60, 0x33, 0xb1, 0x7a, 0x99, 0xad, 0x08, - 0x9f, 0x95, 0xe8, 0xe5, 0x14, 0xd9, 0x68, 0x79, 0xca, 0x4e, 0x72, 0xeb, - 0xfb, 0x2c, 0xf1, 0x45, 0xd3, 0x33, 0x65, 0xe7, 0xc5, 0x11, 0xdd, 0xe7, - 0x09, 0x83, 0x13, 0xd5, 0x17, 0x1b, 0xf4, 0xbd, 0x49, 0xdd, 0x8a, 0x3c, - 0x3c, 0xf7, 0xa1, 0x5d, 0x7b, 0xb4, 0xd3, 0x80, 0x25, 0xf4, 0x05, 0x8f, - 0xbc, 0x2c, 0x2a, 0x47, 0xff, 0xd1, 0xc8, 0x34, 0xbf -}; -CK_BYTE pubexp[] = { 0x01, 0x00, 0x01 }; -CK_BYTE privexp[] = { - 0x00, 0xae, 0x02, 0xf1, 0x47, 0xa8, 0x07, 0x02, 0xb8, 0xf1, 0xd6, 0x92, - 0x03, 0xee, 0x50, 0x33, 0xab, 0x67, 0x9e, 0x3b, 0xb1, 0x57, 0xc7, 0x3e, - 0xc4, 0x86, 0x46, 0x61, 0xf1, 0xf8, 0xb6, 0x63, 0x9f, 0x91, 0xe6, 0x3f, - 0x44, 0xb8, 0x77, 0x1b, 0xbe, 0x4c, 0x3c, 0xb8, 0x9f, 0xf7, 0x45, 0x7d, - 0xbf, 0x4f, 0xef, 0x3b, 0xcc, 0xda, 0x1a, 0x4e, 0x34, 0xa8, 0x40, 0xea, - 0x51, 0x72, 0x8a, 0xea, 0x47, 0x06, 0x04, 0xd0, 0x62, 0x31, 0xa0, 0x6c, - 0x09, 0x60, 0xf9, 0xc7, 0x95, 0x88, 0x4a, 0xd7, 0x19, 0xce, 0x89, 0x08, - 0x87, 0x14, 0xef, 0xcc, 0x0a, 0xef, 0x72, 0xb9, 0x21, 0xf5, 0xf0, 0xcd, - 0x6d, 0xe5, 0xfa, 0x15, 0x7f, 0xae, 0x33, 0x9f, 0x26, 0xac, 0x2e, 0x52, - 0x02, 0x07, 0xfb, 0x1d, 0x4b, 0xec, 0x9a, 0x6b, 0x3b, 0x26, 0x1f, 0x52, - 0xfc, 0x47, 0xf8, 0x66, 0x33, 0xfa, 0x50, 0x6c, 0x41 -}; -CK_BYTE prime1[] = { 0x00, 0xe8, 0x98, 0xeb, 0xa1, 0xf0, 0xce, 0xde, 0xc2, 0x74, - 0x01, 0x18, 0x2b, 0xd3, 0x8f, 0x58, 0xcd, 0xe9, 0x8e, 0x97, - 0xbe, 0xfe, 0xe8, 0x6f, 0xd6, 0x0c, 0x0a, 0x47, 0xf8, 0x56, - 0x84, 0x36, 0x15, 0xe6, 0x75, 0x1c, 0x69, 0x48, 0x8b, 0xf5, - 0x0f, 0x84, 0xd2, 0x60, 0x8b, 0xa2, 0x2a, 0xa1, 0xeb, 0xed, - 0xbe, 0x2d, 0xe9, 0x41, 0x0b, 0xed, 0x17, 0x7c, 0xd3, 0xa6, - 0x35, 0x6e, 0xa6, 0xd8, 0x21 }; -CK_BYTE prime2[] = { 0x00, 0xca, 0x15, 0x6a, 0x43, 0x5e, 0x83, 0xc9, 0x09, 0xeb, - 0x14, 0x1e, 0x46, 0x46, 0x97, 0xfa, 0xfa, 0x3c, 0x61, 0x7e, - 0xc1, 0xf8, 0x8c, 0x5e, 0xcb, 0xbf, 0xe4, 0xb9, 0x78, 0x7f, - 0x4f, 0xab, 0x82, 0x15, 0x53, 0xaa, 0x04, 0xee, 0x11, 0x21, - 0x2e, 0x23, 0x08, 0xa0, 0x14, 0x6d, 0x3a, 0x88, 0xe6, 0xf8, - 0xbe, 0x61, 0x38, 0x99, 0xca, 0x36, 0x0d, 0x3e, 0x42, 0x0f, - 0x63, 0x4d, 0x73, 0xf0, 0xdf }; -CK_BYTE exp_1[] = { 0x66, 0x2d, 0xb7, 0x65, 0xbe, 0x99, 0xc2, 0x35, 0xfe, 0x2b, - 0xf4, 0xe8, 0x5b, 0xd9, 0xdf, 0x13, 0x26, 0x04, 0xe4, 0x18, - 0x9d, 0x76, 0x92, 0x9a, 0x9f, 0x53, 0x6c, 0xe6, 0x65, 0x6b, - 0x53, 0x2f, 0x2f, 0xbc, 0x46, 0xac, 0xe1, 0x97, 0xca, 0x21, - 0xf5, 0x21, 0x4e, 0x14, 0x49, 0x3b, 0x1d, 0x42, 0xbd, 0x80, - 0x0c, 0x3f, 0x29, 0xba, 0x09, 0x7f, 0x85, 0xf0, 0x9c, 0x55, - 0x60, 0xb4, 0x9e, 0xc1 }; -CK_BYTE exp_2[] = { 0x00, 0x87, 0x22, 0x74, 0xf1, 0xe2, 0x15, 0x3c, 0x6d, 0xde, - 0x7e, 0x90, 0x94, 0x2c, 0x06, 0xdb, 0xb5, 0x54, 0x85, 0x59, - 0xcf, 0x7a, 0x56, 0xdb, 0xd9, 0x62, 0x54, 0x20, 0x56, 0xdc, - 0xc3, 0xb9, 0x0b, 0xff, 0x18, 0xf8, 0x7b, 0xdd, 0x7b, 0x24, - 0xf6, 0x06, 0x45, 0x71, 0x4e, 0xd7, 0x90, 0x2a, 0x16, 0x52, - 0x46, 0x75, 0x1a, 0xf5, 0x74, 0x8c, 0x5a, 0xa4, 0xc4, 0x66, - 0x27, 0xe0, 0x96, 0x64, 0x7f }; -CK_BYTE coeff[] = { 0x00, 0xd0, 0x1f, 0xb3, 0x47, 0x40, 0x93, 0x8b, 0x99, 0xd7, - 0xb5, 0xc6, 0x09, 0x82, 0x65, 0x94, 0x9d, 0x56, 0x0a, 0x05, - 0x55, 0x7d, 0x93, 0x04, 0xa4, 0x26, 0xee, 0x42, 0x86, 0xa3, - 0xf1, 0xd5, 0x7a, 0x42, 0x84, 0x3c, 0x21, 0x96, 0x9a, 0xd9, - 0x36, 0xd4, 0x62, 0x01, 0xb0, 0x8b, 0x77, 0xe5, 0xcc, 0x1b, - 0xd2, 0x12, 0xd2, 0x9c, 0x89, 0x67, 0x0c, 0x00, 0x09, 0x56, - 0x8c, 0x33, 0x57, 0xf9, 0x8c }; - -char label[16]; - -static CK_BBOOL truevalue = TRUE; -static CK_BBOOL falsevalue = FALSE; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_OBJECT_HANDLE *hKey; - CK_OBJECT_CLASS kClass = CKO_PRIVATE_KEY; - CK_KEY_TYPE kType = CKK_RSA; - CK_ATTRIBUTE kTemplate[] = { - { CKA_CLASS, &kClass, (CK_ULONG)sizeof(kClass) }, - { CKA_KEY_TYPE, &kType, (CK_ULONG)sizeof(kType) }, - { CKA_TOKEN, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_PRIVATE, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_LABEL, (CK_BYTE_PTR)label, (CK_ULONG)sizeof(label) }, - { CKA_SIGN, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_MODULUS, modulus, (CK_ULONG)sizeof(modulus) }, - { CKA_PUBLIC_EXPONENT, pubexp, (CK_ULONG)sizeof(pubexp) }, - { CKA_PRIVATE_EXPONENT, privexp, (CK_ULONG)sizeof(privexp) }, - { CKA_PRIME_1, prime1, (CK_ULONG)sizeof(prime1) }, - { CKA_PRIME_2, prime2, (CK_ULONG)sizeof(prime2) }, - { CKA_EXPONENT_1, exp_1, (CK_ULONG)sizeof(exp_1) }, - { CKA_EXPONENT_2, exp_2, (CK_ULONG)sizeof(exp_2) }, - { CKA_COEFFICIENT, coeff, (CK_ULONG)sizeof(coeff) } - }; - pk11_context_t pctx; - pk11_optype_t op_type = OP_RSA; - char *lib_name = NULL; - char *pin = NULL; - int error = 0; - int c, errflg = 0; - int ontoken = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:tn:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - op_type = OP_ANY; - break; - case 'p': - pin = isc_commandline_argument; - break; - case 't': - ontoken = 1; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tprivrsa [-m module] [-s slot] [-p pin] " - "[-t] [-n count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Allocate handles */ - hKey = (CK_SESSION_HANDLE *)malloc(count * sizeof(CK_SESSION_HANDLE)); - if (hKey == NULL) { - perror("malloc"); - exit(1); - } - for (i = 0; i < count; i++) - hKey[i] = CK_INVALID_HANDLE; - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = getpass("Enter Pin: "); - } - - result = pk11_get_session(&pctx, op_type, false, true, true, - (const char *)pin, slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NODIGESTSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - free(hKey); - exit(1); - } - - if (pin != NULL) { - memset(pin, 0, strlen((char *)pin)); - } - - hSession = pctx.session; - - if (ontoken) { - kTemplate[2].pValue = &truevalue; - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_objects; - } - - for (i = 0; i < count; i++) { - (void)snprintf(label, sizeof(label), "obj%u", i); - kTemplate[4].ulValueLen = strlen(label); - rv = pkcs_C_CreateObject(hSession, kTemplate, 14, &hKey[i]); - if (rv != CKR_OK) { - fprintf(stderr, "C_CreateObject[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - if (i == 0) { - goto exit_objects; - } - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_objects; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u private RSA keys in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g private RSA keys/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_objects: - for (i = 0; i < count; i++) { - /* Destroy objects */ - if (hKey[i] == CK_INVALID_HANDLE) { - continue; - } - rv = pkcs_C_DestroyObject(hSession, hKey[i]); - if ((rv != CKR_OK) && !errflg) { - fprintf(stderr, - "C_DestroyObject[%u]: Error = 0x%.8lX\n", i, - rv); - errflg = 1; - } - } - - free(hKey); - - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/pubrsa.c b/bin/tests/pkcs11/benchmarks/pubrsa.c deleted file mode 100644 index 045f01d6da..0000000000 --- a/bin/tests/pkcs11/benchmarks/pubrsa.c +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* pubrsa [-m module] [-s $slot] [-p pin] [-t] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -CK_BYTE modulus[] = { - 0x00, 0xb7, 0x9c, 0x1f, 0x05, 0xa3, 0xc2, 0x99, 0x44, 0x82, 0x20, 0x78, - 0x43, 0x7f, 0x5f, 0x3b, 0x10, 0xd7, 0x9e, 0x61, 0x42, 0xd2, 0x7a, 0x90, - 0x50, 0x8a, 0x99, 0x33, 0xe7, 0xca, 0xc8, 0x5f, 0x16, 0x1c, 0x56, 0xf8, - 0xc1, 0x06, 0x2f, 0x96, 0xe7, 0x54, 0xf2, 0x85, 0x89, 0x41, 0x36, 0xf5, - 0x4c, 0xa4, 0x0d, 0x62, 0xd3, 0x42, 0x51, 0x6b, 0x9f, 0xdc, 0x36, 0xcb, - 0xad, 0x56, 0xf4, 0xbd, 0x2a, 0x60, 0x33, 0xb1, 0x7a, 0x99, 0xad, 0x08, - 0x9f, 0x95, 0xe8, 0xe5, 0x14, 0xd9, 0x68, 0x79, 0xca, 0x4e, 0x72, 0xeb, - 0xfb, 0x2c, 0xf1, 0x45, 0xd3, 0x33, 0x65, 0xe7, 0xc5, 0x11, 0xdd, 0xe7, - 0x09, 0x83, 0x13, 0xd5, 0x17, 0x1b, 0xf4, 0xbd, 0x49, 0xdd, 0x8a, 0x3c, - 0x3c, 0xf7, 0xa1, 0x5d, 0x7b, 0xb4, 0xd3, 0x80, 0x25, 0xf4, 0x05, 0x8f, - 0xbc, 0x2c, 0x2a, 0x47, 0xff, 0xd1, 0xc8, 0x34, 0xbf -}; -CK_BYTE exponent[] = { 0x01, 0x00, 0x01 }; - -char label[16]; - -static CK_BBOOL truevalue = TRUE; -static CK_BBOOL falsevalue = FALSE; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_OBJECT_HANDLE *hKey; - CK_OBJECT_CLASS kClass = CKO_PUBLIC_KEY; - CK_KEY_TYPE kType = CKK_RSA; - CK_ATTRIBUTE kTemplate[] = { - { CKA_CLASS, &kClass, (CK_ULONG)sizeof(kClass) }, - { CKA_KEY_TYPE, &kType, (CK_ULONG)sizeof(kType) }, - { CKA_TOKEN, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_PRIVATE, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_LABEL, (CK_BYTE_PTR)label, (CK_ULONG)sizeof(label) }, - { CKA_VERIFY, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_MODULUS, modulus, (CK_ULONG)sizeof(modulus) }, - { CKA_PUBLIC_EXPONENT, exponent, (CK_ULONG)sizeof(exponent) } - }; - pk11_context_t pctx; - pk11_optype_t op_type = OP_RSA; - char *lib_name = NULL; - char *pin = NULL; - int error = 0; - int c, errflg = 0; - int ontoken = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:tn:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - op_type = OP_ANY; - break; - case 'p': - pin = isc_commandline_argument; - break; - case 't': - ontoken = 1; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tpubrsa [-m module] [-s slot] [-p pin] " - "[-t] [-n count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Allocate handles */ - hKey = (CK_SESSION_HANDLE *)malloc(count * sizeof(CK_SESSION_HANDLE)); - if (hKey == NULL) { - perror("malloc"); - exit(1); - } - for (i = 0; i < count; i++) - hKey[i] = CK_INVALID_HANDLE; - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = getpass("Enter Pin: "); - } - - result = pk11_get_session(&pctx, op_type, false, true, true, - (const char *)pin, slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NODIGESTSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - free(hKey); - exit(1); - } - - if (pin != NULL) { - memset(pin, 0, strlen((char *)pin)); - } - - hSession = pctx.session; - - if (ontoken) { - kTemplate[2].pValue = &truevalue; - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_objects; - } - - for (i = 0; i < count; i++) { - (void)snprintf(label, sizeof(label), "obj%u", i); - kTemplate[4].ulValueLen = strlen(label); - rv = pkcs_C_CreateObject(hSession, kTemplate, 8, &hKey[i]); - if (rv != CKR_OK) { - fprintf(stderr, "C_CreateObject[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - if (i == 0) { - goto exit_objects; - } - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_objects; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u public RSA keys in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g public RSA keys/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_objects: - for (i = 0; i < count; i++) { - /* Destroy objects */ - if (hKey[i] == CK_INVALID_HANDLE) { - continue; - } - rv = pkcs_C_DestroyObject(hSession, hKey[i]); - if ((rv != CKR_OK) && !errflg) { - fprintf(stderr, - "C_DestroyObject[%u]: Error = 0x%.8lX\n", i, - rv); - errflg = 1; - } - } - - free(hKey); - - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/session.c b/bin/tests/pkcs11/benchmarks/session.c deleted file mode 100644 index 22c13ec9a1..0000000000 --- a/bin/tests/pkcs11/benchmarks/session.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* session [-m module] [-s $slot] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -int -main(int argc, char *argv[]) { - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE *hSession; - char *lib_name = NULL; - int error = 0; - int c, errflg = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:n:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tsession [-m module] [-s slot] [-n count]\n"); - exit(1); - } - - /* Allocate sessions */ - hSession = - (CK_SESSION_HANDLE *)malloc(count * sizeof(CK_SESSION_HANDLE)); - if (hSession == NULL) { - perror("malloc"); - exit(1); - } - for (i = 0; i < count; i++) - hSession[i] = CK_INVALID_HANDLE; - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - rv = pkcs_C_Initialize(NULL_PTR); - if (rv != CKR_OK) { - if (rv == 0xfe) { - fprintf(stderr, "Can't load or link module \"%s\"\n", - pk11_get_lib_name()); - } else { - fprintf(stderr, "C_Initialize: Error = 0x%.8lX\n", rv); - } - free(hSession); - exit(1); - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_program; - } - - /* loop */ - for (i = 0; i < count; i++) { - /* Open sessions */ - rv = pkcs_C_OpenSession(slot, CKF_SERIAL_SESSION, NULL_PTR, - NULL_PTR, &hSession[i]); - if (rv != CKR_OK) { - fprintf(stderr, "C_OpenSession[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - if (i == 0) { - goto exit_program; - } - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_program; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u sessions in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g sessions/s\n", - i / ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - - for (i = 0; i < count; i++) { - /* Close sessions */ - if (hSession[i] == CK_INVALID_HANDLE) { - continue; - } - rv = pkcs_C_CloseSession(hSession[i]); - if ((rv != CKR_OK) && !errflg) { - fprintf(stderr, "C_CloseSession[%u]: Error = 0x%.8lX\n", - i, rv); - errflg = 1; - } - } - -exit_program: - free(hSession); - - rv = pkcs_C_Finalize(NULL_PTR); - if (rv != CKR_OK) { - fprintf(stderr, "C_Finalize: Error = 0x%.8lX\n", rv); - } - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/sha1.c b/bin/tests/pkcs11/benchmarks/sha1.c deleted file mode 100644 index 578932fc40..0000000000 --- a/bin/tests/pkcs11/benchmarks/sha1.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* sha1 [-m module] [-s $slot] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -CK_BYTE buf[1024]; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_MECHANISM mech = { CKM_SHA_1, NULL, 0 }; - CK_ULONG len = sizeof(buf); - pk11_context_t pctx; - pk11_optype_t op_type = OP_DIGEST; - char *lib_name = NULL; - int error = 0; - int c, errflg = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:n:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - op_type = OP_ANY; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tssha1 [-m module] [-s slot] [-n count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - result = pk11_get_session(&pctx, op_type, false, false, false, NULL, - slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - exit(1); - } - - hSession = pctx.session; - - /* Randomize the buffer */ - rv = pkcs_C_GenerateRandom(hSession, buf, len); - if (rv != CKR_OK) { - fprintf(stderr, "C_GenerateRandom: Error = 0x%.8lX\n", rv); - goto exit_session; - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_session; - } - - /* Initialize Digest */ - rv = pkcs_C_DigestInit(hSession, &mech); - if (rv != CKR_OK) { - fprintf(stderr, "C_DigestInit: Error = 0x%.8lX\n", rv); - goto exit_session; - } - - for (i = 0; i < count; i++) { - /* Digest buffer */ - rv = pkcs_C_DigestUpdate(hSession, buf, len); - if (rv != CKR_OK) { - fprintf(stderr, "C_DigestUpdate[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - break; - } - } - - /* Finalize Digest (unconditionally) */ - len = 20U; - rv = pkcs_C_DigestFinal(hSession, buf, &len); - if ((rv != CKR_OK) && !error) { - fprintf(stderr, "C_DigestFinal: Error = 0x%.8lX\n", rv); - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_session; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%uK digested bytes in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g digested bytes/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_session: - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/sign.c b/bin/tests/pkcs11/benchmarks/sign.c deleted file mode 100644 index 047c92c5e3..0000000000 --- a/bin/tests/pkcs11/benchmarks/sign.c +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* signrsa [-m module] [-s $slot] [-p pin] [-t] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -CK_BYTE modulus[] = { - 0x00, 0xb7, 0x9c, 0x1f, 0x05, 0xa3, 0xc2, 0x99, 0x44, 0x82, 0x20, 0x78, - 0x43, 0x7f, 0x5f, 0x3b, 0x10, 0xd7, 0x9e, 0x61, 0x42, 0xd2, 0x7a, 0x90, - 0x50, 0x8a, 0x99, 0x33, 0xe7, 0xca, 0xc8, 0x5f, 0x16, 0x1c, 0x56, 0xf8, - 0xc1, 0x06, 0x2f, 0x96, 0xe7, 0x54, 0xf2, 0x85, 0x89, 0x41, 0x36, 0xf5, - 0x4c, 0xa4, 0x0d, 0x62, 0xd3, 0x42, 0x51, 0x6b, 0x9f, 0xdc, 0x36, 0xcb, - 0xad, 0x56, 0xf4, 0xbd, 0x2a, 0x60, 0x33, 0xb1, 0x7a, 0x99, 0xad, 0x08, - 0x9f, 0x95, 0xe8, 0xe5, 0x14, 0xd9, 0x68, 0x79, 0xca, 0x4e, 0x72, 0xeb, - 0xfb, 0x2c, 0xf1, 0x45, 0xd3, 0x33, 0x65, 0xe7, 0xc5, 0x11, 0xdd, 0xe7, - 0x09, 0x83, 0x13, 0xd5, 0x17, 0x1b, 0xf4, 0xbd, 0x49, 0xdd, 0x8a, 0x3c, - 0x3c, 0xf7, 0xa1, 0x5d, 0x7b, 0xb4, 0xd3, 0x80, 0x25, 0xf4, 0x05, 0x8f, - 0xbc, 0x2c, 0x2a, 0x47, 0xff, 0xd1, 0xc8, 0x34, 0xbf -}; -CK_BYTE pubexp[] = { 0x01, 0x00, 0x01 }; -CK_BYTE privexp[] = { - 0x00, 0xae, 0x02, 0xf1, 0x47, 0xa8, 0x07, 0x02, 0xb8, 0xf1, 0xd6, 0x92, - 0x03, 0xee, 0x50, 0x33, 0xab, 0x67, 0x9e, 0x3b, 0xb1, 0x57, 0xc7, 0x3e, - 0xc4, 0x86, 0x46, 0x61, 0xf1, 0xf8, 0xb6, 0x63, 0x9f, 0x91, 0xe6, 0x3f, - 0x44, 0xb8, 0x77, 0x1b, 0xbe, 0x4c, 0x3c, 0xb8, 0x9f, 0xf7, 0x45, 0x7d, - 0xbf, 0x4f, 0xef, 0x3b, 0xcc, 0xda, 0x1a, 0x4e, 0x34, 0xa8, 0x40, 0xea, - 0x51, 0x72, 0x8a, 0xea, 0x47, 0x06, 0x04, 0xd0, 0x62, 0x31, 0xa0, 0x6c, - 0x09, 0x60, 0xf9, 0xc7, 0x95, 0x88, 0x4a, 0xd7, 0x19, 0xce, 0x89, 0x08, - 0x87, 0x14, 0xef, 0xcc, 0x0a, 0xef, 0x72, 0xb9, 0x21, 0xf5, 0xf0, 0xcd, - 0x6d, 0xe5, 0xfa, 0x15, 0x7f, 0xae, 0x33, 0x9f, 0x26, 0xac, 0x2e, 0x52, - 0x02, 0x07, 0xfb, 0x1d, 0x4b, 0xec, 0x9a, 0x6b, 0x3b, 0x26, 0x1f, 0x52, - 0xfc, 0x47, 0xf8, 0x66, 0x33, 0xfa, 0x50, 0x6c, 0x41 -}; -CK_BYTE prime1[] = { 0x00, 0xe8, 0x98, 0xeb, 0xa1, 0xf0, 0xce, 0xde, 0xc2, 0x74, - 0x01, 0x18, 0x2b, 0xd3, 0x8f, 0x58, 0xcd, 0xe9, 0x8e, 0x97, - 0xbe, 0xfe, 0xe8, 0x6f, 0xd6, 0x0c, 0x0a, 0x47, 0xf8, 0x56, - 0x84, 0x36, 0x15, 0xe6, 0x75, 0x1c, 0x69, 0x48, 0x8b, 0xf5, - 0x0f, 0x84, 0xd2, 0x60, 0x8b, 0xa2, 0x2a, 0xa1, 0xeb, 0xed, - 0xbe, 0x2d, 0xe9, 0x41, 0x0b, 0xed, 0x17, 0x7c, 0xd3, 0xa6, - 0x35, 0x6e, 0xa6, 0xd8, 0x21 }; -CK_BYTE prime2[] = { 0x00, 0xca, 0x15, 0x6a, 0x43, 0x5e, 0x83, 0xc9, 0x09, 0xeb, - 0x14, 0x1e, 0x46, 0x46, 0x97, 0xfa, 0xfa, 0x3c, 0x61, 0x7e, - 0xc1, 0xf8, 0x8c, 0x5e, 0xcb, 0xbf, 0xe4, 0xb9, 0x78, 0x7f, - 0x4f, 0xab, 0x82, 0x15, 0x53, 0xaa, 0x04, 0xee, 0x11, 0x21, - 0x2e, 0x23, 0x08, 0xa0, 0x14, 0x6d, 0x3a, 0x88, 0xe6, 0xf8, - 0xbe, 0x61, 0x38, 0x99, 0xca, 0x36, 0x0d, 0x3e, 0x42, 0x0f, - 0x63, 0x4d, 0x73, 0xf0, 0xdf }; -CK_BYTE exp_1[] = { 0x66, 0x2d, 0xb7, 0x65, 0xbe, 0x99, 0xc2, 0x35, 0xfe, 0x2b, - 0xf4, 0xe8, 0x5b, 0xd9, 0xdf, 0x13, 0x26, 0x04, 0xe4, 0x18, - 0x9d, 0x76, 0x92, 0x9a, 0x9f, 0x53, 0x6c, 0xe6, 0x65, 0x6b, - 0x53, 0x2f, 0x2f, 0xbc, 0x46, 0xac, 0xe1, 0x97, 0xca, 0x21, - 0xf5, 0x21, 0x4e, 0x14, 0x49, 0x3b, 0x1d, 0x42, 0xbd, 0x80, - 0x0c, 0x3f, 0x29, 0xba, 0x09, 0x7f, 0x85, 0xf0, 0x9c, 0x55, - 0x60, 0xb4, 0x9e, 0xc1 }; -CK_BYTE exp_2[] = { 0x00, 0x87, 0x22, 0x74, 0xf1, 0xe2, 0x15, 0x3c, 0x6d, 0xde, - 0x7e, 0x90, 0x94, 0x2c, 0x06, 0xdb, 0xb5, 0x54, 0x85, 0x59, - 0xcf, 0x7a, 0x56, 0xdb, 0xd9, 0x62, 0x54, 0x20, 0x56, 0xdc, - 0xc3, 0xb9, 0x0b, 0xff, 0x18, 0xf8, 0x7b, 0xdd, 0x7b, 0x24, - 0xf6, 0x06, 0x45, 0x71, 0x4e, 0xd7, 0x90, 0x2a, 0x16, 0x52, - 0x46, 0x75, 0x1a, 0xf5, 0x74, 0x8c, 0x5a, 0xa4, 0xc4, 0x66, - 0x27, 0xe0, 0x96, 0x64, 0x7f }; -CK_BYTE coeff[] = { 0x00, 0xd0, 0x1f, 0xb3, 0x47, 0x40, 0x93, 0x8b, 0x99, 0xd7, - 0xb5, 0xc6, 0x09, 0x82, 0x65, 0x94, 0x9d, 0x56, 0x0a, 0x05, - 0x55, 0x7d, 0x93, 0x04, 0xa4, 0x26, 0xee, 0x42, 0x86, 0xa3, - 0xf1, 0xd5, 0x7a, 0x42, 0x84, 0x3c, 0x21, 0x96, 0x9a, 0xd9, - 0x36, 0xd4, 0x62, 0x01, 0xb0, 0x8b, 0x77, 0xe5, 0xcc, 0x1b, - 0xd2, 0x12, 0xd2, 0x9c, 0x89, 0x67, 0x0c, 0x00, 0x09, 0x56, - 0x8c, 0x33, 0x57, 0xf9, 0x8c }; - -CK_BYTE buf[1024]; -CK_BYTE sig[128]; - -static CK_BBOOL truevalue = TRUE; -static CK_BBOOL falsevalue = FALSE; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_ULONG len; - CK_ULONG slen; - CK_OBJECT_HANDLE hKey = CK_INVALID_HANDLE; - CK_OBJECT_CLASS kClass = CKO_PRIVATE_KEY; - CK_KEY_TYPE kType = CKK_RSA; - CK_ATTRIBUTE kTemplate[] = { - { CKA_CLASS, &kClass, (CK_ULONG)sizeof(kClass) }, - { CKA_KEY_TYPE, &kType, (CK_ULONG)sizeof(kType) }, - { CKA_TOKEN, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_PRIVATE, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_SIGN, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_MODULUS, modulus, (CK_ULONG)sizeof(modulus) }, - { CKA_PUBLIC_EXPONENT, pubexp, (CK_ULONG)sizeof(pubexp) }, - { CKA_PRIVATE_EXPONENT, privexp, (CK_ULONG)sizeof(privexp) }, - { CKA_PRIME_1, prime1, (CK_ULONG)sizeof(prime1) }, - { CKA_PRIME_2, prime2, (CK_ULONG)sizeof(prime2) }, - { CKA_EXPONENT_1, exp_1, (CK_ULONG)sizeof(exp_1) }, - { CKA_EXPONENT_2, exp_2, (CK_ULONG)sizeof(exp_2) }, - { CKA_COEFFICIENT, coeff, (CK_ULONG)sizeof(coeff) } - }; - CK_MECHANISM mech = { CKM_SHA1_RSA_PKCS, NULL, 0 }; - pk11_context_t pctx; - pk11_optype_t op_type = OP_RSA; - char *lib_name = NULL; - char *pin = NULL; - int error = 0; - int c, errflg = 0; - int ontoken = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:tn:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - op_type = OP_ANY; - break; - case 'p': - pin = isc_commandline_argument; - break; - case 't': - ontoken = 1; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tsign [-m module] [-s slot] [-p pin] " - "[-t] [-n count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = getpass("Enter Pin: "); - } - - result = pk11_get_session(&pctx, op_type, false, true, true, - (const char *)pin, slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NODIGESTSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - exit(1); - } - - if (pin != NULL) { - memset(pin, 0, strlen((char *)pin)); - } - - hSession = pctx.session; - - /* Create the private RSA key */ - if (ontoken) { - kTemplate[2].pValue = &truevalue; - } - - rv = pkcs_C_CreateObject(hSession, kTemplate, 13, &hKey); - if (rv != CKR_OK) { - fprintf(stderr, "C_CreateObject: Error = 0x%.8lX\n", rv); - goto exit_key; - } - - /* Randomize the buffer */ - len = (CK_ULONG)sizeof(buf); - rv = pkcs_C_GenerateRandom(hSession, buf, len); - if (rv != CKR_OK) { - fprintf(stderr, "C_GenerateRandom: Error = 0x%.8lX\n", rv); - goto exit_key; - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_key; - } - - for (i = 0; i < count; i++) { - /* Initialize Sign */ - rv = pkcs_C_SignInit(hSession, &mech, hKey); - if (rv != CKR_OK) { - fprintf(stderr, "C_SignInit[%u]: Error = 0x%.8lX\n", i, - rv); - error = 1; - break; - } - - /* Perform Sign */ - slen = (CK_ULONG)sizeof(sig); - rv = pkcs_C_Sign(hSession, buf, len, sig, &slen); - if (rv != CKR_OK) { - fprintf(stderr, "C_Sign[%u]: Error = 0x%.8lX\n", i, rv); - error = 1; - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_key; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u RSA signs in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g RSA signs/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_key: - if (hKey != CK_INVALID_HANDLE) { - rv = pkcs_C_DestroyObject(hSession, hKey); - if (rv != CKR_OK) { - fprintf(stderr, "C_DestroyObject: Error = 0x%.8lX\n", - rv); - } - } - - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/pkcs11/benchmarks/verify.c b/bin/tests/pkcs11/benchmarks/verify.c deleted file mode 100644 index e559d01c94..0000000000 --- a/bin/tests/pkcs11/benchmarks/verify.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Portions copyright (c) 2008 Nominet UK. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. - */ - -/* verify [-m module] [-s $slot] [-p pin] [-t] [-n count] */ - -/*! \file */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef HAVE_CLOCK_GETTIME - -#include - -#ifndef CLOCK_REALTIME -#define CLOCK_REALTIME 0 -#endif /* ifndef CLOCK_REALTIME */ - -static int -clock_gettime(int32_t id, struct timespec *tp); - -static int -clock_gettime(int32_t id, struct timespec *tp) { - struct timeval tv; - int result; - - UNUSED(id); - - result = gettimeofday(&tv, NULL); - if (result == 0) { - tp->tv_sec = tv.tv_sec; - tp->tv_nsec = (long)tv.tv_usec * 1000; - } - return (result); -} -#endif /* ifndef HAVE_CLOCK_GETTIME */ - -CK_BYTE modulus[] = { - 0x00, 0xb7, 0x9c, 0x1f, 0x05, 0xa3, 0xc2, 0x99, 0x44, 0x82, 0x20, 0x78, - 0x43, 0x7f, 0x5f, 0x3b, 0x10, 0xd7, 0x9e, 0x61, 0x42, 0xd2, 0x7a, 0x90, - 0x50, 0x8a, 0x99, 0x33, 0xe7, 0xca, 0xc8, 0x5f, 0x16, 0x1c, 0x56, 0xf8, - 0xc1, 0x06, 0x2f, 0x96, 0xe7, 0x54, 0xf2, 0x85, 0x89, 0x41, 0x36, 0xf5, - 0x4c, 0xa4, 0x0d, 0x62, 0xd3, 0x42, 0x51, 0x6b, 0x9f, 0xdc, 0x36, 0xcb, - 0xad, 0x56, 0xf4, 0xbd, 0x2a, 0x60, 0x33, 0xb1, 0x7a, 0x99, 0xad, 0x08, - 0x9f, 0x95, 0xe8, 0xe5, 0x14, 0xd9, 0x68, 0x79, 0xca, 0x4e, 0x72, 0xeb, - 0xfb, 0x2c, 0xf1, 0x45, 0xd3, 0x33, 0x65, 0xe7, 0xc5, 0x11, 0xdd, 0xe7, - 0x09, 0x83, 0x13, 0xd5, 0x17, 0x1b, 0xf4, 0xbd, 0x49, 0xdd, 0x8a, 0x3c, - 0x3c, 0xf7, 0xa1, 0x5d, 0x7b, 0xb4, 0xd3, 0x80, 0x25, 0xf4, 0x05, 0x8f, - 0xbc, 0x2c, 0x2a, 0x47, 0xff, 0xd1, 0xc8, 0x34, 0xbf -}; -CK_BYTE exponent[] = { 0x01, 0x00, 0x01 }; - -CK_BYTE buf[1024]; -CK_BYTE sig[128]; - -static CK_BBOOL truevalue = TRUE; -static CK_BBOOL falsevalue = FALSE; - -int -main(int argc, char *argv[]) { - isc_result_t result; - CK_RV rv; - CK_SLOT_ID slot = 0; - CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE; - CK_ULONG len; - CK_ULONG slen; - CK_OBJECT_HANDLE hKey = CK_INVALID_HANDLE; - CK_OBJECT_CLASS kClass = CKO_PUBLIC_KEY; - CK_KEY_TYPE kType = CKK_RSA; - CK_ATTRIBUTE kTemplate[] = { - { CKA_CLASS, &kClass, (CK_ULONG)sizeof(kClass) }, - { CKA_KEY_TYPE, &kType, (CK_ULONG)sizeof(kType) }, - { CKA_TOKEN, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_PRIVATE, &falsevalue, (CK_ULONG)sizeof(falsevalue) }, - { CKA_VERIFY, &truevalue, (CK_ULONG)sizeof(truevalue) }, - { CKA_MODULUS, modulus, (CK_ULONG)sizeof(modulus) }, - { CKA_PUBLIC_EXPONENT, exponent, (CK_ULONG)sizeof(exponent) } - }; - CK_MECHANISM mech = { CKM_SHA1_RSA_PKCS, NULL, 0 }; - pk11_context_t pctx; - pk11_optype_t op_type = OP_RSA; - char *lib_name = NULL; - char *pin = NULL; - int error = 0; - int c, errflg = 0; - int ontoken = 0; - unsigned int count = 1000; - unsigned int i; - struct timespec starttime; - struct timespec endtime; - - while ((c = isc_commandline_parse(argc, argv, ":m:s:p:tn:")) != -1) { - switch (c) { - case 'm': - lib_name = isc_commandline_argument; - break; - case 's': - slot = atoi(isc_commandline_argument); - op_type = OP_ANY; - break; - case 'p': - pin = isc_commandline_argument; - break; - case 't': - ontoken = 1; - break; - case 'n': - count = atoi(isc_commandline_argument); - break; - case ':': - fprintf(stderr, "Option -%c requires an operand\n", - isc_commandline_option); - errflg++; - break; - case '?': - default: - fprintf(stderr, "Unrecognised option: -%c\n", - isc_commandline_option); - errflg++; - } - } - - if (errflg) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tverify [-m module] [-s slot] [-p pin] " - "[-t] [-n count]\n"); - exit(1); - } - - pk11_result_register(); - - /* Initialize the CRYPTOKI library */ - if (lib_name != NULL) { - pk11_set_lib_name(lib_name); - } - - if (pin == NULL) { - pin = getpass("Enter Pin: "); - } - - result = pk11_get_session(&pctx, op_type, false, true, true, - (const char *)pin, slot); - if ((result != ISC_R_SUCCESS) && (result != PK11_R_NORANDOMSERVICE) && - (result != PK11_R_NODIGESTSERVICE) && - (result != PK11_R_NOAESSERVICE)) - { - fprintf(stderr, "Error initializing PKCS#11: %s\n", - isc_result_totext(result)); - exit(1); - } - - if (pin != NULL) { - memset(pin, 0, strlen((char *)pin)); - } - - hSession = pctx.session; - - /* Create the private RSA key */ - if (ontoken) { - kTemplate[2].pValue = &truevalue; - } - - rv = pkcs_C_CreateObject(hSession, kTemplate, 7, &hKey); - if (rv != CKR_OK) { - fprintf(stderr, "C_CreateObject: Error = 0x%.8lX\n", rv); - error = 1; - goto exit_key; - } - - /* Randomize the buffer */ - len = (CK_ULONG)sizeof(buf); - rv = pkcs_C_GenerateRandom(hSession, buf, len); - if (rv != CKR_OK) { - fprintf(stderr, "C_GenerateRandom: Error = 0x%.8lX\n", rv); - goto exit_key; - } - - if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) { - perror("clock_gettime(start)"); - goto exit_key; - } - - for (i = 0; i < count; i++) { - /* Initialize Verify */ - rv = pkcs_C_VerifyInit(hSession, &mech, hKey); - if (rv != CKR_OK) { - fprintf(stderr, "C_VerifyInit[%u]: Error = 0x%.8lX\n", - i, rv); - error = 1; - break; - } - - /* Perform Verify */ - slen = (CK_ULONG)sizeof(sig); - rv = pkcs_C_Verify(hSession, buf, len, sig, slen); - if ((rv != CKR_OK) && (rv != CKR_SIGNATURE_INVALID)) { - fprintf(stderr, "C_Verify[%u]: Error = 0x%.8lX\n", i, - rv); - error = 1; - break; - } - } - - if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) { - perror("clock_gettime(end)"); - goto exit_key; - } - - endtime.tv_sec -= starttime.tv_sec; - endtime.tv_nsec -= starttime.tv_nsec; - while (endtime.tv_nsec < 0) { - endtime.tv_sec -= 1; - endtime.tv_nsec += 1000000000; - } - printf("%u RSA verify in %ld.%09lds\n", i, endtime.tv_sec, - endtime.tv_nsec); - if (i > 0) { - printf("%g RSA verify/s\n", - 1024 * i / - ((double)endtime.tv_sec + - (double)endtime.tv_nsec / 1000000000.)); - } - -exit_key: - if (hKey != CK_INVALID_HANDLE) { - rv = pkcs_C_DestroyObject(hSession, hKey); - if (rv != CKR_OK) { - fprintf(stderr, "C_DestroyObject: Error = 0x%.8lX\n", - rv); - error = 1; - } - } - - pk11_return_session(&pctx); - (void)pk11_finalize(); - - exit(error); -} diff --git a/bin/tests/system/.gitignore b/bin/tests/system/.gitignore index f51188bc28..998718e758 100644 --- a/bin/tests/system/.gitignore +++ b/bin/tests/system/.gitignore @@ -6,6 +6,16 @@ named.pid named.run /feature-test /test.output.* +/makejournal /systests.output /random.data parallel.mk +/*.log +/*.trs +/get_base_port.state +/get_base_port.lock +/run.sh +/start.sh +/stop.sh +/system-test-driver.sh +/ifconfig.sh diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am new file mode 100644 index 0000000000..17fa9d1205 --- /dev/null +++ b/bin/tests/system/Makefile.am @@ -0,0 +1,155 @@ +include $(top_srcdir)/Makefile.top + +SUBDIRS = dyndb/driver dlzexternal/driver + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) + +LDADD = \ + $(LIBISC_LIBS) + +if HAVE_PERL + +check_PROGRAMS = \ + feature-test \ + makejournal \ + pipelined/pipequeries \ + rndc/gencheck \ + rpz/dnsrps \ + tkey/keycreate \ + tkey/keydelete + +feature_test_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBDNS_CFLAGS) + +makejournal_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBDNS_CFLAGS) + +makejournal_LDADD = \ + $(LDADD) \ + $(LIBDNS_LIBS) + +pipelined_pipequeries_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBDNS_CFLAGS) + +pipelined_pipequeries_LDADD = \ + $(LDADD) \ + $(LIBDNS_LIBS) + +tkey_keycreate_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBDNS_CFLAGS) + +tkey_keycreate_LDADD = \ + $(LDADD) \ + $(LIBDNS_LIBS) + +tkey_keydelete_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBDNS_CFLAGS) + +tkey_keydelete_LDADD = \ + $(LDADD) \ + $(LIBDNS_LIBS) + +TESTS = \ + acl additional addzone allow-query auth autosign \ + builtin cacheclean case catz cds \ + checkconf checknames checkzone \ + cookie database dlz dlzexternal \ + dns64 dscp dsdigest dyndb \ + ednscompliance emptyzones \ + filter-aaaa formerr \ + geoip2 glue idna inline integrity keepalive \ + legacy limits logfileconfig \ + masterfile masterformat metadata mirror mkeys \ + names notify nslookup \ + padding pending \ + redirect rndc rootkeysentinel rpz \ + rrchecker rrl rrsetorder rsabigexponent runtime \ + sfcache smartsign sortlist \ + spf staticstub stub synthfromdnssec \ + tools tsig tsiggss \ + unknown verify views wildcard \ + xferquota zonechecks \ + ecdsa tkey + +# eddsa test is broken +# TESTS += eddsa + +# The "stress" test is not run by default since it creates enough +# load on the machine to make it unusable to other users. +# The "dialup", "delzone", and "dupsigs" tests are also not run by +# default because they take a very long time to complete. +# TESTS += delzone dialup dupsigs stress + +if HAVE_LMDB +TESTS += nzd2nzf +endif # HAVE_LMDB + +if HAVE_PERLMOD_NET_DNS + +TESTS += \ + zero \ + digdelv \ + dnssec \ + fetchlimit \ + forward \ + ixfr \ + nsupdate \ + resolver \ + rpzrecurse \ + statistics \ + upforwd + +if HAVE_DNSTAP +TESTS += dnstap +endif + +if HAVE_PERLMOD_FILE_FETCH +TESTS += statschannel +endif HAVE_PERLMOD_FILE_FETCH + +if HAVE_PERLMOD_DIGEST_HMAC +TESTS += xfer +endif HAVE_PERLMOD_DIGEST_HMAC + +if HAVE_PERLMOD_TIME_HIRES +TESTS += serve-stale +endif HAVE_PERLMOD_TIME_HIRES + +if HAVE_PERLMOD_NET_DNS_NAMESERVER +TESTS += reclimit +endif HAVE_PERLMOD_NET_DNS_NAMESERVER + +endif HAVE_PERLMOD_NET_DNS + +if HAVE_PYTHON +TESTS += tcp pipelined + +if HAVE_PYMOD_DNS +TESTS += qmin + +if HAVE_PERLMOD_NET_DNS +if HAVE_PERLMOD_NET_DNS_NAMESERVER +TESTS += chain +endif HAVE_PERLMOD_NET_DNS_NAMESERVER +endif HAVE_PERLMOD_NET_DNS + +endif HAVE_PYMOD_DNS + +endif HAVE_PYTHON + +else !HAVE_PERL +check: + echo Perl is not available, no tests were ran + exit 1 +endif !HAVE_PERL + +LOG_COMPILER = $(builddir)/system-test-driver.sh + +clean-local: + -rm -f get_base_port.state get_base_port.lock diff --git a/bin/tests/system/README b/bin/tests/system/README index 2c338e1268..068c1107bd 100644 --- a/bin/tests/system/README +++ b/bin/tests/system/README @@ -374,7 +374,6 @@ a run of the full test suite (e.g. the tests are started with "runall.sh"). 3. Each script should start with the following lines: - SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh "conf.sh" defines a series of environment variables together with functions diff --git a/bin/tests/system/acl/setup.sh b/bin/tests/system/acl/setup.sh index e410e03df2..aff35aa2be 100644 --- a/bin/tests/system/acl/setup.sh +++ b/bin/tests/system/acl/setup.sh @@ -9,12 +9,11 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh -$SHELL ../genzone.sh 2 3 >ns2/example.db -$SHELL ../genzone.sh 2 3 >ns2/tsigzone.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 3 >ns2/example.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 3 >ns2/tsigzone.db copy_setports ns2/named1.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf copy_setports ns4/named.conf.in ns4/named.conf diff --git a/bin/tests/system/acl/tests.sh b/bin/tests/system/acl/tests.sh index fe49a86a0e..6f291bfc61 100644 --- a/bin/tests/system/acl/tests.sh +++ b/bin/tests/system/acl/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/additional/setup.sh b/bin/tests/system/additional/setup.sh index 5f43253079..557a16243c 100644 --- a/bin/tests/system/additional/setup.sh +++ b/bin/tests/system/additional/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/additional/tests.sh b/bin/tests/system/additional/tests.sh index 51c09fc99d..1221e0c6c3 100644 --- a/bin/tests/system/additional/tests.sh +++ b/bin/tests/system/additional/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/addzone/setup.sh b/bin/tests/system/addzone/setup.sh index 1a65797287..e8310f60f0 100644 --- a/bin/tests/system/addzone/setup.sh +++ b/bin/tests/system/addzone/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh cp -f ns1/redirect.db.1 ns1/redirect.db diff --git a/bin/tests/system/addzone/tests.sh b/bin/tests/system/addzone/tests.sh index cfaee81c32..4ecfd73275 100755 --- a/bin/tests/system/addzone/tests.sh +++ b/bin/tests/system/addzone/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}" @@ -720,8 +719,8 @@ $RNDCCMD 10.53.0.3 addzone "test4.baz" '{ type master; file "e.db"; };' > /dev/n $RNDCCMD 10.53.0.3 addzone "test5.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.3 addzone '"test/.baz"' '{ type master; check-names ignore; file "e.db"; };' > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.3 addzone '"test\".baz"' '{ type master; check-names ignore; file "e.db"; };' > /dev/null 2>&1 || ret=1 -$PERL $SYSTEMTESTTOP/stop.pl addzone ns3 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} addzone ns3 || ret=1 +stop addzone ns3 +start --noclean --restart --port ${PORT} addzone ns3 || ret=1 retry_quiet 10 _check_version_bind || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` diff --git a/bin/tests/system/allow-query/setup.sh b/bin/tests/system/allow-query/setup.sh index e23de36012..7c6dfe1fa5 100644 --- a/bin/tests/system/allow-query/setup.sh +++ b/bin/tests/system/allow-query/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ../common/controls.conf.in ns2/controls.conf diff --git a/bin/tests/system/allow-query/tests.sh b/bin/tests/system/allow-query/tests.sh index 479910c825..a119220c42 100644 --- a/bin/tests/system/allow-query/tests.sh +++ b/bin/tests/system/allow-query/tests.sh @@ -50,7 +50,6 @@ # as necessary. # -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}" diff --git a/bin/tests/system/auth/setup.sh b/bin/tests/system/auth/setup.sh index f3826d8683..9fa04998da 100644 --- a/bin/tests/system/auth/setup.sh +++ b/bin/tests/system/auth/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/auth/tests.sh b/bin/tests/system/auth/tests.sh index fb76d0043f..0cd1b721be 100644 --- a/bin/tests/system/auth/tests.sh +++ b/bin/tests/system/auth/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp -p ${PORT}" diff --git a/bin/tests/system/autosign/ns1/keygen.sh b/bin/tests/system/autosign/ns1/keygen.sh index 47d3eefe10..79637acd96 100644 --- a/bin/tests/system/autosign/ns1/keygen.sh +++ b/bin/tests/system/autosign/ns1/keygen.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/autosign/ns2/keygen.sh b/bin/tests/system/autosign/ns2/keygen.sh index 9d40b7fa34..e4b91838c1 100644 --- a/bin/tests/system/autosign/ns2/keygen.sh +++ b/bin/tests/system/autosign/ns2/keygen.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh # Have the child generate subdomain keys and pass DS sets to us. diff --git a/bin/tests/system/autosign/ns3/keygen.sh b/bin/tests/system/autosign/ns3/keygen.sh index a60e852d30..fd26f28b4e 100644 --- a/bin/tests/system/autosign/ns3/keygen.sh +++ b/bin/tests/system/autosign/ns3/keygen.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh SYSTESTDIR=autosign diff --git a/bin/tests/system/autosign/setup.sh b/bin/tests/system/autosign/setup.sh index 1db502d8dc..e6099c1472 100644 --- a/bin/tests/system/autosign/setup.sh +++ b/bin/tests/system/autosign/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index eadf2a7f54..5bde55e287 100755 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/builtin/setup.sh b/bin/tests/system/builtin/setup.sh index def2a615ac..e683db06d9 100644 --- a/bin/tests/system/builtin/setup.sh +++ b/bin/tests/system/builtin/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/builtin/tests.sh b/bin/tests/system/builtin/tests.sh index d400f38d4a..e4dfc60023 100644 --- a/bin/tests/system/builtin/tests.sh +++ b/bin/tests/system/builtin/tests.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/cacheclean/setup.sh b/bin/tests/system/cacheclean/setup.sh index f3826d8683..9fa04998da 100644 --- a/bin/tests/system/cacheclean/setup.sh +++ b/bin/tests/system/cacheclean/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/cacheclean/tests.sh b/bin/tests/system/cacheclean/tests.sh index ed9707a511..302c621eb3 100755 --- a/bin/tests/system/cacheclean/tests.sh +++ b/bin/tests/system/cacheclean/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/case/setup.sh b/bin/tests/system/case/setup.sh index bc5d9de9bd..1d467ac638 100644 --- a/bin/tests/system/case/setup.sh +++ b/bin/tests/system/case/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh cp -f ns1/dynamic.db.in ns1/dynamic.db diff --git a/bin/tests/system/case/tests.sh b/bin/tests/system/case/tests.sh index 8160ad8d2e..1d75acb888 100644 --- a/bin/tests/system/case/tests.sh +++ b/bin/tests/system/case/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/catz/setup.sh b/bin/tests/system/catz/setup.sh index 19e11c9dae..285cacf7f7 100644 --- a/bin/tests/system/catz/setup.sh +++ b/bin/tests/system/catz/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index d534b150fd..db533fc7a9 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -12,7 +12,6 @@ set -e # shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" dig_with_opts() { diff --git a/bin/tests/system/cds/setup.sh b/bin/tests/system/cds/setup.sh index d720ec3554..75f4a8eb1f 100644 --- a/bin/tests/system/cds/setup.sh +++ b/bin/tests/system/cds/setup.sh @@ -11,7 +11,6 @@ set -eu -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh touch empty diff --git a/bin/tests/system/cds/tests.sh b/bin/tests/system/cds/tests.sh index 35b864e72b..717af19353 100644 --- a/bin/tests/system/cds/tests.sh +++ b/bin/tests/system/cds/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/chain/ns2/sign.sh b/bin/tests/system/chain/ns2/sign.sh index d8c95d19da..a1ea0e33ad 100644 --- a/bin/tests/system/chain/ns2/sign.sh +++ b/bin/tests/system/chain/ns2/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=example. diff --git a/bin/tests/system/chain/prereq.sh b/bin/tests/system/chain/prereq.sh deleted file mode 100644 index 964360a3f8..0000000000 --- a/bin/tests/system/chain/prereq.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if test -n "$PYTHON" -then - if $PYTHON -c "import dns" 2> /dev/null - then - : - else - echo_i "This test requires the dnspython module." >&2 - exit 1 - fi -else - echo_i "This test requires Python and the dnspython module." >&2 - exit 1 -fi - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.69 && $Net::DNS::VERSION <= 0.74);' 2>/dev/null - then - : - else - echo_i "Net::DNS versions 0.69 to 0.74 have bugs that cause this test to fail: please update." >&2 - exit 1 - fi -else - echo_i "This test requires the perl Net::DNS library." >&2 - exit 1 -fi -if $PERL -e 'use Net::DNS::Nameserver;' 2>/dev/null -then - : -else - echo_i "This test requires the Net::DNS::Nameserver library." >&2 - exit 1 -fi diff --git a/bin/tests/system/chain/setup.sh b/bin/tests/system/chain/setup.sh index ae271925f7..a557b44afe 100644 --- a/bin/tests/system/chain/setup.sh +++ b/bin/tests/system/chain/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/chain/tests.sh b/bin/tests/system/chain/tests.sh index dc83fbf224..d8b17cfd0a 100644 --- a/bin/tests/system/chain/tests.sh +++ b/bin/tests/system/chain/tests.sh @@ -7,12 +7,15 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" -SEND="$PERL $SYSTEMTESTTOP/send.pl 10.53.0.4 ${EXTRAPORT1}" + +sendcmd() { + send 10.53.0.4 "${EXTRAPORT1}" +} + status=0 n=0 @@ -174,29 +177,29 @@ n=`expr $n + 1` echo_i "checking CNAME chains in various orders ($n)" ret=0 $RNDCCMD 10.53.0.7 null --- start test$n - step 1 --- 2>&1 | sed 's/^/ns7 /' | cat_i -echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | $SEND +echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1 grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.1.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 2 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "cname,cname,cname|1,1,2,2,3,4,s4,s3,s1" | $SEND +echo "cname,cname,cname|1,1,2,2,3,4,s4,s3,s1" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1 grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.2.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 3 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "cname,cname,cname|2,1,3,4,s3,s1,s2,s4" | $SEND +echo "cname,cname,cname|2,1,3,4,s3,s1,s2,s4" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1 grep 'status: NOERROR' dig.out.3.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.3.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 4 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | $SEND +echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.4.$n 2>&1 grep 'status: NOERROR' dig.out.4.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.4.$n > /dev/null 2>&1 || ret=1 -echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | $SEND +echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | sendcmd $RNDCCMD 10.53.0.7 null --- start test$n - step 5 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.5.$n 2>&1 @@ -204,7 +207,7 @@ grep 'status: NOERROR' dig.out.5.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.5.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 6 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "cname,cname,cname|4,3,3,3,s1,s1,1,3,4" | $SEND +echo "cname,cname,cname|4,3,3,3,s1,s1,1,3,4" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.6.$n 2>&1 grep 'status: NOERROR' dig.out.6.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.6.$n > /dev/null 2>&1 || ret=1 @@ -215,7 +218,7 @@ n=`expr $n + 1` echo_i "checking that only the initial CNAME is cached ($n)" ret=0 $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | $SEND +echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | sendcmd $RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1 sleep 1 @@ -230,19 +233,19 @@ echo_i "checking DNAME chains in various orders ($n)" ret=0 $RNDCCMD 10.53.0.7 null --- start test$n - step 1 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | $SEND +echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1 grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 3' dig.out.1.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 2 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | $SEND +echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1 grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 3' dig.out.2.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 3 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "dname,dname|2,3,s1,s2,s3,s4,1" | $SEND +echo "dname,dname|2,3,s1,s2,s3,s4,1" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1 grep 'status: NOERROR' dig.out.3.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 3' dig.out.3.$n > /dev/null 2>&1 || ret=1 @@ -254,19 +257,19 @@ n=`expr $n + 1` echo_i "checking external CNAME/DNAME chains in various orders ($n)" ret=0 $RNDCCMD 10.53.0.7 null --- start test$n - step 1 --- 2>&1 | sed 's/^/ns7 /' | cat_i -echo "xname,dname|1,2,3,4,s1,s2,s3,s4" | $SEND +echo "xname,dname|1,2,3,4,s1,s2,s3,s4" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1 grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.1.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 2 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "xname,dname|s2,2,s1,1,4,s4,3" | $SEND +echo "xname,dname|s2,2,s1,1,4,s4,3" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1 grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1 grep 'ANSWER: 2' dig.out.2.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 null --- start test$n - step 3 --- 2>&1 | sed 's/^/ns7 /' | cat_i $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i -echo "xname,dname|s2,2,2,2" | $SEND +echo "xname,dname|s2,2,2,2" | sendcmd $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1 grep 'status: SERVFAIL' dig.out.3.$n > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i diff --git a/bin/tests/system/checkconf/tests.sh b/bin/tests/system/checkconf/tests.sh index 270975bfe6..0b62e27b71 100644 --- a/bin/tests/system/checkconf/tests.sh +++ b/bin/tests/system/checkconf/tests.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/checknames/setup.sh b/bin/tests/system/checknames/setup.sh index 28d0c44825..15f597c829 100644 --- a/bin/tests/system/checknames/setup.sh +++ b/bin/tests/system/checknames/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/checknames/tests.sh b/bin/tests/system/checknames/tests.sh index 74f783e4d3..39c91ddebf 100644 --- a/bin/tests/system/checknames/tests.sh +++ b/bin/tests/system/checknames/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/checkzone/setup.sh b/bin/tests/system/checkzone/setup.sh index 6814431805..96f32bb596 100644 --- a/bin/tests/system/checkzone/setup.sh +++ b/bin/tests/system/checkzone/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh ln -s $CHECKZONE named-compilezone diff --git a/bin/tests/system/checkzone/tests.sh b/bin/tests/system/checkzone/tests.sh index 0ba9d5dc46..3735689f71 100644 --- a/bin/tests/system/checkzone/tests.sh +++ b/bin/tests/system/checkzone/tests.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index f34f86e728..992df57421 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -12,7 +12,7 @@ testsock6() { if test -n "$PERL" && $PERL -e "use IO::Socket::INET6;" 2> /dev/null then - $PERL "$TOP/bin/tests/system/testsock6.pl" "$@" + $PERL "$TOP_SRCDIR/bin/tests/system/testsock6.pl" "$@" else false fi @@ -20,7 +20,6 @@ testsock6() { export LANG=C -. ${TOP}/version # # Common lists of system tests to run. @@ -187,12 +186,24 @@ cat_d() { } digcomp() { - output=`$PERL $SYSTEMTESTTOP/digcomp.pl "$@"` + output=`$PERL $TOP_SRCDIR/bin/tests/system/digcomp.pl "$@"` result=$? [ -n "$output" ] && { echo "digcomp failed:"; echo "$output"; } | cat_i return $result } +start() { + $PERL "$TOP_SRCDIR/bin/tests/system/start.pl" "$@" +} + +stop() { + $PERL "$TOP_SRCDIR/bin/tests/system/stop.pl" "$@" +} + +send() { + $PERL "$TOP_SRCDIR/bin/tests/system/send.pl" "$@" +} + # # Useful variables in test scripts # diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 5bd08cc8d6..65dbdeddb2 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -15,7 +15,8 @@ # # Find the top of the BIND9 tree. -TOP=@abs_top_builddir@ +TOP_BUILDDIR=@abs_top_builddir@ +TOP_SRCDIR=@abs_top_srcdir@ # Provide TMPDIR variable for tests that need it. TMPDIR=${TMPDIR:-/tmp} @@ -24,51 +25,51 @@ TMPDIR=${TMPDIR:-/tmp} CYGWIN="" # Load common values shared between windows and unix/linux. -. $TOP/bin/tests/system/conf.sh.common +. $TOP_SRCDIR/bin/tests/system/conf.sh.common -ARPANAME=$TOP/bin/tools/arpaname -CDS=$TOP/bin/dnssec/dnssec-cds -CHECKCONF=$TOP/bin/check/named-checkconf -CHECKZONE=$TOP/bin/check/named-checkzone -DDNSCONFGEN=$TOP/bin/confgen/ddns-confgen -DELV=$TOP/bin/delv/delv -DIG=$TOP/bin/dig/dig -DNSTAPREAD=$TOP/bin/tools/dnstap-read -DSFROMKEY=$TOP/bin/dnssec/dnssec-dsfromkey -FEATURETEST=$TOP/bin/tests/system/feature-test +ARPANAME=$TOP_BUILDDIR/bin/tools/arpaname +CDS=$TOP_BUILDDIR/bin/dnssec/dnssec-cds +CHECKCONF=$TOP_BUILDDIR/bin/check/named-checkconf +CHECKZONE=$TOP_BUILDDIR/bin/check/named-checkzone +DDNSCONFGEN=$TOP_BUILDDIR/bin/confgen/ddns-confgen +DELV=$TOP_BUILDDIR/bin/delv/delv +DIG=$TOP_BUILDDIR/bin/dig/dig +DNSTAPREAD=$TOP_BUILDDIR/bin/tools/dnstap-read +DSFROMKEY=$TOP_BUILDDIR/bin/dnssec/dnssec-dsfromkey +FEATURETEST=$TOP_BUILDDIR/bin/tests/system/feature-test FSTRM_CAPTURE=@FSTRM_CAPTURE@ -HOST=$TOP/bin/dig/host -IMPORTKEY=$TOP/bin/dnssec/dnssec-importkey -JOURNALPRINT=$TOP/bin/tools/named-journalprint -KEYFRLAB=$TOP/bin/dnssec/dnssec-keyfromlabel -KEYGEN=$TOP/bin/dnssec/dnssec-keygen -MDIG=$TOP/bin/tools/mdig -NAMED=$TOP/bin/named/named -NSEC3HASH=$TOP/bin/tools/nsec3hash -NSLOOKUP=$TOP/bin/dig/nslookup -NSUPDATE=$TOP/bin/nsupdate/nsupdate -NZD2NZF=$TOP/bin/tools/named-nzd2nzf -PK11DEL="$TOP/bin/pkcs11/pkcs11-destroy -s ${SLOT:-0} -p ${HSMPIN:-1234} -w 0" -PK11GEN="$TOP/bin/pkcs11/pkcs11-keygen -q -s ${SLOT:-0} -p ${HSMPIN:-1234}" -PK11LIST="$TOP/bin/pkcs11/pkcs11-list -s ${SLOT:-0} -p ${HSMPIN:-1234}" -RESOLVE=$TOP/lib/samples/resolve -REVOKE=$TOP/bin/dnssec/dnssec-revoke -RNDC=$TOP/bin/rndc/rndc -RNDCCONFGEN=$TOP/bin/confgen/rndc-confgen -RRCHECKER=$TOP/bin/tools/named-rrchecker -SETTIME=$TOP/bin/dnssec/dnssec-settime -SIGNER=$TOP/bin/dnssec/dnssec-signzone -TSIGKEYGEN=$TOP/bin/confgen/tsig-keygen -VERIFY=$TOP/bin/dnssec/dnssec-verify -WIRETEST=$TOP/bin/tests/wire_test +HOST=$TOP_BUILDDIR/bin/dig/host +IMPORTKEY=$TOP_BUILDDIR/bin/dnssec/dnssec-importkey +JOURNALPRINT=$TOP_BUILDDIR/bin/tools/named-journalprint +KEYFRLAB=$TOP_BUILDDIR/bin/dnssec/dnssec-keyfromlabel +KEYGEN=$TOP_BUILDDIR/bin/dnssec/dnssec-keygen +MDIG=$TOP_BUILDDIR/bin/tools/mdig +NAMED=$TOP_BUILDDIR/bin/named/named +NSEC3HASH=$TOP_BUILDDIR/bin/tools/nsec3hash +NSLOOKUP=$TOP_BUILDDIR/bin/dig/nslookup +NSUPDATE=$TOP_BUILDDIR/bin/nsupdate/nsupdate +NZD2NZF=$TOP_BUILDDIR/bin/tools/named-nzd2nzf +PK11DEL="$TOP_BUILDDIR/bin/pkcs11/pkcs11-destroy -s ${SLOT:-0} -p ${HSMPIN:-1234} -w 0" +PK11GEN="$TOP_BUILDDIR/bin/pkcs11/pkcs11-keygen -q -s ${SLOT:-0} -p ${HSMPIN:-1234}" +PK11LIST="$TOP_BUILDDIR/bin/pkcs11/pkcs11-list -s ${SLOT:-0} -p ${HSMPIN:-1234}" +RESOLVE=$TOP_BUILDDIR/lib/samples/resolve +REVOKE=$TOP_BUILDDIR/bin/dnssec/dnssec-revoke +RNDC=$TOP_BUILDDIR/bin/rndc/rndc +RNDCCONFGEN=$TOP_BUILDDIR/bin/confgen/rndc-confgen +RRCHECKER=$TOP_BUILDDIR/bin/tools/named-rrchecker +SETTIME=$TOP_BUILDDIR/bin/dnssec/dnssec-settime +SIGNER=$TOP_BUILDDIR/bin/dnssec/dnssec-signzone +TSIGKEYGEN=$TOP_BUILDDIR/bin/confgen/tsig-keygen +VERIFY=$TOP_BUILDDIR/bin/dnssec/dnssec-verify +WIRETEST=$TOP_BUILDDIR/bin/tests/wire_test -BIGKEY=$TOP/bin/tests/system/rsabigexponent/bigkey -GENCHECK=$TOP/bin/tests/system/rndc/gencheck -KEYCREATE=$TOP/bin/tests/system/tkey/keycreate -KEYDELETE=$TOP/bin/tests/system/tkey/keydelete -MAKEJOURNAL=$TOP/bin/tests/makejournal -PIPEQUERIES=$TOP/bin/tests/system/pipelined/pipequeries -SAMPLEUPDATE=$TOP/lib/samples/sample-update +BIGKEY=$TOP_BUILDDIR/bin/tests/system/rsabigexponent/bigkey +GENCHECK=$TOP_BUILDDIR/bin/tests/system/rndc/gencheck +KEYCREATE=$TOP_BUILDDIR/bin/tests/system/tkey/keycreate +KEYDELETE=$TOP_BUILDDIR/bin/tests/system/tkey/keydelete +MAKEJOURNAL=$TOP_BUILDDIR/bin/tests/system/makejournal +PIPEQUERIES=$TOP_BUILDDIR/bin/tests/system/pipelined/pipequeries +SAMPLEUPDATE=$TOP_BUILDDIR/lib/samples/sample-update # we don't want a KRB5_CONFIG setting breaking the tests KRB5_CONFIG=/dev/null @@ -123,5 +124,6 @@ MAXMINDDB_LIBS="@MAXMINDDB_LIBS@" HAVEGEOIP2=${MAXMINDDB_LIBS:+1} ZLIB_LIBS="@ZLIB_LIBS@" HAVEZLIB=${ZLIB_LIBS:+1} -NZD=@NZD_TOOLS@ +LMDB_LIBS="@LMDB_LIBS@" +NZD=${LMDB_LIBS:+1} CRYPTO=@CRYPTO@ diff --git a/bin/tests/system/cookie/setup.sh b/bin/tests/system/cookie/setup.sh index 137db93e51..ecc72c0276 100644 --- a/bin/tests/system/cookie/setup.sh +++ b/bin/tests/system/cookie/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/cookie/tests.sh b/bin/tests/system/cookie/tests.sh index 8e71103942..3871fd37f9 100755 --- a/bin/tests/system/cookie/tests.sh +++ b/bin/tests/system/cookie/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/database/setup.sh b/bin/tests/system/database/setup.sh index 8aa0d68bc1..303e87e5ea 100644 --- a/bin/tests/system/database/setup.sh +++ b/bin/tests/system/database/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named1.conf.in ns1/named.conf diff --git a/bin/tests/system/database/tests.sh b/bin/tests/system/database/tests.sh index 7fa9337bca..e70de1ac0c 100644 --- a/bin/tests/system/database/tests.sh +++ b/bin/tests/system/database/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/delzone/setup.sh b/bin/tests/system/delzone/setup.sh index 1405375c03..20a115a4d0 100644 --- a/bin/tests/system/delzone/setup.sh +++ b/bin/tests/system/delzone/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/delzone/tests.sh b/bin/tests/system/delzone/tests.sh index dd0a2dec18..9a94212e11 100755 --- a/bin/tests/system/delzone/tests.sh +++ b/bin/tests/system/delzone/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p 5300" diff --git a/bin/tests/system/dialup/tests.sh b/bin/tests/system/dialup/tests.sh index a910783f5c..a0f622fe84 100644 --- a/bin/tests/system/dialup/tests.sh +++ b/bin/tests/system/dialup/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/digdelv/clean.sh b/bin/tests/system/digdelv/clean.sh index f895977f29..7e0f861086 100644 --- a/bin/tests/system/digdelv/clean.sh +++ b/bin/tests/system/digdelv/clean.sh @@ -26,3 +26,4 @@ rm -f ./ns*/named.lock rm -f ./ns*/managed-keys.bind* rm -f ./ns2/example.db ./ns2/K* ./ns2/keyid ./ns2/keydata rm -f ./*/anchor.* +rm -f ./ns2/dsset-example. diff --git a/bin/tests/system/digdelv/prereq.sh b/bin/tests/system/digdelv/prereq.sh deleted file mode 100644 index 3db8235fde..0000000000 --- a/bin/tests/system/digdelv/prereq.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# shellcheck source=conf.sh -. "$SYSTEMTESTTOP/conf.sh" - -set -e - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo "I:This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 13950f9111..bd8aab4c44 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -10,7 +10,6 @@ # information regarding copyright ownership. # shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e @@ -19,7 +18,7 @@ status=0 n=0 sendcmd() { - "$PERL" "$SYSTEMTESTTOP/send.pl" "${1}" "$EXTRAPORT1" + send "${1}" "$EXTRAPORT1" } dig_with_opts() { diff --git a/bin/tests/system/dlz/prereq.sh b/bin/tests/system/dlz/prereq.sh index fb3328e409..c45c2b2c4c 100644 --- a/bin/tests/system/dlz/prereq.sh +++ b/bin/tests/system/dlz/prereq.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh if ! $FEATURETEST --with-dlz-filesystem; then diff --git a/bin/tests/system/dlz/setup.sh b/bin/tests/system/dlz/setup.sh index 7e606316f4..bf1af390f2 100644 --- a/bin/tests/system/dlz/setup.sh +++ b/bin/tests/system/dlz/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/dlz/tests.sh b/bin/tests/system/dlz/tests.sh index 78f74dc0c6..e0be7c0a75 100644 --- a/bin/tests/system/dlz/tests.sh +++ b/bin/tests/system/dlz/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/dlzexternal/driver/Makefile.am b/bin/tests/system/dlzexternal/driver/Makefile.am new file mode 100644 index 0000000000..418ec59de0 --- /dev/null +++ b/bin/tests/system/dlzexternal/driver/Makefile.am @@ -0,0 +1,13 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) + +dlzexternal_LTLIBRARIES = dlzexternal.la +dlzexternaldir = $(abs_builddir) + +dlzexternal_la_SOURCES = \ + driver.c + +dlzexternal_la_LDFLAGS = -avoid-version -module -shared -export-dynamic diff --git a/bin/tests/system/dlzexternal/driver.c b/bin/tests/system/dlzexternal/driver/driver.c similarity index 93% rename from bin/tests/system/dlzexternal/driver.c rename to bin/tests/system/dlzexternal/driver/driver.c index 443f22a223..1287d79564 100644 --- a/bin/tests/system/dlzexternal/driver.c +++ b/bin/tests/system/dlzexternal/driver/driver.c @@ -30,6 +30,38 @@ #include #include +/* aliases for exported symbols */ + +#define dlz_version dlzexternal_LTX_dlz_version +#define dlz_create dlzexternal_LTX_dlz_create +#define dlz_destroy dlzexternal_LTX_dlz_destroy +#define dlz_findzonedb dlzexternal_LTX_dlz_findzonedb +#define dlz_lookup dlzexternal_LTX_dlz_lookup +#define dlz_allowzonexfr dlzexternal_LTX_dlz_allowzonexfr +#define dlz_allnodes dlzexternal_LTX_dlz_allnodes +#define dlz_newversion dlzexternal_LTX_dlz_newversion +#define dlz_closeversion dlzexternal_LTX_dlz_closeversion +#define dlz_configure dlzexternal_LTX_dlz_configure +#define dlz_ssumatch dlzexternal_LTX_dlz_ssumatch +#define dlz_addrdataset dlzexternal_LTX_dlz_addrdataset +#define dlz_sbrdataset dlzexternal_LTX_dlz_sbrdataset +#define dlz_delrdataset dlzexternal_LTX_dlz_delrdataset + +dlz_dlopen_version_t dlz_version; +dlz_dlopen_create_t dlz_create; +dlz_dlopen_destroy_t dlz_destroy; +dlz_dlopen_findzonedb_t dlz_findzonedb; +dlz_dlopen_lookup_t dlz_lookup; +dlz_dlopen_allowzonexfr_t dlz_allowzonexfr; +dlz_dlopen_allnodes_t dlz_allnodes; +dlz_dlopen_newversion_t dlz_newversion; +dlz_dlopen_closeversion_t dlz_closeversion; +dlz_dlopen_configure_t dlz_configure; +dlz_dlopen_ssumatch_t dlz_ssumatch; +dlz_dlopen_addrdataset_t dlz_addrdataset; +dlz_dlopen_subrdataset_t dlz_subrdataset; +dlz_dlopen_delrdataset_t dlz_delrdataset; + #define CHECK(x) \ do { \ result = (x); \ diff --git a/bin/tests/system/dlzexternal/driver.h b/bin/tests/system/dlzexternal/driver/driver.h similarity index 100% rename from bin/tests/system/dlzexternal/driver.h rename to bin/tests/system/dlzexternal/driver/driver.h diff --git a/bin/tests/system/dlzexternal/ns1/dlzs.conf.in b/bin/tests/system/dlzexternal/ns1/dlzs.conf.in deleted file mode 100644 index 07bf329b50..0000000000 --- a/bin/tests/system/dlzexternal/ns1/dlzs.conf.in +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -dlz "example one" { - database "dlopen ../driver.@SO@ example.nil"; -}; - -dlz "example two" { - database "dlopen ../driver.@SO@ alternate.nil"; -}; - -dlz "example three" { - database "dlopen ../driver.@SO@ example.org"; -}; - -dlz "unsearched1" { - database "dlopen ../driver.@SO@ other.nil"; - search no; -}; - -dlz "unsearched2" { - database "dlopen ../driver.@SO@ zone.nil"; - search no; -}; - -dlz redzone { - database "dlopen ../driver.@SO@ ."; - search no; -}; diff --git a/bin/tests/system/dlzexternal/ns1/named.conf.in b/bin/tests/system/dlzexternal/ns1/named.conf.in index 591061cb85..89b21812fb 100644 --- a/bin/tests/system/dlzexternal/ns1/named.conf.in +++ b/bin/tests/system/dlzexternal/ns1/named.conf.in @@ -34,7 +34,32 @@ controls { inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; }; }; -include "dlzs.conf"; +dlz "example one" { + database "dlopen ../driver/dlzexternal.la example.nil"; +}; + +dlz "example two" { + database "dlopen ../driver/dlzexternal.la alternate.nil"; +}; + +dlz "example three" { + database "dlopen ../driver/dlzexternal.la example.org"; +}; + +dlz "unsearched1" { + database "dlopen ../driver/dlzexternal.la other.nil"; + search no; +}; + +dlz "unsearched2" { + database "dlopen ../driver/dlzexternal.la zone.nil"; + search no; +}; + +dlz redzone { + database "dlopen ../driver/dlzexternal.la ."; + search no; +}; zone zone.nil { type master; diff --git a/bin/tests/system/dlzexternal/prereq.sh b/bin/tests/system/dlzexternal/prereq.sh index b3c73c33b5..a0ef5dfc90 100644 --- a/bin/tests/system/dlzexternal/prereq.sh +++ b/bin/tests/system/dlzexternal/prereq.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $FEATURETEST --have-dlopen || { diff --git a/bin/tests/system/dlzexternal/setup.sh b/bin/tests/system/dlzexternal/setup.sh index 6efd940092..063cdba5ab 100644 --- a/bin/tests/system/dlzexternal/setup.sh +++ b/bin/tests/system/dlzexternal/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $DDNSCONFGEN -q -z example.nil > ns1/ddns.key diff --git a/bin/tests/system/dlzexternal/tests.sh b/bin/tests/system/dlzexternal/tests.sh index b9d44057be..d843fa117b 100644 --- a/bin/tests/system/dlzexternal/tests.sh +++ b/bin/tests/system/dlzexternal/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/dns64/ns1/sign.sh b/bin/tests/system/dns64/ns1/sign.sh index 17688fc772..c0c32e0418 100644 --- a/bin/tests/system/dns64/ns1/sign.sh +++ b/bin/tests/system/dns64/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=signed diff --git a/bin/tests/system/dns64/setup.sh b/bin/tests/system/dns64/setup.sh index e088b804d9..f2c1131a1d 100644 --- a/bin/tests/system/dns64/setup.sh +++ b/bin/tests/system/dns64/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/dns64/tests.sh b/bin/tests/system/dns64/tests.sh index ce5287efc6..fbe9ad71dc 100644 --- a/bin/tests/system/dns64/tests.sh +++ b/bin/tests/system/dns64/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/dnssec/prereq.sh b/bin/tests/system/dnssec/prereq.sh deleted file mode 100644 index b2e8ff200c..0000000000 --- a/bin/tests/system/dnssec/prereq.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# shellcheck source=conf.sh -. "$SYSTEMTESTTOP/conf.sh" - -set -e - -if "$PERL" -e 'use Net::DNS;' 2>/dev/null -then - # shellcheck disable=SC2016 - if "$PERL" -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.69 && $Net::DNS::VERSION <= 0.70);' 2>/dev/null - then - : - else - echo_i "Net::DNS versions 0.69 to 0.70 have bugs that cause this test to fail: please update." >&2 - exit 1 - fi -fi - -exit 0 diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 03dd256589..7d70abac1e 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -10,7 +10,6 @@ # information regarding copyright ownership. # shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e @@ -2058,7 +2057,7 @@ echo_i "waiting till 14s have passed since NTAs were added before restarting ns4 $PERL -e 'my $delay = '"$start"' + 14 - time(); select(undef, undef, undef, $delay) if ($delay > 0);' if - $PERL "$SYSTEMTESTTOP/start.pl" --noclean --restart --port "$PORT" dnssec ns4 + start --noclean --restart --port "$PORT" dnssec ns4 then echo_i "restarted server ns4" else @@ -2124,7 +2123,7 @@ echo "secure.example. regular $future" > ns4/_default.nta start=$($PERL -e 'print time()."\n";') if - $PERL "$SYSTEMTESTTOP/start.pl" --noclean --restart --port "$PORT" dnssec ns4 + start --noclean --restart --port "$PORT" dnssec ns4 then echo_i "restarted server ns4" else @@ -2180,7 +2179,7 @@ echo "secure.example. forced $future" > ns4/_default.nta start=$($PERL -e 'print time()."\n";') if - $PERL "$SYSTEMTESTTOP/start.pl" --noclean --restart --port "$PORT" dnssec ns4 + start --noclean --restart --port "$PORT" dnssec ns4 then echo_i "restarted server ns4" else @@ -2228,7 +2227,7 @@ echo "secure.example. forced $future" > ns4/_default.nta added=$($PERL -e 'print time()."\n";') if - $PERL "$SYSTEMTESTTOP/start.pl" --noclean --restart --port "$PORT" dnssec ns4 + start --noclean --restart --port "$PORT" dnssec ns4 then echo_i "restarted server ns4" else @@ -3789,7 +3788,7 @@ grep "trust-anchor-telemetry './IN' from .* 65534" ns1/named.run > /dev/null || grep "trust-anchor-telemetry './IN' from .* 65533" ns1/named.run > /dev/null && ret=1 $PERL $SYSTEMTESTTOP/stop.pl dnssec ns1 || ret=1 nextpart ns1/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} dnssec ns1 || ret=1 +start --noclean --restart --port ${PORT} dnssec ns1 || ret=1 n=$(($n+1)) test "$ret" -eq 0 || echo_i "failed" status=$((status+ret)) diff --git a/bin/tests/system/dnstap/setup.sh b/bin/tests/system/dnstap/setup.sh index f44ffc68c9..53c207eedb 100644 --- a/bin/tests/system/dnstap/setup.sh +++ b/bin/tests/system/dnstap/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/dnstap/tests.sh b/bin/tests/system/dnstap/tests.sh index 9fe748d3f6..d7d80a6134 100644 --- a/bin/tests/system/dnstap/tests.sh +++ b/bin/tests/system/dnstap/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+short -p ${PORT}" diff --git a/bin/tests/system/dscp/setup.sh b/bin/tests/system/dscp/setup.sh index 87951d7c9c..60ed4a345d 100644 --- a/bin/tests/system/dscp/setup.sh +++ b/bin/tests/system/dscp/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/dscp/tests.sh b/bin/tests/system/dscp/tests.sh index e8a20f5b50..2d2d6d240d 100644 --- a/bin/tests/system/dscp/tests.sh +++ b/bin/tests/system/dscp/tests.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest -p ${PORT}" diff --git a/bin/tests/system/dsdigest/ns1/sign.sh b/bin/tests/system/dsdigest/ns1/sign.sh index 9f0ef6b036..ccf14bcd8e 100644 --- a/bin/tests/system/dsdigest/ns1/sign.sh +++ b/bin/tests/system/dsdigest/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/dsdigest/ns2/sign.sh b/bin/tests/system/dsdigest/ns2/sign.sh index 814a8c7143..4d2ea08dff 100644 --- a/bin/tests/system/dsdigest/ns2/sign.sh +++ b/bin/tests/system/dsdigest/ns2/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone1=good diff --git a/bin/tests/system/dsdigest/setup.sh b/bin/tests/system/dsdigest/setup.sh index e8a39a0196..e7308b015a 100644 --- a/bin/tests/system/dsdigest/setup.sh +++ b/bin/tests/system/dsdigest/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/dsdigest/tests.sh b/bin/tests/system/dsdigest/tests.sh index 8f9eb58138..b254fd970c 100644 --- a/bin/tests/system/dsdigest/tests.sh +++ b/bin/tests/system/dsdigest/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/dupsigs/ns1/reset_keys.sh b/bin/tests/system/dupsigs/ns1/reset_keys.sh index 7e0f5a421d..984d68ba97 100644 --- a/bin/tests/system/dupsigs/ns1/reset_keys.sh +++ b/bin/tests/system/dupsigs/ns1/reset_keys.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=signing.test diff --git a/bin/tests/system/dupsigs/setup.sh b/bin/tests/system/dupsigs/setup.sh index ba7af73c47..e35a82962e 100644 --- a/bin/tests/system/dupsigs/setup.sh +++ b/bin/tests/system/dupsigs/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/dupsigs/tests.sh b/bin/tests/system/dupsigs/tests.sh index 80ddaeaf11..5ea9279ea7 100644 --- a/bin/tests/system/dupsigs/tests.sh +++ b/bin/tests/system/dupsigs/tests.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/dyndb/driver/Makefile.am b/bin/tests/system/dyndb/driver/Makefile.am new file mode 100644 index 0000000000..c8751239d8 --- /dev/null +++ b/bin/tests/system/dyndb/driver/Makefile.am @@ -0,0 +1,19 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) + +dyndb_LTLIBRARIES = sample.la +dyndbdir = $(abs_builddir) + +sample_la_SOURCES = \ + db.c \ + driver.c \ + instance.c \ + lock.c \ + log.c \ + syncptr.c \ + zone.c + +sample_la_LDFLAGS = -avoid-version -module -shared -export-dynamic diff --git a/bin/tests/system/dyndb/driver/driver.c b/bin/tests/system/dyndb/driver/driver.c index 4d287e0c82..0ed2937bce 100644 --- a/bin/tests/system/dyndb/driver/driver.c +++ b/bin/tests/system/dyndb/driver/driver.c @@ -31,6 +31,12 @@ #include "log.h" #include "util.h" +/* aliases for the exported symbols */ + +#define dyndb_init sample_LTX_dyndb_init +#define dyndb_destroy sample_LTX_dyndb_destroy +#define dyndb_version sample_LTX_dyndb_version + dns_dyndb_destroy_t dyndb_destroy; dns_dyndb_register_t dyndb_init; dns_dyndb_version_t dyndb_version; diff --git a/bin/tests/system/dyndb/ns1/named.conf.in b/bin/tests/system/dyndb/ns1/named.conf.in index dde4a4de1c..49828ef620 100644 --- a/bin/tests/system/dyndb/ns1/named.conf.in +++ b/bin/tests/system/dyndb/ns1/named.conf.in @@ -33,5 +33,5 @@ controls { inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; }; }; -dyndb sample "../driver/lib/sample.so" { ipv4.example.nil. in-addr.arpa. }; -dyndb sample2 "../driver/lib/sample.so" { ipv6.example.nil. 8.b.d.0.1.0.0.2.ip6.arpa. }; +dyndb sample "../driver/sample.la" { ipv4.example.nil. in-addr.arpa. }; +dyndb sample2 "../driver/sample.la" { ipv6.example.nil. 8.b.d.0.1.0.0.2.ip6.arpa. }; diff --git a/bin/tests/system/dyndb/prereq.sh b/bin/tests/system/dyndb/prereq.sh index 76af4655f8..dcdb4b9b85 100644 --- a/bin/tests/system/dyndb/prereq.sh +++ b/bin/tests/system/dyndb/prereq.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $FEATURETEST --have-dlopen || { diff --git a/bin/tests/system/dyndb/setup.sh b/bin/tests/system/dyndb/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/dyndb/setup.sh +++ b/bin/tests/system/dyndb/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/dyndb/tests.sh b/bin/tests/system/dyndb/tests.sh index 4215b1d40e..313204c00c 100644 --- a/bin/tests/system/dyndb/tests.sh +++ b/bin/tests/system/dyndb/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/ednscompliance/setup.sh b/bin/tests/system/ednscompliance/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/ednscompliance/setup.sh +++ b/bin/tests/system/ednscompliance/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/ednscompliance/tests.sh b/bin/tests/system/ednscompliance/tests.sh index 186dcd1bfe..515db8aaf5 100644 --- a/bin/tests/system/ednscompliance/tests.sh +++ b/bin/tests/system/ednscompliance/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+norec -p ${PORT}" diff --git a/bin/tests/system/emptyzones/setup.sh b/bin/tests/system/emptyzones/setup.sh index e842d2c158..69eebf319a 100644 --- a/bin/tests/system/emptyzones/setup.sh +++ b/bin/tests/system/emptyzones/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/emptyzones/tests.sh b/bin/tests/system/emptyzones/tests.sh index cf53e0a2dd..93ee6334ae 100644 --- a/bin/tests/system/emptyzones/tests.sh +++ b/bin/tests/system/emptyzones/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c index 204d612bd7..65a588f47e 100644 --- a/bin/tests/system/feature-test.c +++ b/bin/tests/system/feature-test.c @@ -33,7 +33,7 @@ #endif /* ifndef MAXHOSTNAMELEN */ static void -usage() { +usage(void) { fprintf(stderr, "usage: feature-test \n"); fprintf(stderr, "args:\n"); fprintf(stderr, " --edns-version\n"); @@ -103,19 +103,15 @@ main(int argc, char **argv) { } if (strcmp(argv[1], "--gssapi") == 0) { -#if defined(GSSAPI) +#if HAVE_GSSAPI return (0); -#else /* if defined(GSSAPI) */ +#else /* HAVE_GSSAPI */ return (1); -#endif /* if defined(GSSAPI) */ +#endif /* HAVE_GSSAPI */ } if (strcmp(argv[1], "--have-dlopen") == 0) { -#if defined(HAVE_DLOPEN) && defined(ISC_DLZ_DLOPEN) return (0); -#else /* if defined(HAVE_DLOPEN) && defined(ISC_DLZ_DLOPEN) */ - return (1); -#endif /* if defined(HAVE_DLOPEN) && defined(ISC_DLZ_DLOPEN) */ } if (strcmp(argv[1], "--have-geoip2") == 0) { diff --git a/bin/tests/system/fetchlimit/prereq.sh b/bin/tests/system/fetchlimit/prereq.sh deleted file mode 100644 index de147a4c2a..0000000000 --- a/bin/tests/system/fetchlimit/prereq.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo "I:This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/fetchlimit/setup.sh b/bin/tests/system/fetchlimit/setup.sh index 25d8b5d861..c4e16dd4bd 100644 --- a/bin/tests/system/fetchlimit/setup.sh +++ b/bin/tests/system/fetchlimit/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/fetchlimit/tests.sh b/bin/tests/system/fetchlimit/tests.sh index 6d928eebc4..027a439976 100644 --- a/bin/tests/system/fetchlimit/tests.sh +++ b/bin/tests/system/fetchlimit/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGCMD="$DIG @10.53.0.3 -p ${PORT} +tcp +tries=1 +time=1" diff --git a/bin/tests/system/filter-aaaa/conf/bad1.conf b/bin/tests/system/filter-aaaa/conf/bad1.conf index 3e117325e2..97ce0dcad7 100644 --- a/bin/tests/system/filter-aaaa/conf/bad1.conf +++ b/bin/tests/system/filter-aaaa/conf/bad1.conf @@ -9,7 +9,7 @@ * information regarding copyright ownership. */ -plugin query "../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; filter-aaaa { none; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/bad2.conf b/bin/tests/system/filter-aaaa/conf/bad2.conf index 3298bd3232..a9410aa523 100644 --- a/bin/tests/system/filter-aaaa/conf/bad2.conf +++ b/bin/tests/system/filter-aaaa/conf/bad2.conf @@ -9,7 +9,7 @@ * information regarding copyright ownership. */ -plugin query "../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../plugins/filter-aaaa.la" { /* * While this matches the defaults, it is not a good configuration * to have in named.conf as the two options contradict each other diff --git a/bin/tests/system/filter-aaaa/conf/bad3.conf b/bin/tests/system/filter-aaaa/conf/bad3.conf index 202091fe6a..091cf147aa 100644 --- a/bin/tests/system/filter-aaaa/conf/bad3.conf +++ b/bin/tests/system/filter-aaaa/conf/bad3.conf @@ -10,7 +10,7 @@ */ view myview { - plugin query "../../../plugins/lib/filter-aaaa.so" { + plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 no; filter-aaaa { any; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/bad4.conf b/bin/tests/system/filter-aaaa/conf/bad4.conf index 759fbf7c5e..a21ac4fdfb 100644 --- a/bin/tests/system/filter-aaaa/conf/bad4.conf +++ b/bin/tests/system/filter-aaaa/conf/bad4.conf @@ -10,7 +10,7 @@ */ view myview { - plugin query "../../../plugins/lib/filter-aaaa.so" { + plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; filter-aaaa { none; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/bad5.conf b/bin/tests/system/filter-aaaa/conf/bad5.conf index ea807d3fbd..54c3abb9ee 100644 --- a/bin/tests/system/filter-aaaa/conf/bad5.conf +++ b/bin/tests/system/filter-aaaa/conf/bad5.conf @@ -9,7 +9,7 @@ * information regarding copyright ownership. */ -plugin query "../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/good1.conf b/bin/tests/system/filter-aaaa/conf/good1.conf index 953e975825..9f29bfd15b 100644 --- a/bin/tests/system/filter-aaaa/conf/good1.conf +++ b/bin/tests/system/filter-aaaa/conf/good1.conf @@ -9,6 +9,6 @@ * information regarding copyright ownership. */ -plugin query "../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; }; diff --git a/bin/tests/system/filter-aaaa/conf/good2.conf b/bin/tests/system/filter-aaaa/conf/good2.conf index 997d5e9fcb..93c7abdb48 100644 --- a/bin/tests/system/filter-aaaa/conf/good2.conf +++ b/bin/tests/system/filter-aaaa/conf/good2.conf @@ -9,6 +9,6 @@ * information regarding copyright ownership. */ -plugin query "../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 break-dnssec; }; diff --git a/bin/tests/system/filter-aaaa/conf/good3.conf b/bin/tests/system/filter-aaaa/conf/good3.conf index 2fa677fa10..853f341aa1 100644 --- a/bin/tests/system/filter-aaaa/conf/good3.conf +++ b/bin/tests/system/filter-aaaa/conf/good3.conf @@ -9,7 +9,7 @@ * information regarding copyright ownership. */ -plugin query "../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/good4.conf b/bin/tests/system/filter-aaaa/conf/good4.conf index 92c7be6288..dad7b5bfc3 100644 --- a/bin/tests/system/filter-aaaa/conf/good4.conf +++ b/bin/tests/system/filter-aaaa/conf/good4.conf @@ -9,7 +9,7 @@ * information regarding copyright ownership. */ -plugin query "../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/good5.conf b/bin/tests/system/filter-aaaa/conf/good5.conf index e88c515789..c26e57a5d6 100644 --- a/bin/tests/system/filter-aaaa/conf/good5.conf +++ b/bin/tests/system/filter-aaaa/conf/good5.conf @@ -10,7 +10,7 @@ */ view myview { - plugin query "../../../plugins/lib/filter-aaaa.so" { + plugin query "../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/ns1/named1.conf.in b/bin/tests/system/filter-aaaa/ns1/named1.conf.in index 3941dd67cd..31ea7a5828 100644 --- a/bin/tests/system/filter-aaaa/ns1/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns1/named1.conf.in @@ -25,7 +25,7 @@ options { acl filterees { 10.53.0.1; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; filter-aaaa { filterees; }; }; diff --git a/bin/tests/system/filter-aaaa/ns1/named2.conf.in b/bin/tests/system/filter-aaaa/ns1/named2.conf.in index cd28f03056..72e10c4fb0 100644 --- a/bin/tests/system/filter-aaaa/ns1/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns1/named2.conf.in @@ -23,7 +23,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v6 yes; filter-aaaa { fd92:7065:b8e:ffff::1; }; }; diff --git a/bin/tests/system/filter-aaaa/ns1/sign.sh b/bin/tests/system/filter-aaaa/ns1/sign.sh index 3223ffd4fa..adc29af4a3 100755 --- a/bin/tests/system/filter-aaaa/ns1/sign.sh +++ b/bin/tests/system/filter-aaaa/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh SYSTESTDIR=filter-aaaa diff --git a/bin/tests/system/filter-aaaa/ns2/named1.conf.in b/bin/tests/system/filter-aaaa/ns2/named1.conf.in index 446279fba5..bd20634170 100644 --- a/bin/tests/system/filter-aaaa/ns2/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns2/named1.conf.in @@ -23,7 +23,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 yes; filter-aaaa { 10.53.0.2; }; }; diff --git a/bin/tests/system/filter-aaaa/ns2/named2.conf.in b/bin/tests/system/filter-aaaa/ns2/named2.conf.in index 4fc0cab29a..831e017f6f 100644 --- a/bin/tests/system/filter-aaaa/ns2/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns2/named2.conf.in @@ -23,7 +23,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v6 yes; filter-aaaa { fd92:7065:b8e:ffff::2; }; }; diff --git a/bin/tests/system/filter-aaaa/ns3/named1.conf.in b/bin/tests/system/filter-aaaa/ns3/named1.conf.in index e757e8878b..db30e0b469 100644 --- a/bin/tests/system/filter-aaaa/ns3/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns3/named1.conf.in @@ -23,7 +23,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { 10.53.0.3; }; }; diff --git a/bin/tests/system/filter-aaaa/ns3/named2.conf.in b/bin/tests/system/filter-aaaa/ns3/named2.conf.in index 216a85aef6..48dc568cf1 100644 --- a/bin/tests/system/filter-aaaa/ns3/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns3/named2.conf.in @@ -23,7 +23,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v6 break-dnssec; filter-aaaa { fd92:7065:b8e:ffff::3; }; }; diff --git a/bin/tests/system/filter-aaaa/ns4/named1.conf.in b/bin/tests/system/filter-aaaa/ns4/named1.conf.in index 804ed0ae3b..69b7ac47d2 100644 --- a/bin/tests/system/filter-aaaa/ns4/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns4/named1.conf.in @@ -23,7 +23,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { 10.53.0.4; }; }; diff --git a/bin/tests/system/filter-aaaa/ns4/named2.conf.in b/bin/tests/system/filter-aaaa/ns4/named2.conf.in index 87874d1375..68b43c4cee 100644 --- a/bin/tests/system/filter-aaaa/ns4/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns4/named2.conf.in @@ -23,7 +23,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v6 break-dnssec; filter-aaaa { fd92:7065:b8e:ffff::4; }; }; diff --git a/bin/tests/system/filter-aaaa/ns4/sign.sh b/bin/tests/system/filter-aaaa/ns4/sign.sh index a5019690b2..05780cf4c6 100755 --- a/bin/tests/system/filter-aaaa/ns4/sign.sh +++ b/bin/tests/system/filter-aaaa/ns4/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh SYSTESTDIR=filter-aaaa diff --git a/bin/tests/system/filter-aaaa/ns5/named.conf.in b/bin/tests/system/filter-aaaa/ns5/named.conf.in index 88bdf805b9..4712c5aef4 100644 --- a/bin/tests/system/filter-aaaa/ns5/named.conf.in +++ b/bin/tests/system/filter-aaaa/ns5/named.conf.in @@ -28,7 +28,7 @@ options { minimal-responses no; }; -plugin query "../../../../plugins/lib/filter-aaaa.so" { +plugin query "../../../../plugins/filter-aaaa.la" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { any; }; }; diff --git a/bin/tests/system/filter-aaaa/prereq.sh b/bin/tests/system/filter-aaaa/prereq.sh index 7b8a7f4a91..ac5219b61c 100644 --- a/bin/tests/system/filter-aaaa/prereq.sh +++ b/bin/tests/system/filter-aaaa/prereq.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $FEATURETEST --have-dlopen || { diff --git a/bin/tests/system/filter-aaaa/setup.sh b/bin/tests/system/filter-aaaa/setup.sh index 9e00d77cc8..21a33fb482 100644 --- a/bin/tests/system/filter-aaaa/setup.sh +++ b/bin/tests/system/filter-aaaa/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named1.conf.in ns1/named.conf diff --git a/bin/tests/system/filter-aaaa/tests.sh b/bin/tests/system/filter-aaaa/tests.sh index 662c20459e..0d7a1271df 100644 --- a/bin/tests/system/filter-aaaa/tests.sh +++ b/bin/tests/system/filter-aaaa/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/formerr/setup.sh b/bin/tests/system/formerr/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/formerr/setup.sh +++ b/bin/tests/system/formerr/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/formerr/tests.sh b/bin/tests/system/formerr/tests.sh index d8b91e8754..51e29ea696 100644 --- a/bin/tests/system/formerr/tests.sh +++ b/bin/tests/system/formerr/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/forward/prereq.sh b/bin/tests/system/forward/prereq.sh deleted file mode 100644 index 0e299f4db8..0000000000 --- a/bin/tests/system/forward/prereq.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo_i "This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/forward/setup.sh b/bin/tests/system/forward/setup.sh index 285ecc9de9..5d4894ead4 100644 --- a/bin/tests/system/forward/setup.sh +++ b/bin/tests/system/forward/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/forward/tests.sh b/bin/tests/system/forward/tests.sh index bbfaa10243..cdd18b018e 100644 --- a/bin/tests/system/forward/tests.sh +++ b/bin/tests/system/forward/tests.sh @@ -8,7 +8,6 @@ # information regarding copyright ownership. #shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" dig_with_opts() ( @@ -16,7 +15,7 @@ dig_with_opts() ( ) sendcmd() ( - "$PERL" ../send.pl 10.53.0.6 "$EXTRAPORT1" + send 10.53.0.6 "$EXTRAPORT1" ) root=10.53.0.1 @@ -105,10 +104,10 @@ echo_i "checking for negative caching of forwarder response ($n)" ret=0 dig_with_opts nonexist. txt @10.53.0.5 > dig.out.$n.f2 || ret=1 grep "status: NXDOMAIN" dig.out.$n.f2 > /dev/null || ret=1 -$PERL ../stop.pl forward ns4 || ret=1 +stop forward ns4 || ret=1 dig_with_opts nonexist. txt @10.53.0.5 > dig.out.$n.f2 || ret=1 grep "status: NXDOMAIN" dig.out.$n.f2 > /dev/null || ret=1 -$PERL ../start.pl --restart --noclean --port "${PORT}" forward ns4 || ret=1 +start --restart --noclean --port "${PORT}" forward ns4 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) diff --git a/bin/tests/system/geoip2/prereq.sh b/bin/tests/system/geoip2/prereq.sh index 2e38b774b0..8178c2a9f2 100644 --- a/bin/tests/system/geoip2/prereq.sh +++ b/bin/tests/system/geoip2/prereq.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $FEATURETEST --have-geoip2 || { diff --git a/bin/tests/system/geoip2/setup.sh b/bin/tests/system/geoip2/setup.sh index fb51a0a0dd..ef08a2152e 100644 --- a/bin/tests/system/geoip2/setup.sh +++ b/bin/tests/system/geoip2/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/geoip2/tests.sh b/bin/tests/system/geoip2/tests.sh index 0b2a9ab6c0..8147edb811 100644 --- a/bin/tests/system/geoip2/tests.sh +++ b/bin/tests/system/geoip2/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/get_base_port.sh b/bin/tests/system/get_base_port.sh new file mode 100755 index 0000000000..7c1b2d3887 --- /dev/null +++ b/bin/tests/system/get_base_port.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +# This script is a 'port' broker. It keeps track of ports given to the +# individual system subtests, so every test is given a unique port range. + +lockfile=get_base_port.lock +statefile=get_base_port.state + +ephemeral_port_min=49152 +ephemeral_port_max=65535 + +get_base_port() { + if ( set -o noclobber; echo "$$" > "${lockfile}" ) 2> /dev/null; then + trap 'rm -f "${lockfile}"; exit $?' INT TERM EXIT + + base_port=$(cat "${statefile}" 2>/dev/null) + + if [ -z "${base_port}" ]; then + base_port="${ephemeral_port_min}" + fi + + if [ "$((base_port+100))" -gt "${ephemeral_port_max}" ]; then + base_port="${ephemeral_port_min}" + fi + + echo $((base_port+100)) > get_base_port.state + + # clean up after yourself, and release your trap + rm -f "${lockfile}" + trap - INT TERM EXIT + echo "${base_port}" + else + echo 0 + fi +} + +tries=10 + +while [ "${tries}" -gt 0 ]; do + base_port=$(get_base_port) + if [ "${base_port}" -gt 0 ]; then + echo "${base_port}" + exit 0 + fi + sleep 1 + tries=$((tries-1)) +done + +exit 1 diff --git a/bin/tests/system/glue/setup.sh b/bin/tests/system/glue/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/glue/setup.sh +++ b/bin/tests/system/glue/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/glue/tests.sh b/bin/tests/system/glue/tests.sh index 157e5fd409..2bb2f7166e 100644 --- a/bin/tests/system/glue/tests.sh +++ b/bin/tests/system/glue/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh # diff --git a/bin/tests/system/idna/setup.sh b/bin/tests/system/idna/setup.sh index 7e606316f4..bf1af390f2 100644 --- a/bin/tests/system/idna/setup.sh +++ b/bin/tests/system/idna/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/idna/tests.sh b/bin/tests/system/idna/tests.sh index 486216662d..45350ae5b8 100644 --- a/bin/tests/system/idna/tests.sh +++ b/bin/tests/system/idna/tests.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh # Set known locale for the tests diff --git a/bin/tests/system/ifconfig.sh b/bin/tests/system/ifconfig.sh.in similarity index 96% rename from bin/tests/system/ifconfig.sh rename to bin/tests/system/ifconfig.sh.in index fe410ecd5a..537eb176a9 100755 --- a/bin/tests/system/ifconfig.sh +++ b/bin/tests/system/ifconfig.sh.in @@ -20,12 +20,9 @@ # fd92:7065:b8e:ff::{1..2} # -SYSTEMTESTTOP="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -. "$SYSTEMTESTTOP/conf.sh" +top_builddir=@abs_top_builddir@ -export SYSTEMTESTTOP - -sys=$($SHELL "$TOP/config.guess") +sys=$($SHELL "$top_builddir/config.guess") use_ip= case "$sys" in @@ -227,9 +224,9 @@ case "$1" in fd92:7065:b8e:${ipv6}ff::$ns delete ;; *-cygwin*) - echo "Please run ifconfig.bat as Administrator." - exit 1 - ;; + echo "Please run ifconfig.bat as Administrator." + exit 1 + ;; *) echo "Don't know how to destroy interface. Giving up." exit 1 diff --git a/bin/tests/system/include-multiplecfg/setup.sh b/bin/tests/system/include-multiplecfg/setup.sh index 96c061bd3d..44b0179e14 100644 --- a/bin/tests/system/include-multiplecfg/setup.sh +++ b/bin/tests/system/include-multiplecfg/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/include-multiplecfg/tests.sh b/bin/tests/system/include-multiplecfg/tests.sh index 5651536e0a..f2ce745b67 100644 --- a/bin/tests/system/include-multiplecfg/tests.sh +++ b/bin/tests/system/include-multiplecfg/tests.sh @@ -12,7 +12,6 @@ # Test of include statement with glob expression. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noadd +nostats -p ${PORT}" diff --git a/bin/tests/system/inline/ns1/sign.sh b/bin/tests/system/inline/ns1/sign.sh index 72fc52eb4b..587266d64a 100644 --- a/bin/tests/system/inline/ns1/sign.sh +++ b/bin/tests/system/inline/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/inline/ns3/sign.sh b/bin/tests/system/inline/ns3/sign.sh index 7dc0bd09c1..cd4fc846a8 100755 --- a/bin/tests/system/inline/ns3/sign.sh +++ b/bin/tests/system/inline/ns3/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh # Fake an unsupported key diff --git a/bin/tests/system/inline/ns7/sign.sh b/bin/tests/system/inline/ns7/sign.sh index 6ba5466407..462cd29e2e 100755 --- a/bin/tests/system/inline/ns7/sign.sh +++ b/bin/tests/system/inline/ns7/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh # NOTE: The number of signing keys generated below is not coincidental. More diff --git a/bin/tests/system/inline/ns8/sign.sh b/bin/tests/system/inline/ns8/sign.sh index 5d36cb9650..4e8a8df038 100755 --- a/bin/tests/system/inline/ns8/sign.sh +++ b/bin/tests/system/inline/ns8/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh for zone in example01.com example02.com example03.com example04.com \ diff --git a/bin/tests/system/inline/setup.sh b/bin/tests/system/inline/setup.sh index 3411a66ba8..dd1a5f33c5 100644 --- a/bin/tests/system/inline/setup.sh +++ b/bin/tests/system/inline/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh cp ns1/root.db.in ns1/root.db diff --git a/bin/tests/system/inline/tests.sh b/bin/tests/system/inline/tests.sh index 47cc07a372..b325137c52 100755 --- a/bin/tests/system/inline/tests.sh +++ b/bin/tests/system/inline/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +dnssec -p ${PORT}" @@ -469,14 +468,14 @@ status=`expr $status + $ret` n=`expr $n + 1` echo_i "stop bump in the wire signer server ($n)" ret=0 -$PERL ../stop.pl inline ns3 || ret=1 +stop inline ns3 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` n=`expr $n + 1` echo_i "restart bump in the wire signer server ($n)" ret=0 -$PERL ../start.pl --noclean --restart --port ${PORT} inline ns3 || ret=1 +start --noclean --restart --port ${PORT} inline ns3 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -883,7 +882,7 @@ status=`expr $status + $ret` n=`expr $n + 1` echo_i "stop bump in the wire signer server ($n)" ret=0 -$PERL ../stop.pl inline ns3 || ret=1 +stop inline ns3 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -894,7 +893,7 @@ rm ns3/master.db.jnl n=`expr $n + 1` echo_i "restart bump in the wire signer server ($n)" ret=0 -$PERL ../start.pl --noclean --restart --port ${PORT} inline ns3 || ret=1 +start --noclean --restart --port ${PORT} inline ns3 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -1343,7 +1342,7 @@ retry_quiet 10 check_done_signing || ret=1 # flushed upon shutdown since we specifically want to avoid it. $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} inline ns3 ensure_sigs_only_in_journal delayedkeys ns3/delayedkeys.db.signed -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3 +start --noclean --restart --port ${PORT} inline ns3 # At this point, the raw zone journal will not have a source serial set. Upon # server startup, receive_secure_serial() will rectify that, update SOA, resign # it, and schedule its future resign. This will cause "rndc zonestatus" to @@ -1353,7 +1352,7 @@ $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3 $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} inline ns3 ensure_sigs_only_in_journal delayedkeys ns3/delayedkeys.db.signed nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3 +start --noclean --restart --port ${PORT} inline ns3 # We can now test whether the secure zone journal was correctly processed: # unless the records contained in it were scheduled for resigning, no resigning # event will be scheduled at all since the secure zone master file contains no diff --git a/bin/tests/system/integrity/setup.sh b/bin/tests/system/integrity/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/integrity/setup.sh +++ b/bin/tests/system/integrity/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/integrity/tests.sh b/bin/tests/system/integrity/tests.sh index 8d494d92dc..f125ddc4a2 100644 --- a/bin/tests/system/integrity/tests.sh +++ b/bin/tests/system/integrity/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/ixfr/prereq.sh b/bin/tests/system/ixfr/prereq.sh deleted file mode 100644 index 0e299f4db8..0000000000 --- a/bin/tests/system/ixfr/prereq.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo_i "This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/ixfr/setup.sh b/bin/tests/system/ixfr/setup.sh index 8c8c5fccc7..8f216ee591 100644 --- a/bin/tests/system/ixfr/setup.sh +++ b/bin/tests/system/ixfr/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh @@ -60,7 +59,7 @@ testdb sub.test. 3 61 > ns3/subtest1.db # Set up a large zone i=0 -$SHELL ../genzone.sh 3 > ns3/large.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 3 > ns3/large.db while [ $i -lt 10000 ]; do echo "record$i 10 IN TXT this is record %i" >> ns3/large.db i=$((i+1)) diff --git a/bin/tests/system/ixfr/tests.sh b/bin/tests/system/ixfr/tests.sh index 6d1fe1f2d1..ed63537b30 100644 --- a/bin/tests/system/ixfr/tests.sh +++ b/bin/tests/system/ixfr/tests.sh @@ -15,7 +15,6 @@ # in the log file - need a better approach - until then, # if you add any tests above that point, you will break the test. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh wait_for_serial() ( @@ -28,14 +27,18 @@ status=0 n=0 DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" -SENDCMD="$PERL ../send.pl 10.53.0.2 ${EXTRAPORT1}" RNDCCMD="$RNDC -p ${CONTROLPORT} -c ../common/rndc.conf -s" +sendcmd() { + send 10.53.0.2 "${EXTRAPORT1}" +} + + n=$((n+1)) echo_i "testing initial AXFR ($n)" ret=0 -$SENDCMD < ns3/verify-load.db.mirror nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 +start --noclean --restart --port ${PORT} mirror ns3 wait_for_load verify-load ${UPDATED_SERIAL_GOOD} ns3/named.run $DIG $DIGOPTS @10.53.0.3 +norec verify-load SOA > dig.out.ns3.test$n 2>&1 || ret=1 grep "ANSWER: 0" dig.out.ns3.test$n > /dev/null && ret=1 @@ -239,7 +238,7 @@ status=`expr $status + $ret` n=`expr $n + 1` echo_i "checking that loading a journal for an incorrectly signed mirror zone fails ($n)" ret=0 -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mirror ns3 +stop --use-rndc --port ${CONTROLPORT} mirror ns3 cp ns3/verify-journal.db.mirror ns3/verify-ixfr.db.mirror cp ns3/verify-journal.db.bad.mirror.jnl ns3/verify-ixfr.db.mirror.jnl # Temporarily disable transfers of the "verify-ixfr" zone on ns2. This is @@ -254,7 +253,7 @@ sed '/^zone "verify-ixfr" {$/,/^};$/ { mv ns2/named.conf.modified ns2/named.conf rndc_reconfig ns2 10.53.0.2 nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 +start --noclean --restart --port ${PORT} mirror ns3 wait_for_load verify-ixfr ${UPDATED_SERIAL_BAD} ns3/named.run $DIG $DIGOPTS @10.53.0.3 +norec verify-ixfr SOA > dig.out.ns3.test$n 2>&1 || ret=1 grep "ANSWER: 0" dig.out.ns3.test$n > /dev/null || ret=1 @@ -274,11 +273,11 @@ status=`expr $status + $ret` n=`expr $n + 1` echo_i "checking that loading a journal for a correctly signed mirror zone succeeds ($n)" ret=0 -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mirror ns3 +stop --use-rndc --port ${CONTROLPORT} mirror ns3 cp ns3/verify-journal.db.mirror ns3/verify-ixfr.db.mirror cp ns3/verify-journal.db.good.mirror.jnl ns3/verify-ixfr.db.mirror.jnl nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 +start --noclean --restart --port ${PORT} mirror ns3 wait_for_load verify-ixfr ${UPDATED_SERIAL_GOOD} ns3/named.run $DIG $DIGOPTS @10.53.0.3 +norec verify-ixfr SOA > dig.out.ns3.test$n 2>&1 || ret=1 grep "ANSWER: 0" dig.out.ns3.test$n > /dev/null && ret=1 @@ -416,10 +415,10 @@ mv ns2/named.conf.modified ns2/named.conf rndc_reconfig ns2 10.53.0.2 # Stop ns3, update the timestamp of the zone file to one far in the past, then # restart ns3. -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mirror ns3 +stop --use-rndc --port ${CONTROLPORT} mirror ns3 touch -t 200001010000 ns3/initially-unavailable.db.mirror nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 +start --noclean --restart --port ${PORT} mirror ns3 # Ensure named attempts to retransfer the zone due to its expiry. wait_for_transfer initially-unavailable # Ensure the expected messages were logged. diff --git a/bin/tests/system/mkeys/ns1/sign.sh b/bin/tests/system/mkeys/ns1/sign.sh index 483ed4ed55..f640a6e86c 100644 --- a/bin/tests/system/mkeys/ns1/sign.sh +++ b/bin/tests/system/mkeys/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/mkeys/ns6/setup.sh b/bin/tests/system/mkeys/ns6/setup.sh index 3fead4bcf7..c2ef857d58 100644 --- a/bin/tests/system/mkeys/ns6/setup.sh +++ b/bin/tests/system/mkeys/ns6/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/mkeys/setup.sh b/bin/tests/system/mkeys/setup.sh index eb50fc726b..8341bcdb45 100644 --- a/bin/tests/system/mkeys/setup.sh +++ b/bin/tests/system/mkeys/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named1.conf.in ns1/named.conf diff --git a/bin/tests/system/mkeys/tests.sh b/bin/tests/system/mkeys/tests.sh index 9cb68b0e39..42915bfdb2 100644 --- a/bin/tests/system/mkeys/tests.sh +++ b/bin/tests/system/mkeys/tests.sh @@ -11,7 +11,6 @@ set -e -SYSTEMTESTTOP=.. #shellcheck source=conf.sh . "$SYSTEMTESTTOP/conf.sh" @@ -299,11 +298,11 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) echo_i "reinitialize trust anchors, add second key to bind.keys" -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns2 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns2 rm -f ns2/managed-keys.bind* keyfile_to_initial_ds ns1/"$original" ns1/"$standby1" > ns2/managed.conf nextpart ns2/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns2 +start --noclean --restart --port "${PORT}" mkeys ns2 n=$((n+1)) echo_i "check that no key from bind.keys is marked as an initializing key ($n)" @@ -315,11 +314,11 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) echo_i "reinitialize trust anchors, revert to one key in bind.keys" -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns2 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns2 rm -f ns2/managed-keys.bind* mv ns2/managed1.conf ns2/managed.conf nextpart ns2/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns2 +start --noclean --restart --port "${PORT}" mkeys ns2 n=$((n+1)) echo_i "check that standby key is now trusted ($n)" @@ -473,10 +472,10 @@ rm -f ns1/root.db.signed.jnl mkeys_reconfig_on 1 || ret=1 echo_i "reinitialize trust anchors" -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns2 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns2 rm -f ns2/managed-keys.bind* nextpart ns2/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns2 +start --noclean --restart --port "${PORT}" mkeys ns2 n=$((n+1)) echo_i "check positive validation ($n)" @@ -572,11 +571,11 @@ ret=0 mkeys_refresh_on 2 || ret=1 mkeys_status_on 2 > rndc.out.1.$n 2>&1 || ret=1 t1=$(grep 'next refresh:' rndc.out.1.$n) || true -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns1 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns1 rm -f ns1/root.db.signed.jnl cp ns1/root.db ns1/root.db.signed nextpart ns1/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns1 +start --noclean --restart --port "${PORT}" mkeys ns1 wait_for_log 20 "all zones loaded" ns1/named.run || ret=1 mkeys_refresh_on 2 || ret=1 mkeys_status_on 2 > rndc.out.2.$n 2>&1 || ret=1 @@ -606,11 +605,11 @@ ret=0 mkeys_refresh_on 2 || ret=1 mkeys_status_on 2 > rndc.out.1.$n 2>&1 || ret=1 t1=$(grep 'next refresh:' rndc.out.1.$n) || true -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns1 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns1 rm -f ns1/root.db.signed.jnl cat ns1/K*.key >> ns1/root.db.signed nextpart ns1/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns1 +start --noclean --restart --port "${PORT}" mkeys ns1 wait_for_log 20 "all zones loaded" ns1/named.run || ret=1 # Less than a second may have passed since the last time ns2 received a # ./DNSKEY response from ns1. Ensure keys are refreshed at a different @@ -708,9 +707,9 @@ ret=0 # ensure key refresh retry will be scheduled to one actual hour after the first # key refresh failure instead of just a few seconds, in order to prevent races # between the next scheduled key refresh time and startup time of restarted ns5. -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns5 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns5 nextpart ns5/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns5 +start --noclean --restart --port "${PORT}" mkeys ns5 wait_for_log 20 "Returned from key fetch in keyfetch_done()" ns5/named.run || ret=1 # ns5/named.run will contain logs from both the old instance and the new # instance. In order for the test to pass, both must attempt a fetch. @@ -722,14 +721,14 @@ status=$((status+ret)) n=$((n+1)) echo_i "check key refreshes are resumed after root servers become available ($n)" ret=0 -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns5 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns5 # Prevent previous check from affecting this one rm -f ns5/managed-keys.bind* # named2.args adds "-T mkeytimers=2/20/40" to named1.args as we need to wait for # an "hour" until keys are refreshed again after initial failure cp ns5/named2.args ns5/named.args nextpart ns5/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns5 +start --noclean --restart --port "${PORT}" mkeys ns5 wait_for_log 20 "Returned from key fetch in keyfetch_done() for '.': failure" ns5/named.run || ret=1 mkeys_secroots_on 5 || ret=1 grep '; initializing managed' ns5/named.secroots > /dev/null 2>&1 || ret=1 @@ -758,10 +757,10 @@ status=$((status+ret)) n=$((n+1)) echo_i "reinitialize trust anchors, add unsupported algorithm ($n)" ret=0 -$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port "${CONTROLPORT}" mkeys ns6 +stop --use-rndc --port "${CONTROLPORT}" mkeys ns6 rm -f ns6/managed-keys.bind* nextpart ns6/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port "${PORT}" mkeys ns6 +start --noclean --restart --port "${PORT}" mkeys ns6 # log when an unsupported algorithm is encountered during startup wait_for_log 20 "ignoring initial-key for 'unsupported.': algorithm is unsupported" ns6/named.run || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi diff --git a/bin/tests/system/names/setup.sh b/bin/tests/system/names/setup.sh index 3a45a70648..86e4e43549 100644 --- a/bin/tests/system/names/setup.sh +++ b/bin/tests/system/names/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/names/tests.sh b/bin/tests/system/names/tests.sh index 8b88ed8243..62046b346e 100644 --- a/bin/tests/system/names/tests.sh +++ b/bin/tests/system/names/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+nosea +stat +noquest +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/notify/setup.sh b/bin/tests/system/notify/setup.sh index e2cd0a37c0..c371293d70 100644 --- a/bin/tests/system/notify/setup.sh +++ b/bin/tests/system/notify/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh index d54ab0d7ce..568639dee9 100644 --- a/bin/tests/system/notify/tests.sh +++ b/bin/tests/system/notify/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" @@ -141,12 +140,12 @@ digcomp dig.out.ns2.test$n dig.out.ns3.test$n || ret=1 status=`expr $ret + $status` echo_i "stopping master and restarting with example4 then waiting up to 45 seconds" -$PERL $SYSTEMTESTTOP/stop.pl notify ns2 +stop notify ns2 rm -f ns2/example.db cp -f ns2/example4.db ns2/example.db -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} notify ns2 +start --noclean --restart --port ${PORT} notify ns2 try=0 while test $try -lt 45 diff --git a/bin/tests/system/nslookup/setup.sh b/bin/tests/system/nslookup/setup.sh index 8134fb6ff3..e7a21a6da1 100644 --- a/bin/tests/system/nslookup/setup.sh +++ b/bin/tests/system/nslookup/setup.sh @@ -9,11 +9,10 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh -$SHELL ../genzone.sh 1 >ns1/example.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 >ns1/example.db copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/nslookup/tests.sh b/bin/tests/system/nslookup/tests.sh index 863043454f..a055bc4b07 100644 --- a/bin/tests/system/nslookup/tests.sh +++ b/bin/tests/system/nslookup/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/nsupdate/ns3/sign.sh b/bin/tests/system/nsupdate/ns3/sign.sh index 7d627ae7ce..02dd6deda0 100644 --- a/bin/tests/system/nsupdate/ns3/sign.sh +++ b/bin/tests/system/nsupdate/ns3/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=nsec3param.test. diff --git a/bin/tests/system/nsupdate/prereq.sh b/bin/tests/system/nsupdate/prereq.sh deleted file mode 100644 index f08c31da6d..0000000000 --- a/bin/tests/system/nsupdate/prereq.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.69 && $Net::DNS::VERSION <= 0.70);' 2>/dev/null - then - : - else - echo_i "Net::DNS versions 0.69 to 0.70 have bugs that cause this test to fail: please update." >&2 - exit 1 - fi -fi - -exit 0 diff --git a/bin/tests/system/nsupdate/setup.sh b/bin/tests/system/nsupdate/setup.sh index 5d701149b9..f0ccd9ef3e 100644 --- a/bin/tests/system/nsupdate/setup.sh +++ b/bin/tests/system/nsupdate/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh # diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 72a282a31c..3877ea62e6 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" @@ -338,7 +337,7 @@ rm named.pid cd .. sleep 10 if - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} nsupdate ns1 + start --noclean --restart --port ${PORT} nsupdate ns1 then echo_i "restarted server ns1" else @@ -520,7 +519,7 @@ sleep 3 # that the data served by the new server process are exactly # those dumped to the master file by "rndc stop". rm -f ns1/*jnl -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} nsupdate ns1 +start --noclean --restart --port ${PORT} nsupdate ns1 for try in 0 1 2 3 4 5 6 7 8 9; do iret=0 $DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ diff --git a/bin/tests/system/nzd2nzf/clean.sh b/bin/tests/system/nzd2nzf/clean.sh index 3a6ad6d9b9..44d4f4fec4 100644 --- a/bin/tests/system/nzd2nzf/clean.sh +++ b/bin/tests/system/nzd2nzf/clean.sh @@ -9,9 +9,9 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -rm -f */named.conf -rm -f */named.run -rm -f */named.memstats +rm -f ./*/named.conf +rm -f ./*/named.run +rm -f ./*/named.memstats rm -f dig.out.* rm -f rndc.out* rm -f ns*/*.nzf diff --git a/bin/tests/system/nzd2nzf/prereq.sh b/bin/tests/system/nzd2nzf/prereq.sh deleted file mode 100644 index 85e03606f0..0000000000 --- a/bin/tests/system/nzd2nzf/prereq.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if [ -z "$NZD" ]; then - echo_i "This test requires LMDB support (--with-lmdb)" - exit 255 -fi - -exit 0 diff --git a/bin/tests/system/nzd2nzf/setup.sh b/bin/tests/system/nzd2nzf/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/nzd2nzf/setup.sh +++ b/bin/tests/system/nzd2nzf/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/nzd2nzf/tests.sh b/bin/tests/system/nzd2nzf/tests.sh index 34ede6e4e7..b70a6ffe3b 100644 --- a/bin/tests/system/nzd2nzf/tests.sh +++ b/bin/tests/system/nzd2nzf/tests.sh @@ -7,71 +7,74 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -DIGOPTS="-p ${PORT}" -RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" +dig_with_opts() { + "$DIG" -p "${PORT}" "$@" +} + +rndccmd() { + "$RNDC" -c "$SYSTEMTESTTOP/common/rndc.conf" -p "${CONTROLPORT}" -s "$@" +} status=0 n=0 -n=`expr $n + 1` +n=$((n+1)) echo_i "querying for non-existing zone data ($n)" ret=0 -$DIG $DIGOPTS @10.53.0.1 a.added.example a > dig.out.ns1.$n || ret=1 +dig_with_opts @10.53.0.1 a.added.example a > dig.out.ns1.$n || ret=1 grep 'status: REFUSED' dig.out.ns1.$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` +status=$((status+ret)) -n=`expr $n + 1` +n=$((n+1)) echo_i "adding a new zone into default NZD using rndc addzone ($n)" -$RNDCCMD 10.53.0.1 addzone "added.example { type master; file \"added.db\"; +rndccmd 10.53.0.1 addzone "added.example { type master; file \"added.db\"; };" 2>&1 | sed 's/^/I:ns1 /' | cat_i sleep 2 -n=`expr $n + 1` +n=$((n+1)) echo_i "querying for existing zone data ($n)" ret=0 -$DIG $DIGOPTS @10.53.0.1 a.added.example a > dig.out.ns1.$n || ret=1 +dig_with_opts @10.53.0.1 a.added.example a > dig.out.ns1.$n || ret=1 grep 'status: NOERROR' dig.out.ns1.$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` +status=$((status+ret)) echo_i "stopping ns1" $PERL $SYSTEMTESTTOP/stop.pl nzd2nzf ns1 -n=`expr $n + 1` +n=$((n+1)) echo_i "dumping _default.nzd to _default.nzf ($n)" $NZD2NZF ns1/_default.nzd > ns1/_default.nzf || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` +status=$((status+ret)) -n=`expr $n + 1` +n=$((n+1)) echo_i "checking that _default.nzf contains the expected content ($n)" grep 'zone "added.example" { type master; file "added.db"; };' ns1/_default.nzf > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` +status=$((status+ret)) echo_i "deleting _default.nzd database" rm -f ns1/_default.nzd echo_i "starting ns1 which should migrate the .nzf to .nzd" -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} nzd2nzf ns1 +start --noclean --restart --port ${PORT} nzd2nzf ns1 -n=`expr $n + 1` +n=$((n+1)) echo_i "querying for zone data from migrated zone config ($n)" # retry loop in case the server restart above causes transient failures -for try in 0 1 2 3 4 5 6 7 8 9; do - ret=0 - $DIG $DIGOPTS @10.53.0.1 a.added.example a > dig.out.ns1.$n || ret=1 - grep 'status: NOERROR' dig.out.ns1.$n > /dev/null || ret=1 - [ "$ret" -eq 0 ] && break - sleep 1 -done -n=`expr $n + 1` +_do_query() ( + dig_with_opts @10.53.0.1 a.added.example a > dig.out.ns1.$n && + grep 'status: NOERROR' dig.out.ns1.$n > /dev/null +) +ret=0 +retry_quiet "10" _do_query || ret=1 +n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` +status=$((status+ret)) echo_i "exit status: $status" exit $status diff --git a/bin/tests/system/padding/setup.sh b/bin/tests/system/padding/setup.sh index 2252b7f0f8..a968818c78 100644 --- a/bin/tests/system/padding/setup.sh +++ b/bin/tests/system/padding/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL ./clean.sh diff --git a/bin/tests/system/padding/tests.sh b/bin/tests/system/padding/tests.sh index 52b60c5a03..4815bf954a 100644 --- a/bin/tests/system/padding/tests.sh +++ b/bin/tests/system/padding/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh n=0 diff --git a/bin/tests/system/pending/ns1/sign.sh b/bin/tests/system/pending/ns1/sign.sh index aa6bf6ee32..d63fa0371c 100644 --- a/bin/tests/system/pending/ns1/sign.sh +++ b/bin/tests/system/pending/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/pending/ns2/sign.sh b/bin/tests/system/pending/ns2/sign.sh index 53659fc02e..0d8baf3a3a 100644 --- a/bin/tests/system/pending/ns2/sign.sh +++ b/bin/tests/system/pending/ns2/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh for domain in example example.com; do diff --git a/bin/tests/system/pending/setup.sh b/bin/tests/system/pending/setup.sh index 9037f435ab..183fcc36ec 100644 --- a/bin/tests/system/pending/setup.sh +++ b/bin/tests/system/pending/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/pending/tests.sh b/bin/tests/system/pending/tests.sh index e93475874b..529ea1bf34 100644 --- a/bin/tests/system/pending/tests.sh +++ b/bin/tests/system/pending/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh # replace_data dname RR old_data new_data diff --git a/bin/tests/system/pipelined/prereq.sh b/bin/tests/system/pipelined/prereq.sh deleted file mode 100644 index 81c05c5989..0000000000 --- a/bin/tests/system/pipelined/prereq.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if test -n "$PYTHON" -then - if $PYTHON -c "import dns" 2> /dev/null - then - : - else - echo_i "This test requires the dnspython module." >&2 - exit 1 - fi -else - echo_i "This test requires Python and the dnspython module." >&2 - exit 1 -fi - -exit 0 diff --git a/bin/tests/system/pipelined/setup.sh b/bin/tests/system/pipelined/setup.sh index 4563f04145..64eb4ef2ad 100644 --- a/bin/tests/system/pipelined/setup.sh +++ b/bin/tests/system/pipelined/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/pipelined/tests.sh b/bin/tests/system/pipelined/tests.sh index 61f1ff70cd..3f3468004a 100644 --- a/bin/tests/system/pipelined/tests.sh +++ b/bin/tests/system/pipelined/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh MDIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/pkcs11/setup.sh b/bin/tests/system/pkcs11/setup.sh index fd642d9e5d..946edb1b34 100644 --- a/bin/tests/system/pkcs11/setup.sh +++ b/bin/tests/system/pkcs11/setup.sh @@ -11,7 +11,6 @@ set -e -SYSTEMTESTTOP=.. # shellcheck source=conf.sh . $SYSTEMTESTTOP/conf.sh diff --git a/bin/tests/system/pkcs11/tests.sh b/bin/tests/system/pkcs11/tests.sh index a85a08e535..1bb115cb0c 100644 --- a/bin/tests/system/pkcs11/tests.sh +++ b/bin/tests/system/pkcs11/tests.sh @@ -11,7 +11,6 @@ set -e -SYSTEMTESTTOP=.. # shellcheck source=conf.sh . $SYSTEMTESTTOP/conf.sh diff --git a/bin/tests/system/qmin/prereq.sh b/bin/tests/system/qmin/prereq.sh deleted file mode 100644 index 81c05c5989..0000000000 --- a/bin/tests/system/qmin/prereq.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if test -n "$PYTHON" -then - if $PYTHON -c "import dns" 2> /dev/null - then - : - else - echo_i "This test requires the dnspython module." >&2 - exit 1 - fi -else - echo_i "This test requires Python and the dnspython module." >&2 - exit 1 -fi - -exit 0 diff --git a/bin/tests/system/qmin/setup.sh b/bin/tests/system/qmin/setup.sh index 009d606ade..0ad125d62b 100644 --- a/bin/tests/system/qmin/setup.sh +++ b/bin/tests/system/qmin/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/qmin/tests.sh b/bin/tests/system/qmin/tests.sh index ecd2bc86e9..afb73603d9 100755 --- a/bin/tests/system/qmin/tests.sh +++ b/bin/tests/system/qmin/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/reclimit/prereq.sh b/bin/tests/system/reclimit/prereq.sh deleted file mode 100644 index 3c854d2da0..0000000000 --- a/bin/tests/system/reclimit/prereq.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION <= 0.78);' 2>/dev/null - then - : - else - echo_i "Net::DNS versions up to 0.78 have a bug that causes this test to fail: please update." >&2 - exit 1 - fi -else - echo_i "This test requires the Net::DNS library." >&2 - exit 1 -fi - -if $PERL -e 'use Net::DNS::Nameserver;' 2>/dev/null -then - : -else - echo_i "This test requires the Net::DNS::Nameserver library." >&2 - exit 1 -fi diff --git a/bin/tests/system/reclimit/setup.sh b/bin/tests/system/reclimit/setup.sh index d09a01250f..c80a5c79a3 100644 --- a/bin/tests/system/reclimit/setup.sh +++ b/bin/tests/system/reclimit/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/reclimit/tests.sh b/bin/tests/system/reclimit/tests.sh index 9a30a20445..9ee737ec5b 100644 --- a/bin/tests/system/reclimit/tests.sh +++ b/bin/tests/system/reclimit/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/redirect/ns1/sign.sh b/bin/tests/system/redirect/ns1/sign.sh index 719da48363..cf295c42e8 100644 --- a/bin/tests/system/redirect/ns1/sign.sh +++ b/bin/tests/system/redirect/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=signed diff --git a/bin/tests/system/redirect/ns3/sign.sh b/bin/tests/system/redirect/ns3/sign.sh index 719da48363..cf295c42e8 100644 --- a/bin/tests/system/redirect/ns3/sign.sh +++ b/bin/tests/system/redirect/ns3/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=signed diff --git a/bin/tests/system/redirect/ns5/sign.sh b/bin/tests/system/redirect/ns5/sign.sh index ee8197eeb3..2236dfc931 100644 --- a/bin/tests/system/redirect/ns5/sign.sh +++ b/bin/tests/system/redirect/ns5/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh # We sign the zone here and move the signed zone to ns6. diff --git a/bin/tests/system/redirect/setup.sh b/bin/tests/system/redirect/setup.sh index 2445f5711b..3b35510a2f 100644 --- a/bin/tests/system/redirect/setup.sh +++ b/bin/tests/system/redirect/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/redirect/tests.sh b/bin/tests/system/redirect/tests.sh index 810e43e8d8..e720db3b1e 100644 --- a/bin/tests/system/redirect/tests.sh +++ b/bin/tests/system/redirect/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/resolver/ns6/keygen.sh b/bin/tests/system/resolver/ns6/keygen.sh index 34ca7dc01a..5b6ad516d7 100644 --- a/bin/tests/system/resolver/ns6/keygen.sh +++ b/bin/tests/system/resolver/ns6/keygen.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=ds.example.net diff --git a/bin/tests/system/resolver/prereq.sh b/bin/tests/system/resolver/prereq.sh deleted file mode 100644 index 171926bc2c..0000000000 --- a/bin/tests/system/resolver/prereq.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION eq "0.76" || $Net::DNS::VERSION eq "0.77");' 2>/dev/null - then - : - else - echo_i "Net::DNS version 0.76 and 0.77 have a bug that causes this test to fail: please update." >&2 - exit 1 - fi -else - echo_i "This test requires the Net::DNS library." >&2 - exit 1 -fi - -exit 0 diff --git a/bin/tests/system/resolver/setup.sh b/bin/tests/system/resolver/setup.sh index 1e9456a327..cf1f0f4591 100644 --- a/bin/tests/system/resolver/setup.sh +++ b/bin/tests/system/resolver/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh cp ns4/tld1.db ns4/tld.db diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 8f9e1369ec..5a1faa2971 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh echo . diff --git a/bin/tests/system/rndc/setup.sh b/bin/tests/system/rndc/setup.sh index 6b539d1781..c15ac085fb 100644 --- a/bin/tests/system/rndc/setup.sh +++ b/bin/tests/system/rndc/setup.sh @@ -9,14 +9,13 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL ../genzone.sh 2 >ns2/nil.db -$SHELL ../genzone.sh 2 >ns2/other.db -$SHELL ../genzone.sh 2 >ns2/static.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/nil.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/other.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns2/static.db -$SHELL ../genzone.sh 2 >ns6/huge.zone.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 >ns6/huge.zone.db awk 'END { for (i = 1; i <= 1000000; i++) printf "host%d IN A 10.53.0.6\n", i; }' < /dev/null >> ns6/huge.zone.db diff --git a/bin/tests/system/rndc/tests.sh b/bin/tests/system/rndc/tests.sh index 2af855aa28..8b1534b623 100644 --- a/bin/tests/system/rndc/tests.sh +++ b/bin/tests/system/rndc/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd" @@ -645,23 +644,6 @@ sleep 1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` -if [ -x "$PYTHON" ]; then - n=`expr $n + 1` - echo_i "test rndc python bindings ($n)" - ret=0 - $PYTHON > python.out.1.test$n << EOF -import sys -sys.path.insert(0, '../../../../bin/python') -from isc import * -r = rndc(('10.53.0.5', ${CONTROLPORT}), 'hmac-sha256', '1234abcd8765') -result = r.call('status') -print(result['text']) -EOF - grep 'server is up and running' python.out.1.test$n > /dev/null 2>&1 || ret=1 - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` -fi - n=`expr $n + 1` echo_i "check 'rndc \"\"' is handled ($n)" ret=0 diff --git a/bin/tests/system/rootkeysentinel/ns1/sign.sh b/bin/tests/system/rootkeysentinel/ns1/sign.sh index cfbed026ba..340e02407f 100644 --- a/bin/tests/system/rootkeysentinel/ns1/sign.sh +++ b/bin/tests/system/rootkeysentinel/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/rootkeysentinel/ns2/sign.sh b/bin/tests/system/rootkeysentinel/ns2/sign.sh index 6501ce5dba..e847ac33fe 100644 --- a/bin/tests/system/rootkeysentinel/ns2/sign.sh +++ b/bin/tests/system/rootkeysentinel/ns2/sign.sh @@ -15,7 +15,6 @@ newid=`expr "0000${newid}" : '.*\(.....\)$'` badid=`expr \( ${oldid} + 7777 \) % 65536` badid=`expr "0000${badid}" : '.*\(.....\)$'` -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=example. diff --git a/bin/tests/system/rootkeysentinel/setup.sh b/bin/tests/system/rootkeysentinel/setup.sh index d5c20bb5e1..43b159c8c7 100644 --- a/bin/tests/system/rootkeysentinel/setup.sh +++ b/bin/tests/system/rootkeysentinel/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/rootkeysentinel/tests.sh b/bin/tests/system/rootkeysentinel/tests.sh index 76b3db899b..8aa5ba8d91 100644 --- a/bin/tests/system/rootkeysentinel/tests.sh +++ b/bin/tests/system/rootkeysentinel/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/rpz/ckdnsrps.sh b/bin/tests/system/rpz/ckdnsrps.sh index 154ba0945f..adb8f7da9b 100644 --- a/bin/tests/system/rpz/ckdnsrps.sh +++ b/bin/tests/system/rpz/ckdnsrps.sh @@ -17,7 +17,6 @@ set -e # and differ from dnsrpz.conf which is used by dnsrpzd. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DNSRPS_CMD=../rpz/dnsrps diff --git a/bin/tests/system/rpz/setup.sh b/bin/tests/system/rpz/setup.sh index 0763ed9ace..2ad1d44513 100644 --- a/bin/tests/system/rpz/setup.sh +++ b/bin/tests/system/rpz/setup.sh @@ -13,7 +13,6 @@ set -e -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh QPERF=`$SHELL qperf.sh` diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index 15ae5e245b..5a08f5e955 100644 --- a/bin/tests/system/rpz/tests.sh +++ b/bin/tests/system/rpz/tests.sh @@ -14,7 +14,6 @@ # touch dnsrps-off to not test with DNSRPS # touch dnsrps-only to not test with classic RPZ -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh ns=10.53.0 @@ -216,7 +215,7 @@ restart () { done fi fi - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpz ns$1 + start --noclean --restart --port ${PORT} rpz ns$1 load_db dnsrps_loaded sleep 1 @@ -483,7 +482,7 @@ for mode in native dnsrps; do continue else echo_i "running DNSRPS sub-test" - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpz + start --noclean --restart --port ${PORT} rpz sleep 3 fi ;; diff --git a/bin/tests/system/rpzrecurse/prereq.sh b/bin/tests/system/rpzrecurse/prereq.sh deleted file mode 100644 index 20388be837..0000000000 --- a/bin/tests/system/rpzrecurse/prereq.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo "I:This test requires the Net::DNS library." >&2 - exit 1 -fi - -exit 0 diff --git a/bin/tests/system/rpzrecurse/setup.sh b/bin/tests/system/rpzrecurse/setup.sh index 9ab709fc9d..267f5dc21b 100644 --- a/bin/tests/system/rpzrecurse/setup.sh +++ b/bin/tests/system/rpzrecurse/setup.sh @@ -13,7 +13,6 @@ set -e -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh USAGE="$0: [-DNx]" diff --git a/bin/tests/system/rpzrecurse/tests.sh b/bin/tests/system/rpzrecurse/tests.sh index 7b1f206389..9637a8278f 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -12,7 +12,6 @@ # touch dnsrps-off to not test with DNSRPS # touch dnsrps-only to not test with classic RPZ -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 @@ -52,7 +51,7 @@ run_server() { echo_i "starting resolver using named.$TESTNAME.conf" cp -f ns2/named.$TESTNAME.conf ns2/named.conf - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpzrecurse ns2 + start --noclean --restart --port ${PORT} rpzrecurse ns2 sleep 3 } @@ -134,7 +133,7 @@ for mode in native dnsrps; do continue else echo_i "running DNSRPS sub-test" - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpzrecurse + start --noclean --restart --port ${PORT} rpzrecurse sleep 3 fi ;; diff --git a/bin/tests/system/rrchecker/tests.sh b/bin/tests/system/rrchecker/tests.sh index 29440161b5..e5b4fe84cc 100644 --- a/bin/tests/system/rrchecker/tests.sh +++ b/bin/tests/system/rrchecker/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 @@ -39,7 +38,7 @@ EOF n=`expr $n + 1` echo_i "check conversions to canonical format ($n)" ret=0 -$SHELL ../genzone.sh 0 > tempzone +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 0 > tempzone $CHECKZONE -Dq . tempzone | sed '/^;/d' > checkzone.out$n while read -r name tt cl ty rest do diff --git a/bin/tests/system/rrl/setup.sh b/bin/tests/system/rrl/setup.sh index 4563f04145..64eb4ef2ad 100644 --- a/bin/tests/system/rrl/setup.sh +++ b/bin/tests/system/rrl/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/rrl/tests.sh b/bin/tests/system/rrl/tests.sh index 977950f713..dd526d7b2c 100644 --- a/bin/tests/system/rrl/tests.sh +++ b/bin/tests/system/rrl/tests.sh @@ -9,7 +9,6 @@ # test response rate limiting -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" diff --git a/bin/tests/system/rrsetorder/setup.sh b/bin/tests/system/rrsetorder/setup.sh index c63aeb10d2..f3c0bd3519 100644 --- a/bin/tests/system/rrsetorder/setup.sh +++ b/bin/tests/system/rrsetorder/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/rrsetorder/tests.sh b/bin/tests/system/rrsetorder/tests.sh index 5ff9541a38..08266af6f1 100644 --- a/bin/tests/system/rrsetorder/tests.sh +++ b/bin/tests/system/rrsetorder/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short +nocookie" @@ -251,7 +250,7 @@ fi echo_i "Re-starting slave" -$PERL $SYSTEMTESTTOP/start.pl --noclean --port ${PORT} rrsetorder ns2 +start --noclean --port ${PORT} rrsetorder ns2 # # diff --git a/bin/tests/system/rsabigexponent/ns1/sign.sh b/bin/tests/system/rsabigexponent/ns1/sign.sh index cdc61327b8..a50cb40767 100755 --- a/bin/tests/system/rsabigexponent/ns1/sign.sh +++ b/bin/tests/system/rsabigexponent/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=. diff --git a/bin/tests/system/rsabigexponent/ns2/sign.sh b/bin/tests/system/rsabigexponent/ns2/sign.sh index 0c5cbdd084..fa7aea80dc 100755 --- a/bin/tests/system/rsabigexponent/ns2/sign.sh +++ b/bin/tests/system/rsabigexponent/ns2/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=example. diff --git a/bin/tests/system/rsabigexponent/prereq.sh b/bin/tests/system/rsabigexponent/prereq.sh deleted file mode 100644 index 2ee132d669..0000000000 --- a/bin/tests/system/rsabigexponent/prereq.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $BIGKEY > /dev/null 2>&1 -then - rm -f Kexample.* -else - echo_i "This test requires OpenSSL cryptography provider" >&2 - echo_i "configure with --with-openssl, and make sure you disable --with-pkcs11 and --enable-native-pkcs11" >&2 - exit 255 -fi diff --git a/bin/tests/system/rsabigexponent/setup.sh b/bin/tests/system/rsabigexponent/setup.sh index 46653f5b0c..1c6233eac0 100644 --- a/bin/tests/system/rsabigexponent/setup.sh +++ b/bin/tests/system/rsabigexponent/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/rsabigexponent/tests.sh b/bin/tests/system/rsabigexponent/tests.sh index b53052892e..80b618b923 100644 --- a/bin/tests/system/rsabigexponent/tests.sh +++ b/bin/tests/system/rsabigexponent/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh.in old mode 100755 new mode 100644 similarity index 58% rename from bin/tests/system/run.sh rename to bin/tests/system/run.sh.in index 37eb737eef..1f38dc45a3 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh.in @@ -13,15 +13,25 @@ # Run a system test. # -SYSTEMTESTTOP="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -. $SYSTEMTESTTOP/conf.sh +top_builddir=@top_builddir@ +builddir=@abs_builddir@ +srcdir=@abs_srcdir@ +. ${builddir}/conf.sh + +SYSTEMTESTTOP="$(cd -P -- "${builddir}" && pwd -P)" export SYSTEMTESTTOP +export builddir +export srcdir + +date_with_args() ( + date -R +) stopservers=true baseport=5300 -if [ ${SYSTEMTEST_NO_CLEAN:-0} -eq 1 ]; then +if [ "${SYSTEMTEST_NO_CLEAN:-0}" -eq 1 ]; then clean=false else clean=true @@ -37,19 +47,36 @@ while getopts "knp:r-:" flag; do k) stopservers=false ;; n) clean=false ;; p) baseport=$OPTARG ;; + *) echo "invalid option" >&2; exit 1 ;; esac done -shift `expr $OPTIND - 1` +shift $((OPTIND-1)) if [ $# -eq 0 ]; then echofail "Usage: $0 [-k] [-n] [-p ] test-directory [test-options]" >&2; exit 1 fi -systest=${1%%/} +systest=$(basename "${1%%/}") shift -if [ ! -d $systest ]; then +if [ ! -d "${srcdir}/$systest" ]; then + echofail "$0: $systest: no such test" >&2 + exit 1 +fi + +if [ "${srcdir}" != "${builddir}" ]; then + if [ ! -d common ] || [ ! -r common/.prepared ]; then + cp -a "${srcdir}/common" "${builddir}" + fi + if [ ! -d "$systest" ] || [ ! -r "$systest/.prepared" ]; then + mkdir -p "${builddir}/$systest" + cp -a "${srcdir}/$systest" "${builddir}/" + touch "$systest/.prepared" + fi +fi + +if [ ! -d "${systest}" ]; then echofail "$0: $systest: no such test" >&2 exit 1 fi @@ -64,14 +91,13 @@ fi # command line is the lowest port number in a block of "numports" consecutive # ports and that the highest valid port number is 65,535. numport=100 -minvalid=`expr 1024 + 1` -maxvalid=`expr 65535 - $numport + 1` +minvalid=$((1024 + 1)) +maxvalid=$((65535 - numport + 1)) -test "$baseport" -eq "$baseport" > /dev/null 2>&1 -if [ $? -ne 0 ]; then +if ! [ "$baseport" -eq "$baseport" ] > /dev/null 2>&1; then echofail "$0: $systest: must specify a numeric value for the port" >&2 exit 1 -elif [ $baseport -lt $minvalid -o $baseport -gt $maxvalid ]; then +elif [ "$baseport" -lt "$minvalid" ] || [ "$baseport" -gt "$maxvalid" ]; then echofail "$0: $systest: the specified port must be in the range $minvalid to $maxvalid" >&2 exit 1 fi @@ -82,18 +108,18 @@ fi # will usually be a multiple of 10, the names are chosen so that if this is # true, the last digit of EXTRAPORTn is "n". PORT=$baseport -EXTRAPORT1=`expr $baseport + 1` -EXTRAPORT2=`expr $baseport + 2` -EXTRAPORT3=`expr $baseport + 3` -EXTRAPORT4=`expr $baseport + 4` -EXTRAPORT5=`expr $baseport + 5` -EXTRAPORT6=`expr $baseport + 6` -EXTRAPORT7=`expr $baseport + 7` -EXTRAPORT8=`expr $baseport + 8` -CONTROLPORT=`expr $baseport + 9` +EXTRAPORT1=$((baseport + 1)) +EXTRAPORT2=$((baseport + 2)) +EXTRAPORT3=$((baseport + 3)) +EXTRAPORT4=$((baseport + 4)) +EXTRAPORT5=$((baseport + 5)) +EXTRAPORT6=$((baseport + 6)) +EXTRAPORT7=$((baseport + 7)) +EXTRAPORT8=$((baseport + 8)) +CONTROLPORT=$((baseport + 9)) LOWPORT=$baseport -HIGHPORT=`expr $baseport + $numport - 1` +HIGHPORT=$((baseport + numport - 1)) export PORT export EXTRAPORT1 @@ -109,73 +135,68 @@ export CONTROLPORT export LOWPORT export HIGHPORT -echostart "S:$systest:`date`" +echostart "S:$systest:$(date_with_args)" echoinfo "T:$systest:1:A" echoinfo "A:$systest:System test $systest" echoinfo "I:$systest:PORTRANGE:${LOWPORT} - ${HIGHPORT}" -if [ x${PERL:+set} = x ] -then - echowarn "I:$systest:Perl not available. Skipping test." - echowarn "R:$systest:UNTESTED" - echoend "E:$systest:`date $dateargs`" - exit 0; -fi - -$PERL testsock.pl -p $PORT || { +$PERL ${srcdir}/testsock.pl -p "$PORT" || { echowarn "I:$systest:Network interface aliases not set up. Skipping test." - echowarn "R:$systest:UNTESTED" - echoend "E:$systest:`date $dateargs`" - exit 0; + echowarn "R:$systest:FAIL" + echoend "E:$systest:$(date_with_args)" + exit 1; } # Check for test-specific prerequisites. -test ! -f $systest/prereq.sh || ( cd $systest && $SHELL prereq.sh "$@" ) +test ! -f "$systest/prereq.sh" || ( cd "${systest}" && $SHELL prereq.sh "$@" ) result=$? if [ $result -eq 0 ]; then : prereqs ok else echowarn "I:$systest:Prerequisites missing, skipping test." - [ $result -eq 255 ] && echowarn "R:$systest:SKIPPED" || echowarn "R:$systest:UNTESTED" - echoend "E:$systest:`date $dateargs`" + if [ $result -eq 255 ]; then + echowarn "R:$systest:SKIPPED"; + else + echowarn "R:$systest:UNTESTED" + fi + echoend "E:$systest:$(date_with_args)" exit 0 fi # Check for PKCS#11 support if - test ! -f $systest/usepkcs11 || $SHELL cleanpkcs11.sh + test ! -f "$systest/usepkcs11" || $SHELL cleanpkcs11.sh then : pkcs11 ok else echowarn "I:$systest:Need PKCS#11, skipping test." echowarn "R:$systest:PKCS11ONLY" - echoend "E:$systest:`date $dateargs`" + echoend "E:$systest:$(date_with_args)" exit 0 fi # Clean up files left from any potential previous runs -if test -f $systest/clean.sh +if test -f "$systest/clean.sh" then - ( cd $systest && $SHELL clean.sh "$@" ) + ( cd "${systest}" && $SHELL clean.sh "$@" ) fi # Set up any dynamically generated test data -if test -f $systest/setup.sh +if test -f "$systest/setup.sh" then - ( cd $systest && $SHELL setup.sh "$@" ) + ( cd "${systest}" && $SHELL setup.sh "$@" ) fi # Start name servers running -$PERL start.pl --port $PORT $systest -if [ $? -ne 0 ]; then +if ! $PERL ${srcdir}/start.pl --port "$PORT" "$systest"; then echofail "R:$systest:FAIL" - echoend "E:$systest:`date $dateargs`" + echoend "E:$systest:$(date_with_args)" exit 1 fi # Run the tests -( cd $systest ; $SHELL tests.sh "$@" ) +( cd "${systest}" && $SHELL tests.sh "$@" ) status=$? if $stopservers @@ -186,17 +207,17 @@ else fi # Shutdown -$PERL stop.pl $systest +$PERL ${srcdir}/stop.pl "$systest" -status=`expr $status + $?` +status=$((status + $?)) if [ $status != 0 ]; then echofail "R:$systest:FAIL" # Do not clean up - we need the evidence. else - core_dumps="$(find $systest/ -name 'core*' -or -name '*.core' | sort | tr '\n' ' ')" - assertion_failures=$(find $systest/ -name named.run | xargs grep "assertion failure" | wc -l) - sanitizer_summaries=$(find $systest/ -name 'tsan.*' | wc -l) + core_dumps="$(find "$systest/" -name 'core*' -or -name '*.core' | sort | tr '\n' ' ')" + assertion_failures=$(find "$systest/" -name named.run -print0 | xargs -0 grep "assertion failure" | wc -l) + sanitizer_summaries=$(find "$systest/" -name 'tsan.*' | wc -l) if [ -n "$core_dumps" ]; then echoinfo "I:$systest:Test claims success despite crashes: $core_dumps" echofail "R:$systest:FAIL" @@ -205,31 +226,34 @@ else SYSTESTDIR="$systest" echoinfo "D:$systest:backtrace from $coredump start" binary=$(gdb --batch --core="$coredump" | sed -ne "s/Core was generated by \`//;s/ .*'.$//p;") - "$TOP/libtool" --mode=execute gdb \ - --batch \ - --command=run.gdb \ - --core="$coredump" \ - -- \ - "$binary" + "${top_builddir}/libtool" --mode=execute gdb \ + --batch \ + --command=run.gdb \ + --core="$coredump" \ + -- \ + "$binary" echoinfo "D:$systest:backtrace from $coredump end" done - elif [ $assertion_failures -ne 0 ]; then + elif [ "$assertion_failures" -ne 0 ]; then SYSTESTDIR="$systest" echoinfo "I:$systest:Test claims success despite $assertion_failures assertion failure(s)" - grep "SUMMARY: " $(find $systest/ -name 'tsan.*') | sort -u | cat_d + find "$systest/" -name 'tsan.*' -print0 | xargs -0 grep "SUMMARY: " | sort -u | cat_d echofail "R:$systest:FAIL" # Do not clean up - we need the evidence. - elif [ $sanitizer_summaries -ne 0 ]; then + elif [ "$sanitizer_summaries" -ne 0 ]; then echoinfo "I:$systest:Test claims success despite $sanitizer_summaries sanitizer reports(s)" echofail "R:$systest:FAIL" else echopass "R:$systest:PASS" if $clean then - ( cd $systest && $SHELL clean.sh "$@" ) - if test -d ../../../.git + ( cd "${systest}" && $SHELL clean.sh "$@" ) + if [ "${srcdir}" != "${builddir}" ]; then + rm -rf "./${systest}" ## FIXME (this also removes compiled binaries) + fi + if test -d ${srcdir}/../../../.git then - git status -su --ignored $systest 2>/dev/null | \ + git status -su --ignored "${systest}" 2>/dev/null | \ sed -n -e 's|^?? \(.*\)|I:file \1 not removed|p' \ -e 's|^!! \(.*/named.run\)$|I:file \1 not removed|p' \ -e 's|^!! \(.*/named.memstats\)$|I:file \1 not removed|p' @@ -238,6 +262,6 @@ else fi fi -echoend "E:$systest:`date $dateargs`" +echoend "E:$systest:$(date_with_args)" exit $status diff --git a/bin/tests/system/runtime/setup.sh b/bin/tests/system/runtime/setup.sh index 417ba70829..c759fc6c5a 100644 --- a/bin/tests/system/runtime/setup.sh +++ b/bin/tests/system/runtime/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/runtime/tests.sh b/bin/tests/system/runtime/tests.sh index e35cb70267..00162731d4 100644 --- a/bin/tests/system/runtime/tests.sh +++ b/bin/tests/system/runtime/tests.sh @@ -10,7 +10,6 @@ # information regarding copyright ownership. # shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e diff --git a/bin/tests/system/serve-stale/prereq.sh b/bin/tests/system/serve-stale/prereq.sh deleted file mode 100644 index 7aad052ec3..0000000000 --- a/bin/tests/system/serve-stale/prereq.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.69 && $Net::DNS::VERSION <= 0.74);' 2>/dev/null - then - : - else - echo "I:Net::DNS versions 0.69 to 0.74 have bugs that cause this test to fail: please update." >&2 - exit 1 - fi -else - echo "I:This test requires the Net::DNS library." >&2 - exit 1 -fi -if $PERL -e 'use Net::DNS::Nameserver;' 2>/dev/null -then - : -else - echo "I:This test requires the Net::DNS::Nameserver library." >&2 - exit 1 -fi -if $PERL -e 'use Time::HiRes;' 2>/dev/null -then - : -else - echo "I:This test requires the Time::HiRes library." >&2 - exit 1 -fi diff --git a/bin/tests/system/serve-stale/setup.sh b/bin/tests/system/serve-stale/setup.sh index 79d7238cf9..f0ac9e60f7 100644 --- a/bin/tests/system/serve-stale/setup.sh +++ b/bin/tests/system/serve-stale/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/serve-stale/tests.sh b/bin/tests/system/serve-stale/tests.sh index 252eeab994..73e8cc8612 100755 --- a/bin/tests/system/serve-stale/tests.sh +++ b/bin/tests/system/serve-stale/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" @@ -1056,7 +1055,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) echo_i "start ns4" -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} serve-stale ns4 +start --noclean --restart --port ${PORT} serve-stale ns4 n=$((n+1)) echo_i "verify ancient cache statistics (serve-stale disabled) ($n)" diff --git a/bin/tests/system/sfcache/tests.sh b/bin/tests/system/sfcache/tests.sh index c512d6eea6..51e2da1430 100644 --- a/bin/tests/system/sfcache/tests.sh +++ b/bin/tests/system/sfcache/tests.sh @@ -10,7 +10,6 @@ # information regarding copyright ownership. # shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e diff --git a/bin/tests/system/smartsign/tests.sh b/bin/tests/system/smartsign/tests.sh index 7630112dbd..c08c1f1b74 100644 --- a/bin/tests/system/smartsign/tests.sh +++ b/bin/tests/system/smartsign/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/sortlist/setup.sh b/bin/tests/system/sortlist/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/sortlist/setup.sh +++ b/bin/tests/system/sortlist/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/sortlist/tests.sh b/bin/tests/system/sortlist/tests.sh index 2fc44b0f8f..a20dc3f66c 100644 --- a/bin/tests/system/sortlist/tests.sh +++ b/bin/tests/system/sortlist/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/spf/setup.sh b/bin/tests/system/spf/setup.sh index 985a4bcb69..0f5767dceb 100644 --- a/bin/tests/system/spf/setup.sh +++ b/bin/tests/system/spf/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/spf/tests.sh b/bin/tests/system/spf/tests.sh index dd54cf3766..27af97a356 100644 --- a/bin/tests/system/spf/tests.sh +++ b/bin/tests/system/spf/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh n=1 diff --git a/bin/tests/system/start.pl b/bin/tests/system/start.pl index 1ecbd70f22..e413e24942 100755 --- a/bin/tests/system/start.pl +++ b/bin/tests/system/start.pl @@ -75,8 +75,9 @@ if (!$test) { } # Global variables -my $topdir = abs_path($ENV{'SYSTEMTESTTOP'}); -my $testdir = abs_path($topdir . "/" . $test); +my $builddir = $ENV{'builddir'}; +my $srcdir = $ENV{'srcdir'}; +my $testdir = "$builddir/$test"; if (! -d $testdir) { die "No test directory: \"$testdir\"\n"; @@ -163,7 +164,7 @@ sub check_ns_port { my $tries = 0; while (1) { - my $return = system("$PERL $topdir/testsock.pl -p $port $options"); + my $return = system("$PERL $srcdir/testsock.pl -p $port $options"); if ($return == 0) { last; @@ -176,7 +177,7 @@ sub check_ns_port { print "I:$test:server sockets not available\n"; print "I:$test:failed\n"; - system("$PERL $topdir/stop.pl $test"); # Is this the correct behavior? + system("$PERL $srcdir/stop.pl $test"); # Is this the correct behavior? exit 1; } @@ -205,14 +206,14 @@ sub start_server { print "I:$test:failed\n"; system "kill -9 $child" if ("$child" ne ""); chdir "$testdir"; - system "$PERL $topdir/stop.pl $test"; + system "$PERL $srcdir/stop.pl $test"; exit 1; } sleep 0.1; } # go back to the top level directory - chdir $topdir; + chdir $builddir; } sub construct_ns_command { @@ -323,7 +324,7 @@ sub construct_ans_command { } elsif (-e "$testdir/$server/ans.pl") { $command = "$PERL ans.pl"; } else { - $command = "$PERL $topdir/ans.pl 10.53.0.$n"; + $command = "$PERL $srcdir/ans.pl 10.53.0.$n"; } if ($options) { @@ -384,7 +385,7 @@ sub verify_ns_server { print "I:$test:server $server seems to have not started\n"; print "I:$test:failed\n"; - system("$PERL $topdir/stop.pl $test"); + system("$PERL $srcdir/stop.pl $test"); exit 1; } @@ -419,7 +420,7 @@ sub verify_ns_server { print "I:$test:no response from $server\n"; print "I:$test:failed\n"; - system("$PERL $topdir/stop.pl $test"); + system("$PERL $srcdir/stop.pl $test"); exit 1; } diff --git a/bin/tests/system/start.sh b/bin/tests/system/start.sh deleted file mode 100755 index e71c7d6449..0000000000 --- a/bin/tests/system/start.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -# shellcheck source=conf.sh -. "$SYSTEMTESTTOP/conf.sh" -export SYSTEMTESTTOP - -$PERL "$SYSTEMTESTTOP/start.pl" "$@" diff --git a/bin/tests/system/stop.sh b/bin/tests/system/start.sh.in old mode 100755 new mode 100644 similarity index 74% rename from bin/tests/system/stop.sh rename to bin/tests/system/start.sh.in index ba1256bc43..676dd94980 --- a/bin/tests/system/stop.sh +++ b/bin/tests/system/start.sh.in @@ -9,9 +9,10 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" -# shellcheck source=conf.sh -. "$SYSTEMTESTTOP/conf.sh" -export SYSTEMTESTTOP +builddir=@builddir@ +srcdir=@srcdir@ -$PERL "$SYSTEMTESTTOP/stop.pl" "$@" +# shellcheck source=conf.sh +. "${builddir}/conf.sh" + +$PERL "${srcdir}/start.pl" "$@" diff --git a/bin/tests/system/staticstub/ns3/sign.sh b/bin/tests/system/staticstub/ns3/sign.sh index 0fe84ff66d..cd7e13f2f4 100755 --- a/bin/tests/system/staticstub/ns3/sign.sh +++ b/bin/tests/system/staticstub/ns3/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=example. diff --git a/bin/tests/system/staticstub/ns4/sign.sh b/bin/tests/system/staticstub/ns4/sign.sh index 757c8b4a98..2f5dbf05ab 100755 --- a/bin/tests/system/staticstub/ns4/sign.sh +++ b/bin/tests/system/staticstub/ns4/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=sub.example diff --git a/bin/tests/system/staticstub/setup.sh b/bin/tests/system/staticstub/setup.sh index 077690600e..b2af609891 100755 --- a/bin/tests/system/staticstub/setup.sh +++ b/bin/tests/system/staticstub/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/staticstub/tests.sh b/bin/tests/system/staticstub/tests.sh index 368d472f4c..e487ff298c 100755 --- a/bin/tests/system/staticstub/tests.sh +++ b/bin/tests/system/staticstub/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tests/system/statistics/prereq.sh b/bin/tests/system/statistics/prereq.sh deleted file mode 100644 index ec3fefe08a..0000000000 --- a/bin/tests/system/statistics/prereq.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.76 && $Net::DNS::VERSION <= 0.77);' 2>/dev/null - then - : - else - echo_i "Net::DNS version 0.76 and 0.77 have a bug that causes this test to fail: please update." >&2 - exit 1 - fi -else - echo_i "This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/statistics/setup.sh b/bin/tests/system/statistics/setup.sh index def2a615ac..e683db06d9 100644 --- a/bin/tests/system/statistics/setup.sh +++ b/bin/tests/system/statistics/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/statistics/tests.sh b/bin/tests/system/statistics/tests.sh index 1a4c5a5778..5347ade54e 100644 --- a/bin/tests/system/statistics/tests.sh +++ b/bin/tests/system/statistics/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd" diff --git a/bin/tests/system/statschannel/prereq.sh b/bin/tests/system/statschannel/prereq.sh deleted file mode 100644 index f3d4fd17a6..0000000000 --- a/bin/tests/system/statschannel/prereq.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -fail=0 - -if $PERL -e 'use File::Fetch;' 2>/dev/null -then - : -else - echo_i "This test requires the File::Fetch library." >&2 - fail=1 -fi - -exit $fail diff --git a/bin/tests/system/statschannel/tests.sh b/bin/tests/system/statschannel/tests.sh index 32a9da451c..aaa221b5d7 100644 --- a/bin/tests/system/statschannel/tests.sh +++ b/bin/tests/system/statschannel/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. # shellcheck source=conf.sh . "$SYSTEMTESTTOP/conf.sh" diff --git a/bin/tests/system/stop.pl b/bin/tests/system/stop.pl index a667d446fb..7940c23b46 100644 --- a/bin/tests/system/stop.pl +++ b/bin/tests/system/stop.pl @@ -54,8 +54,9 @@ if (!$test) { } # Global variables -my $topdir = abs_path($ENV{'SYSTEMTESTTOP'}); -my $testdir = abs_path($topdir . "/" . $test); +my $builddir = $ENV{'builddir'}; +my $srcdir = $ENV{'srcdir'}; +my $testdir = "$builddir/$test"; if (! -d $testdir) { die "No test directory: \"$testdir\"\n"; diff --git a/bin/tests/system/tcp/prereq.sh b/bin/tests/system/stop.sh.in similarity index 76% rename from bin/tests/system/tcp/prereq.sh rename to bin/tests/system/stop.sh.in index 375370b71f..1d5fb19846 100644 --- a/bin/tests/system/tcp/prereq.sh +++ b/bin/tests/system/stop.sh.in @@ -9,11 +9,10 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh +builddir=@builddir@ +srcdir=@srcdir@ -if ! test -n "$PYTHON"; then - echo_i "This test requires Python." - exit 1 -fi +# shellcheck source=conf.sh +. "${builddir}/conf.sh" +$PERL "${srcdir}/stop.pl" "$@" diff --git a/bin/tests/system/stress/prereq.sh b/bin/tests/system/stress/prereq.sh deleted file mode 100644 index de147a4c2a..0000000000 --- a/bin/tests/system/stress/prereq.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo "I:This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/stress/tests.sh b/bin/tests/system/stress/tests.sh index 53c3d20db6..08edd332aa 100644 --- a/bin/tests/system/stress/tests.sh +++ b/bin/tests/system/stress/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/stub/setup.sh b/bin/tests/system/stub/setup.sh index def2a615ac..e683db06d9 100644 --- a/bin/tests/system/stub/setup.sh +++ b/bin/tests/system/stub/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/stub/tests.sh b/bin/tests/system/stub/tests.sh index 730cd40603..ae81f126be 100644 --- a/bin/tests/system/stub/tests.sh +++ b/bin/tests/system/stub/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp -p ${PORT}" @@ -56,7 +55,7 @@ digcomp knowngood.dig.out.rec dig.out.ns3 || ret=1 $PERL $SYSTEMTESTTOP/stop.pl stub ns3 echo_i "re-starting stub server" - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} stub ns3 + start --noclean --restart --port ${PORT} stub ns3 } done diff --git a/bin/tests/system/synthfromdnssec/tests.sh b/bin/tests/system/synthfromdnssec/tests.sh index 1d18d612e7..d5ea27298a 100644 --- a/bin/tests/system/synthfromdnssec/tests.sh +++ b/bin/tests/system/synthfromdnssec/tests.sh @@ -10,7 +10,6 @@ # information regarding copyright ownership. # shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" set -e diff --git a/bin/tests/system/system-test-driver.sh b/bin/tests/system/system-test-driver.sh.in old mode 100755 new mode 100644 similarity index 87% rename from bin/tests/system/system-test-driver.sh rename to bin/tests/system/system-test-driver.sh.in index 38710a3363..6ad8380643 --- a/bin/tests/system/system-test-driver.sh +++ b/bin/tests/system/system-test-driver.sh.in @@ -2,6 +2,9 @@ # shellcheck disable=SC2181 # shellcheck disable=SC2034 +builddir=@abs_builddir@ +srcdir=@abs_srcdir@ + usage() { echo "$0 --test-name=NAME --log-file=PATH.log --trs-file=PATH.trs --color-tests={yes|no} --expect-failure={yes|no} --enable-hard-errors={yes|no}" } @@ -17,7 +20,7 @@ fi OPTS=$(getopt --shell sh --name "$(basename "$0")" --options '' --longoptions test-name:,log-file:,trs-file:,color-tests:,expect-failure:,enable-hard-errors: -- "$@") -if [ "$?" != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi +if [ "$?" -ne 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi eval set -- "$OPTS" @@ -62,6 +65,6 @@ fi echo "Running $TEST_PROGRAM" -./run.sh -p "$(($RANDOM%32000+32000))" "$@" "$TEST_PROGRAM" +"${builddir}/run.sh" -p "$("${srcdir}/get_base_port.sh")" "$@" "$TEST_PROGRAM" exit $? diff --git a/bin/tests/system/tcp/setup.sh b/bin/tests/system/tcp/setup.sh index 7db0dec680..dc9bb97edb 100644 --- a/bin/tests/system/tcp/setup.sh +++ b/bin/tests/system/tcp/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/tcp/tests.sh b/bin/tests/system/tcp/tests.sh index 7e78d634af..a659019678 100644 --- a/bin/tests/system/tcp/tests.sh +++ b/bin/tests/system/tcp/tests.sh @@ -11,7 +11,6 @@ set -e -SYSTEMTESTTOP=.. # shellcheck source=../conf.sh . "$SYSTEMTESTTOP/conf.sh" @@ -81,7 +80,7 @@ refresh_tcp_stats() { # Send a command to the tool script listening on 10.53.0.6. send_command() { nextpart ans6/ans.run > /dev/null - echo "$*" | "${PERL}" "${SYSTEMTESTTOP}/send.pl" 10.53.0.6 "${CONTROLPORT}" + echo "$*" | send 10.53.0.6 "${CONTROLPORT}" wait_for_log_peek 10 "result=" ans6/ans.run || ret=1 if ! nextpartpeek ans6/ans.run | grep -qF "result=OK"; then return 1 diff --git a/bin/tests/system/tools/tests.sh b/bin/tests/system/tools/tests.sh index 9de91de891..f49f6eeda0 100644 --- a/bin/tests/system/tools/tests.sh +++ b/bin/tests/system/tools/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/tsig/setup.sh b/bin/tests/system/tsig/setup.sh index b3e0450b4a..1629d0cb71 100644 --- a/bin/tests/system/tsig/setup.sh +++ b/bin/tests/system/tsig/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/tsig/tests.sh b/bin/tests/system/tsig/tests.sh index 3a720decfc..6664ae0a88 100644 --- a/bin/tests/system/tsig/tests.sh +++ b/bin/tests/system/tsig/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/tsiggss/prereq.sh b/bin/tests/system/tsiggss/prereq.sh index ba0ac9b565..b552ebdc8b 100644 --- a/bin/tests/system/tsiggss/prereq.sh +++ b/bin/tests/system/tsiggss/prereq.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh # enable the tsiggss test only if gssapi was enabled diff --git a/bin/tests/system/tsiggss/setup.sh b/bin/tests/system/tsiggss/setup.sh index 74d16dd0ad..f6623ccbf1 100644 --- a/bin/tests/system/tsiggss/setup.sh +++ b/bin/tests/system/tsiggss/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh diff --git a/bin/tests/system/tsiggss/tests.sh b/bin/tests/system/tsiggss/tests.sh index 7c938ef78b..8a19050c40 100644 --- a/bin/tests/system/tsiggss/tests.sh +++ b/bin/tests/system/tsiggss/tests.sh @@ -11,7 +11,6 @@ # tests for TSIG-GSS updates -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/system/unknown/ns3/sign.sh b/bin/tests/system/unknown/ns3/sign.sh index 854047aadb..709e4aad14 100644 --- a/bin/tests/system/unknown/ns3/sign.sh +++ b/bin/tests/system/unknown/ns3/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh zone=example diff --git a/bin/tests/system/unknown/setup.sh b/bin/tests/system/unknown/setup.sh index 26805de9b8..492731f935 100644 --- a/bin/tests/system/unknown/setup.sh +++ b/bin/tests/system/unknown/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/unknown/tests.sh b/bin/tests/system/unknown/tests.sh index eeb8920ffa..119b8640b8 100644 --- a/bin/tests/system/unknown/tests.sh +++ b/bin/tests/system/unknown/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 @@ -145,7 +144,7 @@ status=`expr $status + $ret` echo_i "stop and restart slave" $PERL $SYSTEMTESTTOP/stop.pl unknown ns2 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} unknown ns2 +start --noclean --restart --port ${PORT} unknown ns2 # server may be answering queries before zones are loaded, # so retry a few times if this query fails @@ -169,7 +168,7 @@ status=`expr $status + $ret` echo_i "stop and restart inline slave" $PERL $SYSTEMTESTTOP/stop.pl unknown ns3 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} unknown ns3 +start --noclean --restart --port ${PORT} unknown ns3 # server may be answering queries before zones are loaded, # so retry a few times if this query fails diff --git a/bin/tests/system/upforwd/prereq.sh b/bin/tests/system/upforwd/prereq.sh deleted file mode 100644 index 0e299f4db8..0000000000 --- a/bin/tests/system/upforwd/prereq.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo_i "This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/upforwd/setup.sh b/bin/tests/system/upforwd/setup.sh index a59b54078a..64bb7feb70 100644 --- a/bin/tests/system/upforwd/setup.sh +++ b/bin/tests/system/upforwd/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh cp -f ns1/example1.db ns1/example.db diff --git a/bin/tests/system/upforwd/tests.sh b/bin/tests/system/upforwd/tests.sh index 3b0d7b3998..234fe53637 100644 --- a/bin/tests/system/upforwd/tests.sh +++ b/bin/tests/system/upforwd/tests.sh @@ -13,7 +13,6 @@ # ns2 = slave with update forwarding disabled; not currently used # ns3 = slave with update forwarding enabled -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/verify/setup.sh b/bin/tests/system/verify/setup.sh index dcd2eb8f78..8feca6f49d 100644 --- a/bin/tests/system/verify/setup.sh +++ b/bin/tests/system/verify/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh (cd zones && $SHELL genzones.sh) diff --git a/bin/tests/system/verify/tests.sh b/bin/tests/system/verify/tests.sh index e8b2210100..8c852d5714 100644 --- a/bin/tests/system/verify/tests.sh +++ b/bin/tests/system/verify/tests.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh failed () { cat verify.out.$n | sed 's/^/D:/'; diff --git a/bin/tests/system/verify/zones/genzones.sh b/bin/tests/system/verify/zones/genzones.sh index 1e5dcbb9b0..250fdd1870 100644 --- a/bin/tests/system/verify/zones/genzones.sh +++ b/bin/tests/system/verify/zones/genzones.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh SYSTESTDIR=verify diff --git a/bin/tests/system/views/setup.sh b/bin/tests/system/views/setup.sh index 05d6d65dba..a2f54fb5e2 100644 --- a/bin/tests/system/views/setup.sh +++ b/bin/tests/system/views/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh cp -f ns2/example1.db ns2/example.db diff --git a/bin/tests/system/views/tests.sh b/bin/tests/system/views/tests.sh index f3ce287962..b533da7722 100644 --- a/bin/tests/system/views/tests.sh +++ b/bin/tests/system/views/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth -p ${PORT}" diff --git a/bin/tests/system/wildcard/ns1/sign.sh b/bin/tests/system/wildcard/ns1/sign.sh index 497e2759a4..e28519ca1c 100755 --- a/bin/tests/system/wildcard/ns1/sign.sh +++ b/bin/tests/system/wildcard/ns1/sign.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh SYSTESTDIR=wildcard diff --git a/bin/tests/system/wildcard/setup.sh b/bin/tests/system/wildcard/setup.sh index d99aef773a..9c2a601ef8 100644 --- a/bin/tests/system/wildcard/setup.sh +++ b/bin/tests/system/wildcard/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf diff --git a/bin/tests/system/wildcard/tests.sh b/bin/tests/system/wildcard/tests.sh index 92ae193f8a..1abdd3f742 100644 --- a/bin/tests/system/wildcard/tests.sh +++ b/bin/tests/system/wildcard/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh status=0 diff --git a/bin/tests/win32/makejournal.vcxproj.filters.in b/bin/tests/system/win32/makejournal.vcxproj.filters.in similarity index 100% rename from bin/tests/win32/makejournal.vcxproj.filters.in rename to bin/tests/system/win32/makejournal.vcxproj.filters.in diff --git a/bin/tests/win32/makejournal.vcxproj.in b/bin/tests/system/win32/makejournal.vcxproj.in similarity index 100% rename from bin/tests/win32/makejournal.vcxproj.in rename to bin/tests/system/win32/makejournal.vcxproj.in diff --git a/bin/tests/win32/makejournal.vcxproj.user b/bin/tests/system/win32/makejournal.vcxproj.user similarity index 100% rename from bin/tests/win32/makejournal.vcxproj.user rename to bin/tests/system/win32/makejournal.vcxproj.user diff --git a/bin/tests/system/xfer/prereq.sh b/bin/tests/system/xfer/prereq.sh deleted file mode 100644 index 75cd53ad49..0000000000 --- a/bin/tests/system/xfer/prereq.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - if $PERL -e 'use Net::DNS; die if ($Net::DNS::VERSION >= 0.69 && $Net::DNS::VERSION <= 0.74);' 2>/dev/null - then - : - else - echo_i "Net::DNS versions 0.69 to 0.74 have bugs that cause this test to fail: please update." >&2 - exit 1 - fi -else - echo_i "This test requires the Net::DNS library." >&2 - exit 1 -fi - -if ! $PERL -e 'use Digest::HMAC;' 2>/dev/null -then - echo_i "This test requires the Digest::HMAC Perl module." >&2 - exit 1 -fi diff --git a/bin/tests/system/xfer/setup.sh b/bin/tests/system/xfer/setup.sh index ca69037336..a2661f359b 100644 --- a/bin/tests/system/xfer/setup.sh +++ b/bin/tests/system/xfer/setup.sh @@ -9,15 +9,14 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh -$SHELL ../genzone.sh 1 6 7 >ns1/slave.db -$SHELL ../genzone.sh 1 6 7 >ns1/edns-expire.db -$SHELL ../genzone.sh 2 3 >ns2/example.db -$SHELL ../genzone.sh 2 3 >ns2/tsigzone.db -$SHELL ../genzone.sh 6 3 >ns6/master.db -$SHELL ../genzone.sh 7 >ns7/master2.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 6 7 >ns1/slave.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 6 7 >ns1/edns-expire.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 3 >ns2/example.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 3 >ns2/tsigzone.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 6 3 >ns6/master.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 7 >ns7/master2.db cp -f ns4/root.db.in ns4/root.db $PERL -e 'for ($i=0;$i<10000;$i++){ printf("x%u 0 in a 10.53.0.1\n", $i);}' >> ns4/root.db diff --git a/bin/tests/system/xfer/tests.sh b/bin/tests/system/xfer/tests.sh index c88de9e679..731d067b27 100755 --- a/bin/tests/system/xfer/tests.sh +++ b/bin/tests/system/xfer/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" @@ -249,13 +248,16 @@ fi # now we test transfers with assorted TSIG glitches DIGCMD="$DIG $DIGOPTS @10.53.0.4" -SENDCMD="$PERL ../send.pl 10.53.0.5 $EXTRAPORT1" + +sendcmd() { + send 10.53.0.5 "$EXTRAPORT1" +} echo_i "testing that incorrectly signed transfers will fail..." n=$((n+1)) echo_i "initial correctly-signed transfer should succeed ($n)" -$SENDCMD < ans5/goodaxfr +sendcmd < ans5/goodaxfr # Initially, ns4 is not authoritative for anything. # Now that ans is up and running with the right data, we make ns4 @@ -292,7 +294,8 @@ $DIGCMD nil. TXT | grep 'initial AXFR' >/dev/null || { n=$((n+1)) echo_i "unsigned transfer ($n)" -$SENDCMD < ans5/unsigned +sendcmd < ans5/unsigned +sleep 1 $RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i @@ -311,7 +314,7 @@ $DIGCMD nil. TXT | grep 'unsigned AXFR' >/dev/null && { n=$((n+1)) echo_i "bad keydata ($n)" -$SENDCMD < ans5/badkeydata +sendcmd < ans5/badkeydata $RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i @@ -330,7 +333,7 @@ $DIGCMD nil. TXT | grep 'bad keydata AXFR' >/dev/null && { n=$((n+1)) echo_i "partially-signed transfer ($n)" -$SENDCMD < ans5/partial +sendcmd < ans5/partial $RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i @@ -349,7 +352,7 @@ $DIGCMD nil. TXT | grep 'partially signed AXFR' >/dev/null && { n=$((n+1)) echo_i "unknown key ($n)" -$SENDCMD < ans5/unknownkey +sendcmd < ans5/unknownkey $RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i @@ -368,7 +371,7 @@ $DIGCMD nil. TXT | grep 'unknown key AXFR' >/dev/null && { n=$((n+1)) echo_i "incorrect key ($n)" -$SENDCMD < ans5/wrongkey +sendcmd < ans5/wrongkey $RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i @@ -387,7 +390,7 @@ $DIGCMD nil. TXT | grep 'incorrect key AXFR' >/dev/null && { n=$((n+1)) echo_i "bad message id ($n)" -$SENDCMD < ans5/badmessageid +sendcmd < ans5/badmessageid # Uncomment to see AXFR stream with mismatching IDs. # $DIG $DIGOPTS @10.53.0.5 -y tsig_key:LSAnCU+Z nil. AXFR +all @@ -444,7 +447,7 @@ tmp=0 $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1.test$n grep "status: NOERROR," dig.out.1.test$n > /dev/null || tmp=1 $PERL $SYSTEMTESTTOP/stop.pl xfer ns3 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} xfer ns3 +start --noclean --restart --port ${PORT} xfer ns3 check_mapped () { $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.test$n grep "status: NOERROR," dig.out.2.test$n > /dev/null || return 1 diff --git a/bin/tests/system/xferquota/setup.sh b/bin/tests/system/xferquota/setup.sh index 6b653493f1..2cabeb7bc1 100644 --- a/bin/tests/system/xferquota/setup.sh +++ b/bin/tests/system/xferquota/setup.sh @@ -13,7 +13,6 @@ # Set up test data for zone transfer quota tests. # -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $PERL setup.pl diff --git a/bin/tests/system/xferquota/tests.sh b/bin/tests/system/xferquota/tests.sh index 919d7e2530..b5a4535077 100755 --- a/bin/tests/system/xferquota/tests.sh +++ b/bin/tests/system/xferquota/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/zero/prereq.sh b/bin/tests/system/zero/prereq.sh deleted file mode 100644 index de147a4c2a..0000000000 --- a/bin/tests/system/zero/prereq.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -SYSTEMTESTTOP=.. -. $SYSTEMTESTTOP/conf.sh - -if $PERL -e 'use Net::DNS;' 2>/dev/null -then - : -else - echo "I:This test requires the Net::DNS library." >&2 - exit 1 -fi diff --git a/bin/tests/system/zero/setup.sh b/bin/tests/system/zero/setup.sh index 83c35ea60d..7ef0b8fb6b 100644 --- a/bin/tests/system/zero/setup.sh +++ b/bin/tests/system/zero/setup.sh @@ -7,7 +7,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh copy_setports ns1/named.conf.in ns1/named.conf @@ -15,4 +14,4 @@ copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns3/named.conf.in ns3/named.conf copy_setports ns4/named.conf.in ns4/named.conf -$SHELL ../genzone.sh 2 4 | sed -e 's/^$TTL 3600$/$TTL 0 ; force TTL to zero/' -e 's/86400.IN SOA/0 SOA/' > ns2/example.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 4 | sed -e 's/^$TTL 3600$/$TTL 0 ; force TTL to zero/' -e 's/86400.IN SOA/0 SOA/' > ns2/example.db diff --git a/bin/tests/system/zero/tests.sh b/bin/tests/system/zero/tests.sh index 681ba118db..a5e4de9c4a 100644 --- a/bin/tests/system/zero/tests.sh +++ b/bin/tests/system/zero/tests.sh @@ -10,7 +10,6 @@ # information regarding copyright ownership. #shellcheck source=conf.sh -SYSTEMTESTTOP=.. . "$SYSTEMTESTTOP/conf.sh" dig_with_opts() { diff --git a/bin/tests/system/zonechecks/setup.sh b/bin/tests/system/zonechecks/setup.sh index dcd8e4c2c8..d704d7db75 100644 --- a/bin/tests/system/zonechecks/setup.sh +++ b/bin/tests/system/zonechecks/setup.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh $SHELL clean.sh @@ -17,8 +16,8 @@ $SHELL clean.sh copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns2/named.conf.in ns2/named.conf -$SHELL ../genzone.sh 1 > ns1/master.db -$SHELL ../genzone.sh 1 > ns1/duplicate.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 > ns1/master.db +$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 1 > ns1/duplicate.db cp bigserial.db ns1/ cd ns1 touch master.db.signed diff --git a/bin/tests/system/zonechecks/tests.sh b/bin/tests/system/zonechecks/tests.sh index 92da5b4824..b8fcb08ddd 100644 --- a/bin/tests/system/zonechecks/tests.sh +++ b/bin/tests/system/zonechecks/tests.sh @@ -9,7 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh DIGOPTS="-p ${PORT}" diff --git a/bin/tools/Makefile.am b/bin/tools/Makefile.am new file mode 100644 index 0000000000..4fb47c9624 --- /dev/null +++ b/bin/tools/Makefile.am @@ -0,0 +1,54 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) + +LDADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) + +bin_PROGRAMS = \ + arpaname \ + named-rrchecker \ + mdig + +sbin_PROGRAMS = \ + named-journalprint \ + nsec3hash + +mdig_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBBIND9_CFLAGS) + +mdig_LDADD = \ + $(LDADD) \ + $(LIBBIND9_LIBS) + +if HAVE_DNSTAP +bin_PROGRAMS += \ + dnstap-read + +dnstap_read_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(DNSTAP_CFLAGS) \ + -I$(top_builddir)/lib/dns + +dnstap_read_LDADD = \ + $(LDADD) \ + $(DNSTAP_LIBS) +endif + +if HAVE_LMDB +sbin_PROGRAMS += \ + named-nzd2nzf + +named_nzd2nzf_CFLAGS = \ + $(AM_CPPFLAGS) \ + $(LMDB_CFLAGS) + +named_nzd2nzf_LDADD = \ + $(LDADD) \ + $(LMDB_LIBS) + +endif diff --git a/bin/tools/dnstap-read.c b/bin/tools/dnstap-read.c index fd38fe21a0..c14424512e 100644 --- a/bin/tools/dnstap-read.c +++ b/bin/tools/dnstap-read.c @@ -33,6 +33,7 @@ #include +#include #include #include #include @@ -48,7 +49,7 @@ #include #include -#include "lib/dns/dnstap.pb-c.h" +#include "dnstap.pb-c.h" isc_mem_t *mctx = NULL; bool memrecord = false; @@ -68,8 +69,8 @@ const char *program = "dnstap-read"; } \ } while (0) -ISC_PLATFORM_NORETURN_PRE static void -fatal(const char *format, ...) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +fatal(const char *format, ...); static void fatal(const char *format, ...) { diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index 65264b817e..b19afba4da 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -782,8 +783,8 @@ sendqueries(isc_task_t *task, isc_event_t *event) { return; } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -893,9 +894,8 @@ help(void) { stdout); } -ISC_PLATFORM_NORETURN_PRE static void -fatal(const char *format, ...) - ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); static void fatal(const char *format, ...) { @@ -1715,7 +1715,7 @@ dash_option(const char *option, char *next, struct query *query, bool global, */ break; case 'v': - fputs("mDiG " VERSION "\n", stderr); + fprintf(stderr, "mDiG %s\n", PACKAGE_VERSION); exit(0); break; } @@ -1811,7 +1811,7 @@ dash_option(const char *option, char *next, struct query *query, bool global, } static struct query * -clone_default_query() { +clone_default_query(void) { struct query *query; query = isc_mem_allocate(mctx, sizeof(struct query)); diff --git a/bin/tools/named-rrchecker.c b/bin/tools/named-rrchecker.c index bc564d1250..50c6639608 100644 --- a/bin/tools/named-rrchecker.c +++ b/bin/tools/named-rrchecker.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -32,8 +33,8 @@ static isc_lex_t *lex; static isc_lexspecials_t specials; -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { @@ -49,8 +50,8 @@ usage(void) { exit(0); } -ISC_PLATFORM_NORETURN_PRE static void -fatal(const char *format, ...) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +fatal(const char *format, ...); static void fatal(const char *format, ...) { diff --git a/bin/tools/nsec3hash.c b/bin/tools/nsec3hash.c index d72e64c42b..6ad6449119 100644 --- a/bin/tools/nsec3hash.c +++ b/bin/tools/nsec3hash.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -32,8 +33,8 @@ const char *program = "nsec3hash"; -ISC_PLATFORM_NORETURN_PRE static void -fatal(const char *format, ...) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +fatal(const char *format, ...); static void fatal(const char *format, ...) { @@ -55,7 +56,7 @@ check_result(isc_result_t result, const char *message) { } static void -usage() { +usage(void) { fprintf(stderr, "Usage: %s salt algorithm iterations domain\n", program); fprintf(stderr, " %s -r algorithm flags iterations salt domain\n", diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp index 7172de39e9..83b9c4a2a4 100644 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp @@ -151,9 +151,6 @@ const FileData installFiles[] = {"krb5_64.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, #endif #endif -#ifdef HAVE_GEOIP - {"libgeoip.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, -#endif #ifdef WITH_IDN {"idnkit.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, {"iconv.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, diff --git a/bind.keys.h b/bind.keys.h deleted file mode 100644 index 4d156dac4e..0000000000 --- a/bind.keys.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef BIND_KEYS_H -#define BIND_KEYS_H 1 -#define TRUST_ANCHORS \ - "\ -# The bind.keys file is used to override the built-in DNSSEC trust anchors\n\ -# which are included as part of BIND 9. The only trust anchors it contains\n\ -# are for the DNS root zone (\".\"). Trust anchors for any other zones MUST\n\ -# be configured elsewhere; if they are configured here, they will not be\n\ -# recognized or used by named.\n\ -#\n\ -# To use the built-in root key, set \"dnssec-validation auto;\" in the\n\ -# named.conf options, or else leave \"dnssec-validation\" unset. If\n\ -# \"dnssec-validation\" is set to \"yes\", then the keys in this file are\n\ -# ignored; keys will need to be explicitly configured in named.conf for\n\ -# validation to work. \"auto\" is the default setting, unless named is\n\ -# built with \"configure --disable-auto-validation\", in which case the\n\ -# default is \"yes\".\n\ -#\n\ -# This file is NOT expected to be user-configured.\n\ -#\n\ -# Servers being set up for the first time can use the contents of this file\n\ -# as initializing keys; thereafter, the keys in the managed key database\n\ -# will be trusted and maintained automatically.\n\ -#\n\ -# These keys are current as of Mar 2019. If any key fails to initialize\n\ -# correctly, it may have expired. In that event you should replace this\n\ -# file with a current version. The latest version of bind.keys can always\n\ -# be obtained from ISC at https://www.isc.org/bind-keys.\n\ -#\n\ -# See https://data.iana.org/root-anchors/root-anchors.xml for current trust\n\ -# anchor information for the root zone.\n\ -\n\ -trust-anchors {\n\ - # This key (20326) was published in the root zone in 2017.\n\ - . initial-key 257 3 8 \"AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3\n\ - +/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv\n\ - ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF\n\ - 0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+e\n\ - oZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfd\n\ - RUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwN\n\ - R1AkUTV74bU=\";\n\ -};\n\ -" -#endif /* BIND_KEYS_H */ diff --git a/config.h.win32 b/config.h.win32 index d3f3d210b8..4f3dc96d30 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -57,6 +57,9 @@ #if NTDDI_VERSION < 0x06020000 #error Minimum Target environment is Windows 8 and Windows Server 2012 #endif +#if _MSC_VER <= 1910 +#error Minimum Visual Studio version is 2017 or higher +#endif /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -113,13 +116,6 @@ char *getpassphrase(const char *); -/* - * Define to 1 if you want to use the DLZ "dlopen" driver - * (which has the same name on windows even though it uses - * LoadLibrary() instead of dlopen()). - */ -#define ISC_DLZ_DLOPEN 1 - #define S_IFMT _S_IFMT /* file type mask */ #define S_IFDIR _S_IFDIR /* directory */ #define S_IFCHR _S_IFCHR /* character special */ @@ -258,7 +254,7 @@ typedef __int64 off_t; /* * Configure sensible arguments */ -@CONFIGARGS@ +@PACKAGE_CONFIGARGS@ /* * Define if libxml2 is present diff --git a/configure.ac b/configure.ac index 2526738c98..592f40f169 100644 --- a/configure.ac +++ b/configure.ac @@ -7,23 +7,93 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -AC_INIT(BIND, [9.17], [info@isc.org], [], [https://www.isc.org/downloads/]) -AC_PREREQ([2.60]) +# +# Defining the version in m4 requires a bit of dancing around, +# so the strings are properly concatenated, as you can't use +# a shell variable in AC_INIT() +# +m4_define([bind_VERSION_MAJOR], 9)dnl +m4_define([bind_VERSION_MINOR], 17)dnl +m4_define([bind_VERSION_PATCH], 1)dnl +m4_define([bind_VERSION_EXTRA], -dev)dnl +m4_define([bind_DESCRIPTION], [(Development Release)])dnl +m4_define([bind_SRCID], [m4_esyscmd_s([if test -f srcid; then cat srcid; else git rev-parse --short HEAD 2>/dev/null; fi])])dnl +m4_define([bind_PKG_VERSION], [[bind_VERSION_MAJOR.bind_VERSION_MINOR.bind_VERSION_PATCH]bind_VERSION_EXTRA])dnl + +# +# Autoconf initialization +# +AC_INIT([BIND], bind_PKG_VERSION, [info@isc.org], [], [https://www.isc.org/downloads/]) +AC_PREREQ(2.60) + +AC_DEFINE([PACKAGE_VERSION_MAJOR], ["][bind_VERSION_MAJOR]["], [BIND 9 Major part of the version]) +AC_DEFINE([PACKAGE_VERSION_MINOR], ["][bind_VERSION_MINOR]["], [BIND 9 Minor part of the version]) +AC_DEFINE([PACKAGE_VERSION_PATCH], ["][bind_VERSION_PATCH]["], [BIND 9 Patch part of the version]) +AC_DEFINE([PACKAGE_VERSION_EXTRA], ["][bind_VERSION_EXTRA]["], [BIND 9 Extra part of the version]) +AC_DEFINE([PACKAGE_DESCRIPTION], [m4_ifnblank(bind_DESCRIPTION, [" ]bind_DESCRIPTION["], [])], [An extra string to print after PACKAGE_STRING]) +AC_DEFINE([PACKAGE_SRCID], ["][bind_SRCID]["], [A short hash from git]) + +# This value should be increased whenever changing the structure of +# any object that will appear in a type 'map' master file (which +# contains a working memory image of an RBT database), as loading +# an incorrect memory image produces an inconsistent and probably +# nonfunctional database. These structures include but are not +# necessarily limited to dns_masterrawheader, rbtdb_file_header, +# rbt_file_header, dns_rbtdb, dns_rbt, dns_rbtnode, rdatasetheader. +# +# Err on the side of caution: if anything in the RBTDB is changed, +# bump the value. Making map files unreadable protects the system +# from instability; it's a feature not a bug. +# +# Whenever releasing a new major release of BIND9, set this value +# back to 1.0 when releasing the first alpha. Map files are *never* +# compatible across major releases. +AC_DEFINE([MAPAPI], ["2.0"], [BIND 9 MAPAPI Version]) + +bind_CONFIGARGS="${ac_configure_args:-default}" +AC_DEFINE_UNQUOTED([PACKAGE_CONFIGARGS], ["$bind_CONFIGARGS"], [Either 'defaults' or used ./configure options]) + +AC_DEFINE([PACKAGE_BUILDER], ["make"], [make or Visual Studio]) + +AC_CONFIG_SRCDIR([bin/named/main.c]) +AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz -Wall -Werror]) +AM_SILENT_RULES([yes]) + +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) # # Enable maintainer mode by default, but allow to disable it in the CI # AM_MAINTAINER_MODE([enable]) -AC_CONFIG_HEADER(config.h) -AC_CONFIG_MACRO_DIR([m4]) +# Set the library versions +# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -AC_CANONICAL_HOST +AX_BIND9_LIB_VERSION([bind9]) +AX_BIND9_LIB_VERSION([dns]) +AX_BIND9_LIB_VERSION([irs]) +AX_BIND9_LIB_VERSION([isc]) +AX_BIND9_LIB_VERSION([isccc]) +AX_BIND9_LIB_VERSION([isccfg]) +AX_BIND9_LIB_VERSION([ns]) # # Enable system extensions to C and POSIX # AC_USE_SYSTEM_EXTENSIONS +AC_CANONICAL_HOST + +# +# Compiler compatibility flags +# +AC_PROG_CC_C99 +AC_PROG_CPP_WERROR + +# +# Find the machine's endian flavor. +# +AC_C_BIGENDIAN # # Enable large file support @@ -31,19 +101,14 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_FSEEKO -LFS_CFLAGS=`getconf LFS_CFLAGS 2>/dev/null` -LFS_LDFLAGS=`getconf LFS_LDFLAGS 2>/dev/null` -LFS_LIBS=`getconf LFS_LIBS 2>/dev/null` - -AC_SUBST([LFS_CFLAGS]) -AC_SUBST([LFS_LDFLAGS]) -AC_SUBST([LFS_LIBS]) - # Enable RFC 3542 APIs on macOS AC_DEFINE([__APPLE_USE_RFC_3542], [1], [Select RFC3542 IPv6 API on macOS]) AC_PROG_MAKE_SET +# Checks for programs. +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # call AM_PROG_AR only if available + AC_PROG_LIBTOOL AS_IF([test -z "$LIBTOOL"], [AC_MSG_ERROR([The libtool script could not be found.])]) @@ -51,11 +116,57 @@ AC_PROG_INSTALL AC_PROG_LN_S AX_POSIX_SHELL -AC_SUBST(STD_CINCLUDES) -AC_SUBST(STD_CDEFINES) -AC_SUBST(STD_CWARNINGS) -AC_SUBST(CCOPT) -AC_SUBST(CCNOOPT) +# Initialize libtool +LT_INIT([dlopen]) + +LT_CONFIG_LTDL_DIR([libltdl]) +LTDL_INIT([recursive]) +AC_CONFIG_FILES([libltdl/Makefile]) + +# +# Set the default CFLAGS and CPPFLAGS +# +STD_CFLAGS="-Wall -Wextra -Wwrite-strings -Wcast-qual -Wpointer-arith -Wno-missing-field-initializers -Wformat -Wshadow" + +# These should be always errors +STD_CFLAGS="$STD_CFLAGS -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=format-security -Werror=parentheses -Werror=implicit -Werror=strict-prototypes" + +# Fortify the sources by default +STD_CPPFLAGS="-D_FORTIFY_SOURCE=2" + +# +# Additional compiler settings. +# +AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], + [STD_CFLAGS="$STD_CFLAGS -fno-strict-aliasing"]) +AX_CHECK_COMPILE_FLAG([-fno-delete-null-pointer-checks], + [STD_CFLAGS="$STD_CFLAGS -fno-delete-null-pointer-checks"]) +AX_CHECK_COMPILE_FLAG([-fdiagnostics-show-option], + [STD_CFLAGS="$STD_CFLAGS -fdiagnostics-show-option"]) + +AC_ARG_ENABLE([warn_error], + [AS_HELP_STRING([--enable-warn-error], + [turn on -Werror when compiling])], + [],[enable_warn_error=no]) +AS_IF([test "$enable_warn_error" = "yes"], + [STD_CFLAGS="$STD_CFLAGS -Werror"]) + +AC_ARG_ENABLE([developer], + [AS_HELP_STRING([--enable-developer], + [enable developer build settings])]) + +AS_IF([test "$enable_developer" = "yes"], + [STD_CPPFLAGS="$STD_CPPFLAGS -DISC_MEM_DEFAULTFILL=1 -DISC_LIST_CHECKINIT=1" + test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes + test "${enable_querytrace+set}" = set || enable_querytrace=yes + test "${with_cmocka+set}" = set || with_cmocka=yes + test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes + test "${with_zlib+set}" = set || with_zlib=yes + test "${enable_warn_error+set}" = set || enable_warn_error=yes + ]) + +AC_SUBST([STD_CFLAGS]) +AC_SUBST([STD_CPPFLAGS]) # # Use pkg-config @@ -76,32 +187,6 @@ AC_ARG_ENABLE(buffer_useinline, fi, AC_DEFINE([ISC_BUFFER_USEINLINE], [1])) -AC_ARG_ENABLE([warn_shadow], - [AS_HELP_STRING([--enable-warn-shadow], - [turn on -Wshadow when compiling])]) - -AC_ARG_ENABLE([warn_error], - [AS_HELP_STRING([--enable-warn-error], - [turn on -Werror when compiling])]) - -AC_ARG_ENABLE([developer], - [AS_HELP_STRING([--enable-developer], - [enable developer build settings])]) - -XTARGETS= -AS_IF([test "$enable_developer" = "yes"], - [STD_CDEFINES="$STD_CDEFINES -DISC_MEM_DEFAULTFILL=1 -DISC_LIST_CHECKINIT=1" - test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes - test "${enable_querytrace+set}" = set || enable_querytrace=yes - test "${with_cmocka+set}" = set || with_cmocka=yes - test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes - test "${enable_warn_error+set}" = set || enable_warn_error=yes - test "${enable_warn_shadow+set}" = set || enable_warn_shadow=yes - test "${with_zlib+set}" = set || with_zlib=yes - XTARGETS='${XTARGETS}' - ]) -AC_SUBST([XTARGETS]) - AC_ARG_ENABLE([fuzzing], [AS_HELP_STRING([--enable-fuzzing=], [Enable fuzzing using American Fuzzy Lop or libFuzzer (default=no)])], @@ -155,119 +240,48 @@ no) ;; esac -# -# Make very sure that these are the first files processed by -# config.status, since we use the processed output as the input for -# AC_SUBST_FILE() substitutions in other files. -# -AC_CONFIG_FILES([make/rules make/includes]) - -AC_PATH_PROG(AR, ar) -ARFLAGS="cruv" -AC_SUBST(AR) -AC_SUBST(ARFLAGS) - -# The POSIX ln(1) program. Non-POSIX systems may substitute -# "copy" or something. -LN=ln -AC_SUBST(LN) - -case "$AR" in - "") - AC_MSG_ERROR([ -ar program not found. Please fix your PATH to include the directory in -which ar resides, or set AR in the environment with the full path to ar. -]) - - ;; -esac - # # Perl is optional; it is used only by some of the system test scripts. # Note: the backtrace feature (see below) uses perl to build the symbol table, # but it still compiles without perl, in which case an empty table will be used. # -AC_PATH_PROGS(PERL, perl5 perl) -AC_SUBST(PERL) +AC_PATH_PROGS([PERL], [perl5 perl]) +AC_SUBST([PERL]) +AM_CONDITIONAL([HAVE_PERL], [test -n "$PERL"]) + +AX_PERL_MODULE([Digest::HMAC]) +AM_CONDITIONAL([HAVE_PERLMOD_DIGEST_HMAC], + [test "$HAVE_PERLMOD_DIGEST__HMAC" = "yes"]) + +AX_PERL_MODULE([File::Fetch]) +AM_CONDITIONAL([HAVE_PERLMOD_FILE_FETCH], + [test "$HAVE_PERLMOD_FILE__FETCH" = "yes"]) + +AX_PERL_MODULE([Net::DNS]) +AM_CONDITIONAL([HAVE_PERLMOD_NET_DNS], + [test "$HAVE_PERLMOD_NET__DNS" = "yes"]) + +AX_PERL_MODULE([Net::DNS::Nameserver]) +AM_CONDITIONAL([HAVE_PERLMOD_NET_DNS_NAMESERVER], + [test "$HAVE_PERLMOD_NET__DNS__NAMESERVER" = "yes"]) + +AX_PERL_MODULE([Time::HiRes]) +AM_CONDITIONAL([HAVE_PERLMOD_TIME_HIRES], + [test "$HAVE_PERLMOD_TIME__HIRES" = "yes"]) # -# Python 3 is optional; it is used by the system test scripts. +# Python is optional, it is used only by some of the system test scripts. # -testminvers='import sys -if (sys.version_info < (3,5)): - exit(1)' +AM_PATH_PYTHON([3.4], [], [:]) +AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ":"]) -default_with_python="python python3 python3.8 python3.7 python3.6 python3.5" - -AC_ARG_VAR([PYTHON], [path to python executable]) - -AC_ARG_WITH([python], - AS_HELP_STRING([--with-python=PATH], - [specify path to Python 3 interpreter]), - [], [with_python=$default_with_python]) - -AS_IF([test "$with_python" = "yes"], - [with_python=$default_with_python]) - -AS_IF([test "$with_python" = "no"], - [AC_MSG_CHECKING([for Python support]) - unset PYTHON - AC_MSG_RESULT([disabled])], - [for p in $with_python - do - AS_CASE([$p], - [/*],[PYTHON="$p"]) - - AC_PATH_PROG([PYTHON], [$p]) - # Do not cache the result of the check from the previous line. If the - # first found Python interpreter has missing module dependencies and - # the result of the above check is cached, subsequent module checks - # will erroneously keep on using the cached path to the first found - # Python interpreter instead of different ones. - unset ac_cv_path_PYTHON - - AS_IF([test -z "$PYTHON"], [continue]) - - AC_MSG_CHECKING([if $PYTHON is Python version >= 3.5]) - AS_IF(["$PYTHON" -c "$testminvers" 2>/dev/null], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - unset PYTHON - continue]) - - # Stop looking any further once we find a Python 3 interpreter - # satisfying all requirements. - break - done]) +AX_PYTHON_MODULE([dns]) +AM_CONDITIONAL([HAVE_PYMOD_DNS], [test "$HAVE_PYMOD_DNS" = "yes"]) # -# Make sure INSTALL uses an absolute path, else it will be wrong in all -# Makefiles, since they use make/rules.in and INSTALL will be adjusted by -# configure based on the location of the file where it is substituted. -# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate -# subdirectory of install-sh, This relative path will be wrong for all -# directories more than one level down from install-sh. +# xsltproc is optional, it is used only by system test scripts. # -case "$INSTALL" in - /*) - ;; - *) - # - # Not all systems have dirname. - # - changequote({, }) - ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`" - changequote([, ]) - - ac_prog="`echo $INSTALL | sed 's%.*/%%'`" - test "X$ac_dir" = "X$ac_prog" && ac_dir=. - test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`" - INSTALL="$ac_dir/$ac_prog" - ;; -esac - -AC_PROG_CC -AC_PROG_CC_C99 +AC_PATH_PROG([XSLTPROC], [xsltproc]) # # Using Solaris linker with gcc on Solaris breaks Thread Local Storage @@ -280,63 +294,25 @@ AS_CASE([$host], ]) ]) -# -# CCNOOPT defaults to -O0 on gcc and disables optimization when is last -# -if test "X$CCNOOPT" = "X" -a "X$GCC" = "Xyes"; then - CCNOOPT="-O0" -fi - AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h sys/socket.h net/route.h linux/netlink.h linux/rtnetlink.h,,, -[$ac_includes_default -#ifdef HAVE_SYS_PARAM_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -]) +AC_CHECK_HEADERS([fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h sys/socket.h net/route.h linux/netlink.h linux/rtnetlink.h], [], [], + [$ac_includes_default + #ifdef HAVE_SYS_PARAM_H + # include + #endif + #ifdef HAVE_SYS_SOCKET_H + # include + #endif + ]) # # Check for thread local storage # -AC_CHECK_HEADERS([threads.h], - [ - AC_MSG_CHECKING([for C11 Thread-Local Storage using thread_local]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [ - #include - ],[ - static thread_local int tls = 0; - return (tls); - ]) - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_THREAD_LOCAL],[1],[Define if thread_local keyword is available]) - AC_DEFINE([HAVE_TLS],[1],[Define if Thread-Local Storage is available]) - ],[ - AC_MSG_ERROR([Thread Local Storage support required, update your toolchain to build BIND 9]) - ]) - ],[ - AC_MSG_CHECKING([for Thread-Local Storage using __thread]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [ - ],[ - static __thread int tls = 0; - return (tls); - ]) - ],[ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE___THREAD],[1],[Define if __thread keyword is available]) - AC_DEFINE([HAVE_TLS],[1],[Define if Thread-Local Storage is available]) - ],[ - AC_MSG_ERROR([Thread Local Storage support required, update your toolchain to build BIND 9]) - ]) - ]) +AC_CHECK_HEADERS([threads.h]) +AX_TLS([AS_IF([test "$ac_cv_tls" != "thread_local"], + [AC_DEFINE_UNQUOTED([thread_local], [$ac_cv_tls], [Define if the compiler uses a different keyword than thread_local for TLS variables])])], + [AC_MSG_ERROR([Thread Local Storage support required, update your toolchain to build BIND 9])]) AC_C_CONST AC_C_INLINE @@ -381,8 +357,8 @@ AC_CHECK_FUNCS(mmap) # # Older versions of HP/UX don't define seteuid() and setegid() # -AC_CHECK_FUNCS(seteuid setresuid) -AC_CHECK_FUNCS(setegid setresgid) +AC_CHECK_FUNCS([seteuid setresuid]) +AC_CHECK_FUNCS([setegid setresgid]) AC_TYPE_SIZE_T AC_TYPE_SSIZE_T @@ -415,16 +391,7 @@ AC_COMPILE_IFELSE( # # check for GCC noreturn attribute # -AC_MSG_CHECKING(for GCC noreturn attribute) -AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE" - ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE" - ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST"]) -AC_SUBST(ISC_PLATFORM_NORETURN_PRE) -AC_SUBST(ISC_PLATFORM_NORETURN_POST) +AX_GCC_FUNC_ATTRIBUTE([noreturn]) # # check if we have kqueue @@ -459,22 +426,11 @@ AC_ARG_ENABLE([devpoll], AS_IF([test "$enable_devpoll" = "yes"], [AC_CHECK_HEADERS([sys/devpoll.h devpoll.h])]) -# -# Find the machine's endian flavor. -# -AC_C_BIGENDIAN - # # GeoIP support? # # Should be on by default if libmaxminddb exists. # -AC_ARG_WITH([geoip2], - [AS_HELP_STRING([--with-geoip2], - [deprecated, use --with-maxminddb])], - [AC_MSG_WARN([--with-geoip2 is DEPRECATED and will be removed in a future release, use --with-maxminddb instead])], - [with_geoip2="auto"]) - AC_ARG_ENABLE([geoip], [AS_HELP_STRING([--disable-geoip], [support GeoIP2 geolocation ACLs if available [default=yes]])], @@ -483,35 +439,27 @@ AC_ARG_ENABLE([geoip], AC_ARG_WITH([maxminddb], [AS_HELP_STRING([--with-maxminddb=PATH], [Build with MaxMind GeoIP2 support (auto|yes|no|path) [default=auto]])], - [], [with_maxminddb="$with_geoip2"]) + [], [with_maxminddb="auto"]) -GEOIP2LINKSRCS= -GEOIP2LINKOBJS= AS_IF([test "$enable_geoip" = "yes"], [AS_CASE([$with_maxminddb], [no],[AC_MSG_ERROR([Use '--disable-geoip' to disable the GeoIP])], [auto],[PKG_CHECK_MODULES([MAXMINDDB], [libmaxminddb], [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support]) PKG_CHECK_VAR([MAXMINDDB_PREFIX], [libmaxminddb], [prefix], [], [AC_MSG_ERROR([libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment])]) - GEOIP2LINKSRCS='${GEOIP2LINKSRCS}' - GEOIP2LINKOBJS='${GEOIP2LINKOBJS}' ],[:])], [yes],[PKG_CHECK_MODULES([MAXMINDDB], [libmaxminddb], [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support]) PKG_CHECK_VAR([MAXMINDDB_PREFIX], [libmaxminddb], [prefix], [], [AC_MSG_ERROR([libmaxminddb prefix not found in pkg-config; set MAXMINDDB_PREFIX in the environment])]) - GEOIP2LINKSRCS='${GEOIP2LINKSRCS}' - GEOIP2LINKOBJS='${GEOIP2LINKOBJS}' ])], [ # default AX_SAVE_FLAGS([maxminddb]) MAXMINDDB_CFLAGS="-I$with_maxminddb/include" MAXMINDDB_LIBS="-L$with_maxminddb/lib" CFLAGS="$CFLAGS $MAXMINDDB_CFLAGS" - LDFLAGS="$LDFLAGS $MAXMINDDB_LIBS" + LIBS="$LIBS $MAXMINDDB_LIBS" AC_SEARCH_LIBS([MMDB_open], [maxminddb], [AC_DEFINE([HAVE_GEOIP2], [1], [Build with GeoIP2 support]) - GEOIP2LINKSRCS='${GEOIP2LINKSRCS}' - GEOIP2LINKOBJS='${GEOIP2LINKOBJS}' MAXMINDDB_LIBS="$MAXMINDDB_LIBS $ac_cv_search_mmdb_open" AC_MSG_NOTICE([GeoIP2 default database path set to $with_maxminddb/share/GeoIP]) AS_VAR_COPY([MAXMINDDB_PREFIX], [$with_maxminddb]) @@ -522,15 +470,10 @@ AS_IF([test "$enable_geoip" = "yes"], AC_ARG_VAR([MAXMINDDB_PREFIX], [value of prefix for MAXMINDDB, overriding pkg-config]) ]) +AM_CONDITIONAL([HAVE_GEOIP2], [test -n "$MAXMINDDB_LIBS"]) + AC_SUBST([MAXMINDDB_CFLAGS]) AC_SUBST([MAXMINDDB_LIBS]) -AC_SUBST([GEOIP2LINKSRCS]) -AC_SUBST([GEOIP2LINKOBJS]) - -# -# Do we have arc4random(), etc ? -# -AC_CHECK_FUNCS(arc4random arc4random_buf arc4random_uniform getrandom) AX_PTHREAD @@ -584,7 +527,7 @@ AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np]) AC_CHECK_HEADERS([pthread_np.h], [], [], [#include ]) # libuv -AC_MSG_CHECKING(for libuv) +AC_MSG_CHECKING([for libuv]) PKG_CHECK_MODULES([LIBUV], [libuv >= 1.0.0], [], [AC_MSG_ERROR([libuv not found])]) AX_SAVE_FLAGS([libuv]) @@ -595,6 +538,7 @@ LIBS="$LIBS $LIBUV_LIBS" # Those functions are only provided in newer versions of libuv, we'll be emulating them # for now AC_CHECK_FUNCS([uv_handle_get_data uv_handle_set_data uv_import]) +AX_RESTORE_FLAGS([libuv]) # # flockfile is usually provided by pthreads @@ -606,8 +550,6 @@ AC_CHECK_FUNCS([flockfile getc_unlocked]) # AC_CHECK_FUNCS([sysconf]) -AC_SUBST(ALWAYS_DEFINES) - # # Do we want to use pthread rwlock? # @@ -751,12 +693,10 @@ AX_RESTORE_FLAGS([openssl]) AC_SUBST([OPENSSL_CFLAGS]) AC_SUBST([OPENSSL_LIBS]) -PKCS11_TOOLS= -PKCS11_TEST= # # was --enable-native-pkcs11 specified? # -AC_ARG_ENABLE(native-pkcs11, +AC_ARG_ENABLE([native-pkcs11], AS_HELP_STRING([--enable-native-pkcs11], [use native PKCS11 for public-key crypto [default=no]]), [:], [enable_native_pkcs11="no"]) @@ -764,26 +704,17 @@ AC_ARG_ENABLE(native-pkcs11, AC_MSG_CHECKING([for PKCS11 for Public-Key Cryptography]) AS_CASE([$enable_native_pkcs11], [no],[AC_MSG_RESULT([no])], - [yes],[PKCS11_TOOLS=pkcs11 - PKCS11_TEST=pkcs11 - CRYPTO=pkcs11 - AS_IF([$use_threads], - [:], - [AC_MSG_ERROR([PKCS11 requires threading support])]) + [yes],[CRYPTO=pkcs11 AC_MSG_RESULT([yes]) AC_CHECK_FUNCS([getpassphrase]) ]) -AC_SUBST([PKCS11_TEST]) -AC_SUBST([PKCS11_TOOLS]) +AM_CONDITIONAL([HAVE_PKCS11], [test "$CRYPTO" = "pkcs11"]) AC_SUBST([CRYPTO]) AS_CASE([$CRYPTO], [pkcs11],[AC_DEFINE([USE_PKCS11], [1], [define if PKCS11 is used for Public-Key Cryptography])], [AC_DEFINE([USE_OPENSSL], [1], [define if OpenSSL is used for Public-Key Cryptography])]) -# preparation for automake -# AM_CONDITIONAL([PKCS11_TOOLS], [test "$with_native_pkcs11" = "yes"]) - # # was --with-pkcs11 specified? # @@ -797,301 +728,69 @@ AS_CASE([$with_pkcs11], [no|undefined],[with_pkcs11="undefined"]) AC_DEFINE_UNQUOTED([PK11_LIB_LOCATION], ["$with_pkcs11"], [define the default PKCS11 library path]) -# for PKCS11 benchmarks +AC_CHECK_FUNCS([clock_gettime]) -have_clock_gt=no -AC_CHECK_FUNC(clock_gettime,have_clock_gt=yes,) -if test "no" = "$have_clock_gt"; then - AC_CHECK_LIB(rt,clock_gettime,have_clock_gt=rt,) -fi - -if test "no" != "$have_clock_gt"; then - AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if clock_gettime is available.]) -fi - -if test "rt" = "$have_clock_gt"; then - LIBS="-lrt $LIBS" -fi - -AC_MSG_CHECKING(for GSSAPI library) -AC_ARG_WITH(gssapi, - AS_HELP_STRING([--with-gssapi=[PATH|[/path/]krb5-config]], +AC_ARG_WITH([gssapi], + [AS_HELP_STRING([--with-gssapi=[PATH|[/path/]krb5-config]], [Specify path for system-supplied GSSAPI - [default=auto]]), - use_gssapi="$withval", use_gssapi="auto") + [default=auto]])], + [], [with_gssapi="auto"]) -# first try using krb5-config, if that does not work then fall back to "yes" method. +KRB5_CONFIG= +AS_CASE([$with_gssapi], + [no],[AC_MSG_CHECKING([for GSSAPI support]) + AC_MSG_RESULT([no])], + [yes],[AC_PATH_PROG([KRB5_CONFIG], [krb5-config]) + AS_IF([test -z "$KRB5_CONFIG"], + [AC_MSG_ERROR([krb5-config required but not found])])], + [auto],[AC_PATH_PROG([KRB5_CONFIG], [krb5-config])], + [*krb5-config*],[KRB5_CONFIG="$with_gssapi"], + [AC_MSG_ERROR([--with-gssapi requires yes|no|auto|/path/to/krb5-config])]) -case "$use_gssapi" in -*/krb5-config|krb5-config) - AC_MSG_RESULT(trying $use_gssapi) - if test krb5-config = "$use_gssapi" - then - AC_PATH_PROG(KRB5_CONFIG, $use_gssapi) - else - KRB5_CONFIG="$use_gssapi" - fi - gssapi_cflags=`$KRB5_CONFIG --cflags gssapi` - gssapi_libs=`$KRB5_CONFIG --libs gssapi` - saved_cppflags="$CPPFLAGS" - CPPFLAGS="$gssapi_cflags $CPPFLAGS" - AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h, - [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"]) - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - AC_MSG_RESULT([krb5-config: gssapi.h not found]) - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - AC_CHECK_HEADERS(krb5/krb5.h krb5.h, - [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"]) - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - AC_MSG_RESULT([krb5-config: krb5.h not found]) - CPPFLAGS="$saved_cppflags" - use_gssapi="yes" - else - CPPFLAGS="$saved_cppflags" - saved_libs="$LIBS" - LIBS=$gssapi_libs - AC_MSG_CHECKING([krb5-config linking as $LIBS]) - AC_TRY_LINK( , [gss_acquire_cred();krb5_init_context()], - gssapi_linked=yes, gssapi_linked=no) - case $gssapi_linked in - yes) AC_MSG_RESULT([krb5-config: linked]);; - no) AC_MSG_RESULT([krb5-config: could not determine proper GSSAPI linkage]) - use_gssapi="yes" - ;; - esac - LIBS=$saved_libs - fi - fi - if test "yes" = "$use_gssapi"; then - AC_MSG_CHECKING([for GSSAPI library, non krb5-config method]) - fi - ;; -esac +GSSAPI_CFLAGS= +GSSAPI_LIBS= +KRB5_CFLAGS= +KRB5_LIBS= +AS_IF([test -n "$KRB5_CONFIG"], + [AC_MSG_CHECKING([for gssapi libraries]) + AX_SAVE_FLAGS([gssapi]) + GSSAPI_CFLAGS=`"$KRB5_CONFIG" --cflags gssapi` + GSSAPI_LIBS=`"$KRB5_CONFIG" --libs gssapi` + CFLAGS="$CFLAGS $GSSAPI_CFLAGS" + LIBS="$LIBS $GSSAPI_LIBS" + AC_MSG_RESULT([$GSSAPI_CFLAGS $GSSAPI_LIBS]) + AC_CHECK_HEADERS([gssapi/gssapi.h], [], + [AC_CHECK_HEADERS([gssapi.h], [], + [AC_MSG_ERROR([neither gssapi/gssapi.h nor gssapi.h found])])]) + AC_CHECK_HEADERS([gssapi/gssapi_krb5.h], + [AC_CHECK_HEADERS([gssapi_krb5.h], [] + [AC_MSG_ERROR([neither gssapi/gssapi_krb5.h nor gssapi_krb5.h found])])]) + AC_CHECK_FUNCS([gss_acquire_cred],[], + [AC_MSG_ERROR([linking with $GSSAPI_LIBS does not work])]) + AX_RESTORE_FLAGS([gssapi]) -case "$host" in -*darwin*) - if test "yes" = "$use_gssapi" -o "auto" = "$use_gssapi" - then - use_gssapi=framework - fi - ;; -esac + AC_MSG_CHECKING([for krb5 libraries]) + AX_SAVE_FLAGS([krb5]) + KRB5_CFLAGS=`"$KRB5_CONFIG" --cflags krb5` + KRB5_LIBS=`$KRB5_CONFIG --libs krb5` + CFLAGS="$CFLAGS $KRB5_CFLAGS" + LIBS="$CFLAGS $KRB5_LIBS" + AC_MSG_RESULT([$KRB5_CFLAGS $KRB5_LIBS]) + AC_CHECK_HEADERS([krb5/krb5.h], [], + [AC_CHECK_HEADERS([krb5.h], [], + [AC_MSG_ERROR([neither krb5/krb5.h nor krb5 found])])]) + AC_CHECK_FUNCS([krb5_init_context], [], + [AC_MSG_ERROR([linking with $KRB5_LIBS failed])]) + AX_RESTORE_FLAGS([krb5]) -# gssapi is just the framework, we really require kerberos v5, so -# look for those headers (the gssapi headers must be there, too) -# The problem with this implementation is that it doesn't allow -# for the specification of gssapi and krb5 headers in different locations, -# which probably ought to be fixed although fixing might raise the issue of -# trying to build with incompatible versions of gssapi and krb5. -if test "yes" = "$use_gssapi" -o "auto" = "$use_gssapi" -then - # first, deal with the obvious - if test \( -f /usr/include/kerberosv5/krb5.h -o \ - -f /usr/include/krb5/krb5.h -o \ - -f /usr/include/krb5.h \) -a \ - \( -f /usr/include/gssapi.h -o \ - -f /usr/include/gssapi/gssapi.h \) - then - use_gssapi=/usr - else - krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr" - for d in $krb5dirs - do - if test -f $d/include/gssapi/gssapi_krb5.h -o \ - -f $d/include/krb5.h - then - if test -f $d/include/gssapi/gssapi.h -o \ - -f $d/include/gssapi.h - then - use_gssapi=$d - break - fi - fi - done - if test "auto" = "$use_gssapi" - then - use_gssapi="no" - fi - fi -fi - -case "$use_gssapi" in - no) - AC_MSG_RESULT(disabled) - USE_GSSAPI='' - ;; - yes) - AC_MSG_ERROR([--with-gssapi must specify a path]) - ;; - */krb5-config|krb5-config) - USE_GSSAPI='-DGSSAPI' - DST_GSSAPI_INC="$gssapi_cflags" - DNS_GSSAPI_LIBS="$gssapi_libs" - ;; - framework) - USE_GSSAPI='-DGSSAPI' - ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER " - ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER " - DNS_GSSAPI_LIBS="-framework Kerberos" - AC_MSG_RESULT(framework) - ;; - - *) - AC_MSG_RESULT(looking in $use_gssapi/lib) - USE_GSSAPI='-DGSSAPI' - saved_cppflags="$CPPFLAGS" - CPPFLAGS="-I$use_gssapi/include $CPPFLAGS" - AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h, - [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>" - gssapi_hack="#include <$ac_header>"]) - - if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then - AC_MSG_ERROR([gssapi.h not found]) - fi - - AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h, - [ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>" - gssapi_krb5_hack="#include <$ac_header>"]) - - AC_CHECK_HEADERS(krb5.h krb5/krb5.h kerberosv5/krb5.h, - [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>" - krb5_hack="#include <$ac_header>"]) - - if test "" = "$ISC_PLATFORM_KRB5HEADER"; then - AC_MSG_ERROR([krb5.h not found]) - fi - - # - # XXXDCL This probably doesn't work right on all systems. - # It will need to be worked on as problems become evident. - # - # Essentially the problems here relate to two different - # areas. The first area is building with either KTH - # or MIT Kerberos, particularly when both are present on - # the machine. The other is static versus dynamic linking. - # - # On the KTH vs MIT issue, Both have libkrb5 that can mess - # up the works if one implementation ends up trying to - # use the other's krb. This is unfortunately a situation - # that very easily arises. - # - # Dynamic linking when the dependency information is built - # into MIT's libgssapi_krb5 or KTH's libgssapi magically makes - # all such problems go away, but when that setup is not - # present, because either the dynamic libraries lack - # dependencies or static linking is being done, then the - # problems start to show up. - saved_libs="$LIBS" - for TRY_LIBS in \ - "-lgssapi_krb5" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \ - "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \ - "-lgssapi" \ - "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lgssapi_krb5 -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgssapi -lkrb5 -lhx509 -lcrypt -lasn1 -lroken -lcom_err" \ - "-lgss -lkrb5" - do - # Note that this does not include $saved_libs, because - # on FreeBSD machines this configure script has added - # -L/usr/local/lib to LIBS, which can make the - # -lgssapi_krb5 test succeed with shared libraries even - # when you are trying to build with KTH in /usr/lib. - if test "/usr" = "$use_gssapi" - then - LIBS="$TRY_LIBS $ISC_OPENSSL_LIBS" - else - LIBS="-L$use_gssapi/lib $TRY_LIBS $ISC_OPENSSL_LIBS" - fi - AC_MSG_CHECKING(linking as $TRY_LIBS) - AC_TRY_LINK([ -#include -$gssapi_hack -$gssapi_krb5_hack -$krb5_hack - ] , [gss_acquire_cred(NULL, NULL, 0, NULL, 0, NULL, NULL, NULL);krb5_init_context(NULL); -#if defined(HAVE_GSSAPI_KRB5_H) || defined(HAVE_GSSAPI_GSSAPI_KRB5_H) -gsskrb5_register_acceptor_identity(NULL); -#endif], - gssapi_linked=yes, gssapi_linked=no) - case $gssapi_linked in - yes) AC_MSG_RESULT(yes); break ;; - no) AC_MSG_RESULT(no) ;; - esac - done - - CPPFLAGS="$saved_cppflags" - - case $gssapi_linked in - no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;; - esac - - # - # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib - # but MIT in /usr/local/lib and trying to build with KTH. - # /usr/local/lib can end up earlier on the link lines. - # Like most kludges, this one is not only inelegant it - # is also likely to be the wrong thing to do at least as - # many times as it is the right thing. Something better - # needs to be done. - # - if test "/usr" = "$use_gssapi" -a \ - -f /usr/local/lib/libkrb5.a; then - FIX_KTH_VS_MIT=yes - fi - - case "$FIX_KTH_VS_MIT" in - yes) - case "$enable_static_linking" in - yes) gssapi_lib_suffix=".a" ;; - *) gssapi_lib_suffix=".so" ;; - esac - - for lib in $LIBS; do - case $lib in - -L*) - ;; - -l*) - new_lib=`echo $lib | - sed -e s%^-l%$use_gssapi/lib/lib% \ - -e s%$%$gssapi_lib_suffix%` - NEW_LIBS="$NEW_LIBS $new_lib" - ;; - *) - AC_MSG_ERROR([KTH vs MIT Kerberos confusion!]) - ;; - esac - done - LIBS="$NEW_LIBS" - ;; - esac - - DST_GSSAPI_INC="-I$use_gssapi/include" - DNS_GSSAPI_LIBS="$LIBS" - - AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include) - LIBS="$saved_libs" - ;; -esac - -AC_SUBST(ISC_PLATFORM_HAVEGSSAPI) -AC_SUBST(ISC_PLATFORM_GSSAPIHEADER) -AC_SUBST(ISC_PLATFORM_GSSAPI_KRB5_HEADER) -AC_SUBST(ISC_PLATFORM_KRB5HEADER) - -AC_SUBST(USE_GSSAPI) -AC_SUBST(DST_GSSAPI_INC) -AC_SUBST(DNS_GSSAPI_LIBS) -DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS" - -# -# Applications linking with libdns also need to link with these libraries. -# - -AC_SUBST(DNS_CRYPTO_LIBS) + AC_DEFINE([HAVE_GSSAPI], [1], [Define to 1 if you have the Kerberos Framework available]) + # kludge to silence compiler warnings which recommend use of GSS.framework on macOS + AS_CASE([$host],[*-darwin*],[CFLAGS="$CFLAGS -Wno-deprecated-declarations"])]) +AM_CONDITIONAL([HAVE_GSSAPI], [test -n "$GSSAPI_LIBS"]) +AC_SUBST([GSSAPI_CFLAGS]) +AC_SUBST([GSSAPI_LIBS]) +AC_SUBST([KRB5_CFLAGS]) +AC_SUBST([KRB5_LIBS]) # # was --with-lmdb specified? @@ -1129,18 +828,7 @@ AS_IF([test "$ac_lib_lmdb_found" = "yes"], AC_SUBST([LMDB_CFLAGS]) AC_SUBST([LMDB_LIBS]) -#AM_CONDITIONAL([HAVE_LMDB], [test "$ac_lib_lmdb_found" = "yes"]) - -NZD_TOOLS= -NZDSRCS= -NZDTARGETS= -AS_IF([test -n "$LMDB_LIBS"], - [NZD_TOOLS="nzd" - NZDSRCS='${NZDSRCS}' - NZDTARGETS='${NZDTARGETS}']) -AC_SUBST([NZD_TOOLS]) -AC_SUBST([NZDSRCS]) -AC_SUBST([NZDTARGETS]) +AM_CONDITIONAL([HAVE_LMDB], [test -n "$LMDB_LIBS"]) # # was --with-libxml2 specified? @@ -1159,14 +847,7 @@ AS_CASE([$with_libxml2], [AC_DEFINE([HAVE_LIBXML2], [1], [Use libxml2 library])])], [AC_MSG_ERROR([Specifying libxml2 installation path is not supported, adjust PKG_CONFIG_PATH instead])]) -# -# DEPRECATED -# -AC_ARG_WITH([libjson], - [AS_HELP_STRING([--with-libjson], - [deprecated, use --with-json-c])], - [AC_MSG_WARN([--with-libjson is DEPRECATED and will be removed in a future release, use --with-json-c instead])], - [with_libjson="detect"]) +AM_CONDITIONAL([HAVE_LIBXML2], [test -n "$LIBXML2_LIBS"]) # # was --with-json-c specified? @@ -1174,7 +855,7 @@ AC_ARG_WITH([libjson], AC_ARG_WITH([json-c], [AS_HELP_STRING([--with-json-c], [build with json-c library [yes|no|detect] (default is detect)])], - [], [with_json_c="$with_libjson"]) + [], [with_json_c="detect"]) AS_CASE([$with_json_c], [no],[], @@ -1186,14 +867,19 @@ AS_CASE([$with_json_c], [AC_MSG_ERROR([Specifying json-c installation path is not supported, adjust PKG_CONFIG_PATH instead])] ) +AM_CONDITIONAL([HAVE_JSON_C], [test -n "$JSON_C_LIBS"]) + AC_SUBST([JSON_C_CFLAGS]) AC_SUBST([JSON_C_LIBS]) +# +# was --with-zlib specified? +# AC_ARG_WITH([zlib], - [AS_HELP_STRING([--with-zlib], - [build with zlib for HTTP compression - [default=yes]])], - [], with_zlib="auto") + [AS_HELP_STRING([--with-zlib], + [build with zlib for HTTP compression + [default=yes]])], + [], with_zlib="auto") AS_CASE([$with_zlib], [no],[], @@ -1206,111 +892,6 @@ AS_CASE([$with_zlib], AC_SUBST([ZLIB_CFLAGS]) AC_SUBST([ZLIB_LIBS]) -# -# In solaris 10, SMF can manage named service -# -AC_CHECK_LIB(scf, smf_enable_instance) - -# -# Additional compiler settings. -# -MKDEPCC="$CC" - -MKDEPCFLAGS="-M" -AS_CASE([$host], - [*-solaris*],[ - AS_IF([test "$GCC" != "yes"], - [MKDEPCFLAGS="-xM"])]) - -AS_IF([test "$GCC" = "yes"], - [STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers"] - ) - -AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], - [STD_CWARNINGS="$STD_CWARNINGS -fno-strict-aliasing"]) -AX_CHECK_COMPILE_FLAG([-fno-delete-null-pointer-checks], - [STC_CWARNINGS="$STD_CWARNINGS -fno-delete-null-pointer-checks"]) -AS_IF([test "$enable_warn_shadow" = "yes"], - [AX_CHECK_COMPILE_FLAG([-Wshadow], - [STD_CWARNINGS="$STD_CWARNINGS -Wshadow"])]) -AS_IF([test "$enable_warn_error" = "yes"], - [AX_CHECK_COMPILE_FLAG([-Werror], - [STD_CWARNINGS="$STD_CWARNINGS -Werror"])]) - -AC_SUBST([MKDEPCC]) -AC_SUBST([MKDEPCFLAGS]) -AC_SUBST([MKDEPPROG]) - -# -# -lxnet buys us one big porting headache... standards, gotta love 'em. -# -# AC_CHECK_LIB(xnet, socket, , -# AC_CHECK_LIB(socket, socket) -# ) -# -# Use this for now, instead: -# -case "$host" in - *-linux*) - ;; - *) - AC_CHECK_LIB(socket, socket) - AC_CHECK_LIB(nsl, inet_addr) - ;; -esac - -# -# Work around Solaris's select() limitations. -# -case "$host" in - *-solaris2.[[89]]|*-solaris2.1?) - AC_DEFINE(FD_SETSIZE, 65536, - [Solaris hack to get select_large_fdset.]) - ;; -esac - -# -# Purify support -# -AC_MSG_CHECKING(whether to use purify) -AC_ARG_WITH(purify, - AS_HELP_STRING([--with-purify[=PATH]],[use Rational purify]), - use_purify="$withval", use_purify="no") - -case "$use_purify" in - no) - ;; - yes) - AC_PATH_PROG(purify_path, purify, purify) - ;; - *) - purify_path="$use_purify" - ;; -esac - -case "$use_purify" in - no) - AC_MSG_RESULT(no) - PURIFY="" - ;; - *) - if test -f "$purify_path" || test purify = "$purify_path"; then - AC_MSG_RESULT($purify_path) - PURIFYFLAGS="`echo $PURIFYOPTIONS`" - PURIFY="$purify_path $PURIFYFLAGS" - else - AC_MSG_ERROR([$purify_path not found. - -Please choose the proper path with the following command: - - configure --with-purify=PATH -]) - fi - ;; -esac - -AC_SUBST(PURIFY) - # # Google/Great Performance Tools CPU Profiler # @@ -1339,39 +920,7 @@ AC_CHECK_HEADERS([execinfo.h], [AC_SEARCH_LIBS([backtrace], [execinfo], [AC_CHECK_FUNCS([backtrace backtrace_symbols])])]) -# AM_CONDITIONAL([HAVE_BACKTRACE], [test "$ac_cv_func_backtrace" = "yes"]) - -# -# File name extension for static archive files, for those few places -# where they are treated differently from dynamic ones. -# -O=lo -A=la -SA=a -LIBTOOL_MKDEP_SED='s;\.o;\.lo;' -LIBTOOL_MODE_COMPILE='--mode=compile' -LIBTOOL_MODE_INSTALL='--mode=install' -LIBTOOL_MODE_LINK='--mode=link' -LIBTOOL_MODE_UNINSTALL='--mode=uninstall' -INSTALL_LIBRARY='${INSTALL_PROGRAM}' - -AC_SUBST(O) -AC_SUBST(A) -AC_SUBST(SA) -AC_SUBST(LIBTOOL_MKDEP_SED) -AC_SUBST(LIBTOOL_MODE_COMPILE) -AC_SUBST(LIBTOOL_MODE_INSTALL) -AC_SUBST(LIBTOOL_MODE_LINK) -AC_SUBST(LIBTOOL_MODE_UNINSTALL) -AC_SUBST(INSTALL_LIBRARY) - -BIND9_CO_RULE=".c.$O:" -AC_SUBST(BIND9_CO_RULE) - -# -# Here begins a very long section to determine the system's networking -# capabilities. The order of the tests is significant. -# +AM_CONDITIONAL([HAVE_BACKTRACE], [test "$ac_cv_func_backtrace" = "yes"]) # # We do the IPv6 compilation checking after libtool so that we can put @@ -1407,7 +956,7 @@ AC_COMPILE_IFELSE( AC_ARG_ENABLE([tcp_fastopen], [AS_HELP_STRING([--disable-tcp-fastopen], [disable TCP Fast Open support [default=yes]])], - [], [enable_tcp_fastopen="yes"]) + [], [enable_tcp_fastopen="yes"]) AS_IF([test "$enable_tcp_fastopen" = "yes"], [AC_DEFINE([ENABLE_TCP_FASTOPEN], [1], [define if you want TCP_FASTOPEN enabled if available])]) @@ -1478,33 +1027,6 @@ then AC_CHECK_HEADERS(readline/history.h) fi -# -# Use our own SPNEGO implementation? -# -AC_ARG_ENABLE(isc-spnego, - AS_HELP_STRING([--disable-isc-spnego], - [use SPNEGO from GSSAPI library])) - -if test -n "$USE_GSSAPI" -then - case "$enable_isc_spnego" in - yes|'') - USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO' - DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O" - DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c" - AC_MSG_RESULT(using SPNEGO from lib/dns) - ;; - no) - AC_MSG_RESULT(using SPNEGO from GSSAPI library) - ;; - esac -fi - -AC_SUBST(USE_ISC_SPNEGO) - -AC_SUBST(DST_EXTRA_OBJS) -AC_SUBST(DST_EXTRA_SRCS) - # # Security Stuff # @@ -1544,13 +1066,6 @@ AS_IF([test "$enable_linux_caps" = "yes"], [AC_MSG_RESULT([no])]) AC_SUBST([LIBCAP_LIBS]) -AC_CHECK_HEADERS(sys/un.h, -ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1" -, -ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH" -) -AC_SUBST(ISC_PLATFORM_HAVESYSUNH) - case "$host" in *-solaris*) AC_DEFINE(NEED_SECURE_DIRECTORY, 1, @@ -1713,170 +1228,35 @@ fi # # Activate "rrset-order fixed" or not? # -AC_ARG_ENABLE(fixed-rrset, - AS_HELP_STRING([--enable-fixed-rrset], - [enable fixed rrset ordering [default=no]]), - enable_fixed="$enableval", enable_fixed="no") -case "$enable_fixed" in - yes) - AC_DEFINE(DNS_RDATASET_FIXED, 1, - [Define to enable "rrset-order fixed" syntax.]) - ;; - no) - ;; - *) - ;; -esac +AC_ARG_ENABLE([fixed-rrset], + [AS_HELP_STRING([--enable-fixed-rrset], + [enable fixed rrset ordering [default=no]])], + [], [enable_fixed_rrset="no"]) +AS_IF([test "$enable_fixed_rrset" = "yes"], + [AC_DEFINE([DNS_RDATASET_FIXED], [1], + [Define to enable "rrset-order fixed" syntax.])]) # # Activate dnstap? # -AC_ARG_ENABLE(dnstap, - AS_HELP_STRING([--enable-dnstap], - [enable dnstap support - (requires fstrm, protobuf-c)]), - use_dnstap=$enableval, use_dnstap=no) +AC_ARG_ENABLE([dnstap], + [AS_HELP_STRING([--enable-dnstap], + [enable dnstap support + (requires fstrm, protobuf-c)])], + [], [enable_dnstap=no]) -DNSTAP= -DNSTAPSRCS= -DNSTAPOBJS= -DNSTAPTARGETS= -if test "x$use_dnstap" != "xno"; then - AC_ARG_WITH([protobuf-c], - AS_HELP_STRING([--with-protobuf-c=path], - [Path where protobuf-c is installed, for dnstap]), [ - # workaround for protobuf-c includes at old dir - # before protobuf-c-1.0.0 - if test -f $withval/include/google/protobuf-c/protobuf-c.h - then - CFLAGS="$CFLAGS -I$withval/include/google" - else - CFLAGS="$CFLAGS -I$withval/include" - fi - LDFLAGS="$LDFLAGS -L$withval/lib" - AC_PATH_PROG([PROTOC_C], [protoc-c], [], - [$PATH$PATH_SEPARATOR$withval/bin]) - ], [ - # workaround for protobuf-c includes at old dir - # before protobuf-c-1.0.0 - if test -f /usr/include/google/protobuf-c/protobuf-c.h - then - CFLAGS="$CFLAGS -I/usr/include/google" - else - if test -f /usr/local/include/google/protobuf-c/protobuf-c.h - then - CFLAGS="$CFLAGS -I/usr/local/include/google" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - fi - fi - AC_PATH_PROG([PROTOC_C],[protoc-c]) - ]) - if test -z "$PROTOC_C"; then - AC_MSG_ERROR([The protoc-c program was not found.]) - fi - AC_ARG_WITH([libfstrm], AS_HELP_STRING([--with-libfstrm=path], - [Path where libfstrm is installed, for dnstap]), [ - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - AC_PATH_PROG([FSTRM_CAPTURE], [fstrm_capture], [], [$PATH$PATH_SEPARATOR$withval/bin]) - ],[ - AC_PATH_PROG([FSTRM_CAPTURE], [fstrm_capture]) - ]) +AS_IF([test "$enable_dnstap" != "no"], + [PKG_CHECK_MODULES([DNSTAP], [libfstrm libprotobuf-c], [], + [AC_MSG_FAILURE([Required libraries (fstrm, protobuf-c) were not found, please install them.])]) + AC_PATH_PROG([PROTOC_C], [protoc-c], []) + AS_IF([test -z "$PROTOC_C"], + [AC_MSG_ERROR([protoc-c compiler not found])]) + AC_DEFINE([HAVE_DNSTAP], 1, [Define to 1 to enable dnstap support]) + ]) - AC_SEARCH_LIBS([fstrm_iothr_init], [fstrm], [], - AC_MSG_ERROR([The fstrm library was not found. Please install fstrm!])) - AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [], - AC_MSG_ERROR([The protobuf-c library was not found. Please install protobuf-c!])) - - AC_DEFINE(HAVE_DNSTAP, 1, [Define to 1 to enable dnstap support]) - DNSTAP=dnstap - DNSTAPSRCS='${DNSTAPSRCS}' - DNSTAPOBJS='${DNSTAPOBJS}' - DNSTAPTARGETS='${DNSTAPTARGETS}' -fi -AC_SUBST(DNSTAP) -AC_SUBST(DNSTAPSRCS) -AC_SUBST(DNSTAPOBJS) -AC_SUBST(DNSTAPTARGETS) - -# -# The following sets up how non-blocking i/o is established. -# cygwin and solaris 2.x (x<5) require special handling. -# -case "$host" in -*-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);; -*-solaris2.[[01234]]) - AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK) - AC_DEFINE(USE_FIONBIO_IOCTL, 1, - [Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.]) - ;; -*) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK, - [Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).]) - ;; -esac -# -# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. -# This prevents the source address being set. -# -case "$host" in -*-solaris2.[[012345]]|*-solaris2.5.1) - AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1, - [Define if you cannot bind() before connect() for TCP sockets.]) - ;; -esac -# -# The following sections deal with tools used for formatting -# the documentation. They are all optional, unless you are -# a developer editing the documentation source. -# - -# -# Look for TeX. -# - -AC_PATH_PROGS(LATEX, latex, latex) -AC_SUBST(LATEX) - -AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex) -AC_SUBST(PDFLATEX) - -AC_PATH_PROGS(DBLATEX, dblatex, dblatex) -AC_SUBST(DBLATEX) - -# -# Look for w3m -# - -AC_PATH_PROGS(W3M, w3m, w3m) -AC_SUBST(W3M) - -# -# Look for pandoc -# -AC_PATH_PROG(PANDOC, pandoc, pandoc) -AC_SUBST(PANDOC) - - -# -# Look for xsltproc (libxslt) -# - -AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc) -AC_SUBST(XSLTPROC) - -# -# Look for xmllint (libxml2) -# - -AC_PATH_PROG(XMLLINT, xmllint, xmllint) -AC_SUBST(XMLLINT) - -# -# Look for Doxygen -# - -AC_PATH_PROG(DOXYGEN, doxygen, doxygen) -AC_SUBST(DOXYGEN) +AC_SUBST([DNSTAP_CFLAGS]) +AC_SUBST([DNSTAP_LIBS]) +AM_CONDITIONAL([HAVE_DNSTAP], [test "$enable_dnstap" != "no"]) # # Look for curl @@ -1885,76 +1265,6 @@ AC_SUBST(DOXYGEN) AC_PATH_PROG(CURL, curl, curl) AC_SUBST(CURL) -# -# Subroutine for searching for an ordinary file (e.g., a stylesheet) -# in a number of directories: -# -# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES) -# -# If the file FILENAME is found in one of the DIRECTORIES, the shell -# variable VARIABLE is defined to its absolute pathname. Otherwise, -# it is set to FILENAME, with no directory prefix (that's not terribly -# useful, but looks less confusing in substitutions than leaving it -# empty). The variable VARIABLE will be substituted into output files. -# - -AC_DEFUN([NOM_PATH_FILE], [ -$1="" -AC_MSG_CHECKING(for $2) -for d in $3 -do - f=$d/$2 - if test -f $f - then - $1=$f - AC_MSG_RESULT($f) - break - fi -done -if test "X[$]$1" = "X" -then - AC_MSG_RESULT("not found"); - $1=$2 -fi -AC_SUBST($1) -]) - -# -# Look for Docbook-XSL stylesheets. Location probably varies by system. -# If it's not explicitly specified, guess where it might be found, based on -# where SGML stuff lives on some systems (FreeBSD is the only one we're sure -# of at the moment). -# -AC_MSG_CHECKING(for Docbook-XSL path) -AC_ARG_WITH(docbook-xsl, - AS_HELP_STRING([--with-docbook-xsl[=PATH]], - [specify path for Docbook-XSL stylesheets]), - docbook_path="$withval", docbook_path="auto") -case "$docbook_path" in -auto) - AC_MSG_RESULT(auto) - docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook-ns /usr/local/share/xsl/docbook /usr/share/xsl/docbook /usr/share/sgml/docbook/xsl-stylesheets /opt/local/share/xsl/docbook-xsl /opt/local/share/xsl/docbook-xsl-nons /usr/share/xml/docbook/stylesheet/docbook-xsl" - ;; -*) - docbook_xsl_trees="$withval" - AC_MSG_RESULT($docbook_xsl_trees) - ;; -esac - -# -# Look for stylesheets we need. -# - -NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, html/chunk.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, xhtml/chunk.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees) -NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees) - # # IDN support using libidn2 # @@ -1999,27 +1309,15 @@ AS_CASE([$with_cmocka], [no],[], [detect],[PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.0.0], [AC_DEFINE([HAVE_CMOCKA], [1], [Use CMocka]) - UNITTESTS=tests],[with_cmocka=no])], + with_cmocka=yes],[with_cmocka=no])], [yes],[PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.0.0], - [AC_DEFINE([HAVE_CMOCKA], [1], [Use CMocka])]) - UNITTESTS=tests], + [AC_DEFINE([HAVE_CMOCKA], [1], [Use CMocka])])], [AC_MSG_ERROR([Use PKG_CONFIG_PATH to specify path to CMocka library])] ) AC_SUBST([CMOCKA_CFLAGS]) AC_SUBST([CMOCKA_LIBS]) -AC_SUBST(UNITTESTS) -# -# Check for kyua execution engine if CMocka was requested -# and bail out if execution engine was not found -# -AC_ARG_VAR([KYUA], [path to kyua execution engine]) -AS_IF([test "$with_cmocka" != "no"], - [AC_PATH_PROGS([KYUA], [kyua], []) - AS_IF([test -z "$KYUA"], - [AC_MSG_WARN([kyua test execution engine not found])])]) - -AC_SUBST([KYUA]) +AM_CONDITIONAL([HAVE_CMOCKA], [test "$with_cmocka" = "yes"]) # # Check for -Wl,--wrap= support @@ -2029,19 +1327,18 @@ LD_WRAP_TESTS=false AC_MSG_CHECKING([for linker support for --wrap option]) AX_SAVE_FLAGS([wrap]) LDFLAGS="-Wl,-wrap,exit" -AC_LINK_IFELSE( +AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include void __real_exit (int status); void __wrap_exit (int status) { __real_exit (status); } ]], [[exit (1);]])], [LD_WRAP_TESTS=true - AC_DEFINE([LD_WRAP], [1], [define if the linker supports --wrap option]) AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AX_RESTORE_FLAGS([wrap]) -AC_SUBST([LD_WRAP_TESTS]) +AM_CONDITIONAL([HAVE_LD_WRAP], [test "$LD_WRAP_TESTS" = "true"]) WRAP_INTERPOSE= AC_MSG_CHECKING([for linker support for '-z interpose' option]) @@ -2113,103 +1410,6 @@ AC_ARG_ENABLE(auto-validation, AS_IF([test "$enable_auto_validation" = "no"],[validation_default=yes]) AC_DEFINE_UNQUOTED([VALIDATION_DEFAULT], ["$validation_default"], [the default value of dnssec-validation option]) -# -# Substitutions -# -AC_SUBST(BIND9_TOP_BUILDDIR) -BIND9_TOP_BUILDDIR=`pwd` - -AC_SUBST(BIND9_ISC_BUILDINCLUDE) -AC_SUBST(BIND9_ISCCC_BUILDINCLUDE) -AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE) -AC_SUBST(BIND9_DNS_BUILDINCLUDE) -AC_SUBST(BIND9_NS_BUILDINCLUDE) -AC_SUBST(BIND9_BIND9_BUILDINCLUDE) -AC_SUBST(BIND9_IRS_BUILDINCLUDE) -if test "X$srcdir" != "X"; then - BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include" - BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include" - BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include" - BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include" - BIND9_NS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/ns/include" - BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include" - BIND9_IRS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/irs/include" -else - BIND9_ISC_BUILDINCLUDE="" - BIND9_ISCCC_BUILDINCLUDE="" - BIND9_ISCCFG_BUILDINCLUDE="" - BIND9_DNS_BUILDINCLUDE="" - BIND9_NS_BUILDINCLUDE="" - BIND9_BIND9_BUILDINCLUDE="" - BIND9_IRS_BUILDINCLUDE="" -fi - -AC_SUBST_FILE(BIND9_MAKE_INCLUDES) -BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes - -AC_SUBST_FILE(BIND9_MAKE_RULES) -BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules - -. "$srcdir/version" -BIND9_PRODUCT="PRODUCT=\"${PRODUCT}\"" -AC_SUBST(BIND9_PRODUCT) -BIND9_DESCRIPTION="DESCRIPTION=\"${DESCRIPTION}\"" -AC_SUBST(BIND9_DESCRIPTION) -BIND9_VERSION="${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}" -AC_SUBST(BIND9_VERSION) -BIND9_MAJOR="MAJOR=${MAJORVER}.${MINORVER}" -AC_SUBST(BIND9_MAJOR) -BIND9_VERSIONSTRING="${PRODUCT} ${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}${DESCRIPTION:+ }${DESCRIPTION}" -AC_SUBST(BIND9_VERSIONSTRING) -BIND9_VERSIONSHORT="${PRODUCT} ${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}" -AC_SUBST(BIND9_VERSIONSHORT) - -BIND9_SRCID="SRCID=unset_id" -if test -f "${srcdir}/srcid"; then - . "${srcdir}/srcid" - BIND9_SRCID="SRCID=$SRCID" -elif test -d "${srcdir}/.git"; then - BIND9_SRCID="SRCID="`(cd "${srcdir}";git rev-parse --short HEAD)` -fi - -AC_SUBST(BIND9_SRCID) - -if test -z "$ac_configure_args"; then - BIND9_CONFIGARGS="defaults" -else - for a in $ac_configure_args - do - BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a" - done -fi -BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`" -BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}" -AC_SUBST(BIND9_CONFIGARGS) - -AC_SUBST_FILE(LIBISC_API) -LIBISC_API="$srcdir/lib/isc/api" - -AC_SUBST_FILE(LIBISCCC_API) -LIBISCCC_API="$srcdir/lib/isccc/api" - -AC_SUBST_FILE(LIBISCCFG_API) -LIBISCCFG_API="$srcdir/lib/isccfg/api" - -AC_SUBST_FILE(LIBDNS_API) -LIBDNS_API="$srcdir/lib/dns/api" - -AC_SUBST_FILE(LIBDNS_MAPAPI) -LIBDNS_MAPAPI="$srcdir/lib/dns/mapapi" - -AC_SUBST_FILE(LIBBIND9_API) -LIBBIND9_API="$srcdir/lib/bind9/api" - -AC_SUBST_FILE(LIBIRS_API) -LIBIRS_API="$srcdir/lib/irs/api" - -AC_SUBST_FILE(LIBNS_API) -LIBNS_API="$srcdir/lib/ns/api" - # # Configure any DLZ drivers. # @@ -2231,99 +1431,6 @@ DLZ_DRIVER_MYSQL_INCLUDES="" DLZ_DRIVER_MYSQL_LIBS="" # -# Configure support for building a shared library object -# -# Even when libtool is available it can't always be relied upon -# to build an object that can be dlopen()'ed, but this is necessary -# for building the dlzexternal system test, so we'll try it the -# old-fashioned way. -# -SO="so" -SO_CFLAGS="" -SO_LDFLAGS="" -SO_LD="" -SO_TARGETS="" -SO_STRIP="cat" - -AC_ARG_WITH([dlopen], - AS_HELP_STRING([--with-dlopen=ARG], - [support dynamically loadable DLZ and DYNDB drivers]), - [], [with_dlopen="auto"]) - - -# -# If PIC is disabled, dlopen must also be -# -AS_IF([test "$pic_mode" = "no"], - [AS_CASE([$with_dlopen], - [auto],[with_dlopen="no"], - [yes],[AC_MSG_ERROR([--with-dlopen requires PIC])])]) - -AS_CASE([$with_dlopen], - [auto|yes],[ - AC_SEARCH_LIBS([dlopen],[dl]) - AC_CHECK_FUNCS([dlopen dlclose dlsym], - [with_dlopen="yes"], - [with_dlopen="no"]) - ]) - -AS_IF([test "$with_dlopen" = "yes"], - [AS_CASE([$host], - [*-linux*|*-gnu*],[ - LDFLAGS="${LDFLAGS} -Wl,--export-dynamic" - SO_CFLAGS="-fPIC" - SO_LDFLAGS="" - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - ], - [*-freebsd*|*-openbsd*|*-netbsd*],[ - LDFLAGS="${LDFLAGS} -Wl,-E" - SO_CFLAGS="-fpic" - SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - ], - [*-darwin*],[ - SO_CFLAGS="-fPIC" - SO_LD="${CC}" - SO_LDFLAGS="-Xcompiler -dynamiclib -undefined dynamic_lookup" - ], - [*-solaris*],[ - SO_CFLAGS="-KPIC" - SO_LDFLAGS="-G -z text" - SO_LD="ld" - ], - [ia64-hp-hpux*],[ - SO_CFLAGS="+z" - SO_LDFLAGS="-b" - SO_LD="${CC}" - ], - [ - SO_CFLAGS="-fPIC" - ]) - AS_IF([test "$GCC" = "yes"], - [SO_CFLAGS="-fPIC" - AS_IF([test -z "$SO_LD"], - [SO_LDFLAGS="-Xcompiler -shared" - SO_LD="${CC}" - ]) - ]) - # If we still don't know how to make shared objects, don't make any. - AS_IF([test -n "$SO_LD"], - [SO_TARGETS="\${SO_TARGETS}" - AC_DEFINE([ISC_DLZ_DLOPEN], [1], - [Define to allow building of objects for dlopen().]) - ]) - ]) - -CFLAGS="$CFLAGS $SO_CFLAGS" - -AC_SUBST(SO) -AC_SUBST(SO_CFLAGS) -AC_SUBST(SO_LDFLAGS) -AC_SUBST(SO_LD) -AC_SUBST(SO_STRIP) -AC_SUBST(SO_TARGETS) - # # Response policy rewriting using DNS Response Policy Service (DNSRPS) # interface. @@ -2394,286 +1501,105 @@ AS_IF([test "$enable_dnsrps" != "no"],[ AC_DEFINE([USE_DNSRPS], [1], [Enable DNS Response Policy Service API]) ]) -sinclude(contrib/dlz/config.dlz.in) -AC_MSG_CHECKING(contributed DLZ drivers) - -if test -n "$CONTRIB_DLZ" -then - AC_MSG_RESULT(yes) - DLZ_DRIVER_RULES=contrib/dlz/drivers/rules - AC_CONFIG_FILES([$DLZ_DRIVER_RULES - contrib/dlz/modules/mysql/Makefile - contrib/dlz/modules/mysqldyn/Makefile]) -else - AC_MSG_RESULT(no) - DLZ_DRIVER_RULES=/dev/null -fi - -AC_SUBST(CONTRIB_DLZ) -AC_SUBST(DLZ_DRIVER_INCLUDES) -AC_SUBST(DLZ_DRIVER_LIBS) -AC_SUBST(DLZ_DRIVER_SRCS) -AC_SUBST(DLZ_DRIVER_OBJS) -AC_SUBST(DLZ_SYSTEM_TEST) -AC_SUBST(DLZ_DRIVER_MYSQL_INCLUDES) -AC_SUBST(DLZ_DRIVER_MYSQL_LIBS) -AC_SUBST_FILE(DLZ_DRIVER_RULES) +# FIXME +#sinclude(contrib/dlz/config.dlz.in) +# AC_MSG_CHECKING(contributed DLZ drivers) +# +# if test -n "$CONTRIB_DLZ" +# then +# AC_MSG_RESULT(yes) +# DLZ_DRIVER_RULES=contrib/dlz/drivers/rules +# AC_CONFIG_FILES([$DLZ_DRIVER_RULES +# contrib/dlz/modules/mysql/Makefile +# contrib/dlz/modules/mysqldyn/Makefile]) +# else +# AC_MSG_RESULT(no) +# DLZ_DRIVER_RULES=/dev/null +# fi +# +# AC_SUBST(CONTRIB_DLZ) +# AC_SUBST(DLZ_DRIVER_INCLUDES) +# AC_SUBST(DLZ_DRIVER_LIBS) +# AC_SUBST(DLZ_DRIVER_SRCS) +# AC_SUBST(DLZ_DRIVER_OBJS) +# AC_SUBST(DLZ_SYSTEM_TEST) +# AC_SUBST(DLZ_DRIVER_MYSQL_INCLUDES) +# AC_SUBST(DLZ_DRIVER_MYSQL_LIBS) +# AC_SUBST_FILE(DLZ_DRIVER_RULES) AC_CHECK_HEADERS([glob.h]) -if test "yes" = "$cross_compiling"; then - if test -z "$BUILD_CC"; then - AC_MSG_ERROR([BUILD_CC not set]) - fi - BUILD_CFLAGS="$BUILD_CFLAGS" - BUILD_CPPFLAGS="$BUILD_CPPFLAGS" - BUILD_LDFLAGS="$BUILD_LDFLAGS" - BUILD_LIBS="$BUILD_LIBS" -else - BUILD_CC="$CC" - BUILD_CFLAGS="$CFLAGS" - BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG" - BUILD_LDFLAGS="$LDFLAGS" - BUILD_LIBS="$LIBS" -fi - -NEWFLAGS="" -for e in $BUILD_LDFLAGS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -BUILD_LDFLAGS="$NEWFLAGS" - -NEWFLAGS="" -for e in $DNS_GSSAPI_LIBS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -DNS_GSSAPI_LIBS="$NEWFLAGS" - -NEWFLAGS="" -for e in $ISC_OPENSSL_LIBS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -ISC_OPENSSL_LIBS="$NEWFLAGS" - -NEWFLAGS="" -for e in $DNS_CRYPTO_LIBS ; do - case $e in - -L*) - case $host_os in - netbsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - freebsd*) - ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - solaris*) - ee=`echo $e | sed -e 's%^-L%-R%'` - NEWFLAGS="$NEWFLAGS $e $ee" - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac - ;; - *) - NEWFLAGS="$NEWFLAGS $e" - ;; - esac -done -DNS_CRYPTO_LIBS="$NEWFLAGS" - -AC_SUBST(BUILD_CC) -AC_SUBST(BUILD_CFLAGS) -AC_SUBST(BUILD_CPPFLAGS) -AC_SUBST(BUILD_LDFLAGS) -AC_SUBST(BUILD_LIBS) - -# -# Commands to run at the end of config.status. -# Don't just put these into configure, it won't work right if somebody -# runs config.status directly (which autoconf allows). -# - -AC_CONFIG_COMMANDS( - [chmod], - [chmod a+x doc/doxygen/doxygen-input-filter]) - # # Files to configure. These are listed here because we used to -# specify them as arguments to AC_OUTPUT. It's (now) ok to move these -# elsewhere if there's a good reason for doing so. +# specify them as arguments to AC_OUTPUT. # -AC_CONFIG_FILES([ - Makefile - bin/Makefile - bin/check/Makefile - bin/confgen/Makefile - bin/confgen/unix/Makefile - bin/delv/Makefile - bin/dig/Makefile - bin/dnssec/Makefile - bin/named/Makefile - bin/named/unix/Makefile - bin/nsupdate/Makefile - bin/pkcs11/Makefile - bin/plugins/Makefile - bin/rndc/Makefile - bin/tests/Makefile - bin/tests/headerdep_test.sh - bin/tests/optional/Makefile - bin/tests/pkcs11/Makefile - bin/tests/pkcs11/benchmarks/Makefile - bin/tests/system/Makefile - bin/tests/system/conf.sh - bin/tests/system/dlzexternal/Makefile - bin/tests/system/dlzexternal/ns1/dlzs.conf - bin/tests/system/dyndb/Makefile - bin/tests/system/dyndb/driver/Makefile - bin/tests/system/pipelined/Makefile - bin/tests/system/rndc/Makefile - bin/tests/system/rpz/Makefile - bin/tests/system/rsabigexponent/Makefile - bin/tests/system/tkey/Makefile - bin/tools/Makefile - contrib/scripts/check-secure-delegation.pl - contrib/scripts/zone-edit.sh - doc/Makefile - doc/arm/Makefile - doc/arm/noteversion.xml - doc/arm/pkgversion.xml - doc/arm/releaseinfo.xml - doc/doxygen/Doxyfile - doc/doxygen/Makefile - doc/doxygen/doxygen-input-filter - doc/misc/Makefile - doc/tex/Makefile - doc/tex/armstyle.sty - doc/xsl/Makefile - doc/xsl/isc-docbook-chunk.xsl - doc/xsl/isc-docbook-html.xsl - doc/xsl/isc-manpage.xsl - doc/xsl/isc-notes-html.xsl - fuzz/Makefile - lib/Makefile - lib/bind9/Makefile - lib/bind9/include/Makefile - lib/bind9/include/bind9/Makefile - lib/dns/Makefile - lib/dns/include/Makefile - lib/dns/include/dns/Makefile - lib/dns/include/dst/Makefile - lib/dns/tests/Makefile - lib/irs/Makefile - lib/irs/include/Makefile - lib/irs/include/irs/Makefile - lib/irs/include/irs/netdb.h - lib/irs/include/irs/platform.h - lib/irs/tests/Makefile - lib/isc/Makefile - lib/isc/include/Makefile - lib/isc/include/isc/Makefile - lib/isc/include/isc/platform.h - lib/isc/include/pk11/Makefile - lib/isc/include/pkcs11/Makefile - lib/isc/netmgr/Makefile - lib/isc/pthreads/Makefile - lib/isc/pthreads/include/Makefile - lib/isc/pthreads/include/isc/Makefile - lib/isc/tests/Makefile - lib/isc/unix/Makefile - lib/isc/unix/include/Makefile - lib/isc/unix/include/isc/Makefile - lib/isccc/Makefile - lib/isccc/include/Makefile - lib/isccc/include/isccc/Makefile - lib/isccc/tests/Makefile - lib/isccfg/Makefile - lib/isccfg/include/Makefile - lib/isccfg/include/isccfg/Makefile - lib/isccfg/tests/Makefile - lib/ns/Makefile - lib/ns/include/Makefile - lib/ns/include/ns/Makefile - lib/ns/tests/Makefile - lib/samples/Makefile - lib/samples/Makefile-postinstall - make/Makefile - make/mkdep - unit/unittest.sh - util/check-make-install -]) +# Top + +AC_CONFIG_FILES([Makefile]) + +# Binaries + +AC_CONFIG_FILES([bin/Makefile + bin/named/Makefile + bin/rndc/Makefile + bin/dig/Makefile + bin/delv/Makefile + bin/dnssec/Makefile + bin/tools/Makefile + bin/nsupdate/Makefile + bin/check/Makefile + bin/confgen/Makefile + bin/pkcs11/Makefile + bin/plugins/Makefile]) + +# Libraries + +AC_CONFIG_FILES([lib/Makefile + lib/isc/Makefile + lib/dns/Makefile + lib/ns/Makefile + lib/irs/Makefile + lib/isccfg/Makefile + lib/isccc/Makefile + lib/bind9/Makefile + lib/samples/Makefile]) + +# Generated headers + +AC_CONFIG_FILES([lib/isc/include/isc/platform.h]) + +# Unit Tests + +AC_CONFIG_FILES([lib/isc/tests/Makefile + lib/dns/tests/Makefile + lib/ns/tests/Makefile + lib/irs/tests/Makefile + lib/isccc/tests/Makefile + lib/isccfg/tests/Makefile]) + +# System Tests + +AC_CONFIG_FILES([bin/tests/Makefile + bin/tests/system/Makefile + bin/tests/system/conf.sh + bin/tests/system/dyndb/driver/Makefile + bin/tests/system/dlzexternal/driver/Makefile]) + +AC_CONFIG_FILES([bin/tests/system/ifconfig.sh], + [chmod +x bin/tests/system/ifconfig.sh]) +AC_CONFIG_FILES([bin/tests/system/run.sh], + [chmod +x bin/tests/system/run.sh]) +AC_CONFIG_FILES([bin/tests/system/start.sh], + [chmod +x bin/tests/system/start.sh]) +AC_CONFIG_FILES([bin/tests/system/stop.sh], + [chmod +x bin/tests/system/stop.sh]) +AC_CONFIG_FILES([bin/tests/system/system-test-driver.sh], + [chmod +x bin/tests/system/system-test-driver.sh]) + +# Misc + +AC_CONFIG_FILES([util/check-make-install]) # # Do it @@ -2681,27 +1607,6 @@ AC_CONFIG_FILES([ AC_OUTPUT -# -# Now that the Makefiles exist we can ensure that everything is rebuilt. -# -AC_ARG_WITH(make-clean, - AS_HELP_STRING([--with-make-clean], - [run "make clean" at end of configure [yes|no]]), - make_clean="$withval", make_clean="yes") -case "$make_clean" in -yes) - if test "yes" != "$no_create" - then - if test "yes" = "$silent" - then - make clean > /dev/null - else - make clean - fi - fi - ;; -esac - AC_ARG_ENABLE(full-report, AS_HELP_STRING([--enable-full-report], [report values of all configure options])) @@ -2810,6 +1715,9 @@ report() { echo "-------------------------------------------------------------------------------" echo "Compiler: $CC" $CC --version 2>&1 | sed 's/^/ /' + echo "CFLAGS: $STD_CFLAGS $CFLAGS" + echo "CPPFLAGS: $STD_CPPFLAGS $CPPFLAGS" + echo "LDFLAGS: $LDFLAGS" if test "X$ac_unrecognized_opts" != "X"; then echo "Unrecognized options:" diff --git a/contrib/README b/contrib/README index 15db70fe0a..466e11d1c7 100644 --- a/contrib/README +++ b/contrib/README @@ -18,6 +18,11 @@ be fixed as time permits. Sample configuration for setting up a DNS-over-TLS server using BIND with Nginx as a TLS proxy. + - kasp/ + + Scripts for converting key and signature policies from OpenDNSSEC + KASP format to the policy.conf format used by dnssec-keymgr. + - dlz/modules Dynamically linkable DLZ modules that can be configured into diff --git a/contrib/dlz/modules/include/dlz_minimal.h b/contrib/dlz/modules/include/dlz_minimal.h index bac8ab12d1..ff87532a84 100644 --- a/contrib/dlz/modules/include/dlz_minimal.h +++ b/contrib/dlz/modules/include/dlz_minimal.h @@ -31,9 +31,9 @@ #include #include -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 #include -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ #include #include #include @@ -104,9 +104,9 @@ typedef struct isc_sockaddr { struct sockaddr sa; struct sockaddr_in sin; struct sockaddr_in6 sin6; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 struct sockaddr_un sunix; -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } type; unsigned int length; void * link; diff --git a/contrib/kasp/README b/contrib/kasp/README new file mode 100644 index 0000000000..fb897f1073 --- /dev/null +++ b/contrib/kasp/README @@ -0,0 +1,11 @@ +This directory is for tools and scripts related to the OpenDNSSEC KASP +("key and signature policy") format. Currently it only contains +"kasp2policy.py", a python script for converting KASP key policy +to the "dnssec.policy" format that is used by dnssec-keymgr. + +This depends on PLY (python lex/yacc) and on the "isc.dnskey" module in +bin/python/isc. + +Basic test: +$ python kasp2policy.py kasp.xml > policy.out +$ diff policy.out policy.good diff --git a/contrib/kasp/kasp.xml b/contrib/kasp/kasp.xml new file mode 100644 index 0000000000..d94b0843ec --- /dev/null +++ b/contrib/kasp/kasp.xml @@ -0,0 +1,134 @@ + + + + + + A default policy that will + amaze you and your friends + + PT5M + PT5M + + PT15M + PT15M + + PT2M + PT1M + + + + + + + + + + PT1M + PT0S + PT0S + + + + 5 + PT40M + softHSM + 1 + + + + + 5 + PT25M + softHSM + 1 + + + + + PT0S + + PT0S + PT0S + unixtime + + + + + PT8M + + PT0S + + + PT0S + PT0S + + + + + A default policy that will amaze you and your friends + + PT7M + PT7M + + PT15M + PT16M + + PT2M + PT1M + + + + + P120D + + 1 + 5 + + + + + + + + PT15M + PT0S + PT0S + + + + 7 + PT45M + softHSM + 1 + + + + + 7 + PT25M + softHSM + 1 + + + + + PT0S + + PT0S + PT0S + unixtime + + + + + PT12M + + PT0S + + + PT0S + PT0S + + + + diff --git a/contrib/kasp/policy.good b/contrib/kasp/policy.good new file mode 100644 index 0000000000..18c636083c --- /dev/null +++ b/contrib/kasp/policy.good @@ -0,0 +1,24 @@ +# A default policy that will +# amaze you and your friends +policy Policy1 { + algorithm RSASHA1; + keyttl 60; + key-size ksk 2048; + key-size zsk 2048; + roll-period ksk 2400; + roll-period zsk 1500; + standby ksk 1; + standby zsk 1; +}; + +# A default policy that will amaze you and your friends +policy Policy2 { + algorithm NSEC3RSASHA1; + keyttl 900; + key-size ksk 2048; + key-size zsk 2048; + roll-period ksk 2700; + roll-period zsk 1500; + standby ksk 1; + standby zsk 1; +}; diff --git a/doc/arm/libdns.xml b/doc/arm/libdns.xml index f4758429db..21e4f69257 100644 --- a/doc/arm/libdns.xml +++ b/doc/arm/libdns.xml @@ -77,10 +77,6 @@ $ make install Normal installation of BIND will also install library object and header files. Root privilege is normally required. - - To see how to build your own application after the installation, see - lib/samples/Makefile-postinstall.in. -
diff --git a/lib/.gitignore b/lib/.gitignore index f4b58582ca..8445734faf 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -1,2 +1,3 @@ platform.h netdb.h +gen diff --git a/lib/Kyuafile b/lib/Kyuafile deleted file mode 100644 index 39ce98697b..0000000000 --- a/lib/Kyuafile +++ /dev/null @@ -1,9 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('dns/Kyuafile') -include('irs/Kyuafile') -include('isc/Kyuafile') -include('isccc/Kyuafile') -include('isccfg/Kyuafile') -include('ns/Kyuafile') diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000000..5cbaf3c895 --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,3 @@ +include $(top_srcdir)/Makefile.top + +SUBDIRS = isc dns isccc ns isccfg bind9 irs samples diff --git a/lib/bind9/Makefile.am b/lib/bind9/Makefile.am new file mode 100644 index 0000000000..ffba4ace11 --- /dev/null +++ b/lib/bind9/Makefile.am @@ -0,0 +1,30 @@ +include $(top_srcdir)/Makefile.top + +lib_LTLIBRARIES = libbind9.la + +libbind9_ladir = $(includedir)/bind9 +libbind9_la_HEADERS = \ + include/bind9/check.h \ + include/bind9/getaddresses.h + +libbind9_la_SOURCES = \ + $(libbind9_la_HEADERS) \ + check.c \ + getaddresses.c + +libbind9_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBNS_CFLAGS) \ + $(LIBBIND9_CFLAGS) + +libbind9_la_LIBADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBNS_LIBS) \ + $(LIBISCCFG_LIBS) + +libbind9_la_LDFLAGS = \ + $(libbind9_VERSION_INFO) diff --git a/lib/bind9/check.c b/lib/bind9/check.c index c1f8503b00..fdb0f42378 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -3899,7 +3899,6 @@ check_rpz_catz(const char *rpz_catz, const cfg_obj_t *rpz_obj, return (result); } -#ifdef HAVE_DLOPEN /*% * Data structure used for the 'callback_data' argument to check_one_plugin(). */ @@ -3947,7 +3946,6 @@ check_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj, return (ISC_R_SUCCESS); } -#endif /* ifdef HAVE_DLOPEN */ static isc_result_t check_dnstap(const cfg_obj_t *voptions, const cfg_obj_t *config, @@ -3997,9 +3995,6 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions, const cfg_obj_t *view_ta = NULL, *global_ta = NULL; const cfg_obj_t *check_keys[2] = { NULL, NULL }; const cfg_obj_t *keys = NULL; -#ifndef HAVE_DLOPEN - const cfg_obj_t *dyndb = NULL; -#endif /* ifndef HAVE_DLOPEN */ const cfg_listelt_t *element, *element2; isc_symtab_t *symtab = NULL; isc_result_t result = ISC_R_SUCCESS; @@ -4057,22 +4052,6 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions, } } -#ifndef HAVE_DLOPEN - if (voptions != NULL) { - (void)cfg_map_get(voptions, "dyndb", &dyndb); - } else { - (void)cfg_map_get(config, "dyndb", &dyndb); - } - - if (dyndb != NULL) { - cfg_obj_log(dyndb, logctx, ISC_LOG_ERROR, - "dynamic loading of databases is not supported"); - if (tresult != ISC_R_SUCCESS) { - result = ISC_R_NOTIMPLEMENTED; - } - } -#endif /* ifndef HAVE_DLOPEN */ - /* * Check that the response-policy and catalog-zones options * refer to zones that exist. @@ -4373,7 +4352,6 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions, } } -#ifdef HAVE_DLOPEN { struct check_one_plugin_data check_one_plugin_data = { .mctx = mctx, @@ -4389,7 +4367,6 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions, result = tresult; } } -#endif /* HAVE_DLOPEN */ cleanup: if (symtab != NULL) { diff --git a/lib/bind9/include/bind9/version.h b/lib/bind9/include/bind9/version.h deleted file mode 100644 index aa48b897f9..0000000000 --- a/lib/bind9/include/bind9/version.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file bind9/version.h */ - -#include - -LIBBIND9_EXTERNAL_DATA extern const char bind9_version[]; - -LIBBIND9_EXTERNAL_DATA extern const unsigned int bind9_libinterface; -LIBBIND9_EXTERNAL_DATA extern const unsigned int bind9_librevision; -LIBBIND9_EXTERNAL_DATA extern const unsigned int bind9_libage; diff --git a/lib/bind9/version.c b/lib/bind9/version.c deleted file mode 100644 index 6b25b6afbb..0000000000 --- a/lib/bind9/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -const char bind9_version[] = VERSION; - -const unsigned int bind9_libinterface = LIBINTERFACE; -const unsigned int bind9_librevision = LIBREVISION; -const unsigned int bind9_libage = LIBAGE; diff --git a/lib/bind9/win32/libbind9.vcxproj.filters.in b/lib/bind9/win32/libbind9.vcxproj.filters.in index 4e283308b7..3ea1f2067d 100644 --- a/lib/bind9/win32/libbind9.vcxproj.filters.in +++ b/lib/bind9/win32/libbind9.vcxproj.filters.in @@ -21,9 +21,6 @@ Source Files - - Source Files - Source Files @@ -38,8 +35,5 @@ Header Files - - Header Files - - \ No newline at end of file + diff --git a/lib/bind9/win32/libbind9.vcxproj.in b/lib/bind9/win32/libbind9.vcxproj.in index 4fd23e197d..817c378e56 100644 --- a/lib/bind9/win32/libbind9.vcxproj.in +++ b/lib/bind9/win32/libbind9.vcxproj.in @@ -121,12 +121,10 @@ - - diff --git a/lib/bind9/win32/version.c b/lib/bind9/win32/version.c deleted file mode 100644 index 11e99d1d25..0000000000 --- a/lib/bind9/win32/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include - -LIBBIND9_EXTERNAL_DATA const char bind9_version[] = VERSION; - -LIBBIND9_EXTERNAL_DATA const unsigned int bind9_libinterface = LIBINTERFACE; -LIBBIND9_EXTERNAL_DATA const unsigned int bind9_librevision = LIBREVISION; -LIBBIND9_EXTERNAL_DATA const unsigned int bind9_libage = LIBAGE; diff --git a/lib/dns/Kyuafile b/lib/dns/Kyuafile deleted file mode 100644 index 0739e3a60c..0000000000 --- a/lib/dns/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('tests/Kyuafile') diff --git a/lib/dns/Makefile.am b/lib/dns/Makefile.am new file mode 100644 index 0000000000..62de041110 --- /dev/null +++ b/lib/dns/Makefile.am @@ -0,0 +1,352 @@ +include $(top_srcdir)/Makefile.top + +lib_LTLIBRARIES = libdns.la + +nodist_libdns_ladir = $(includedir)/dns +nodist_libdns_la_HEADERS = \ + include/dns/enumclass.h \ + include/dns/enumtype.h \ + include/dns/rdatastruct.h + +nodist_libdns_la_SOURCES = \ + $(nodist_libdns_la_HEADERS) \ + code.h + +BUILT_SOURCES = \ + $(nodist_libdns_la_SOURCES) + +CLEANFILES = \ + $(nodist_libdns_la_SOURCES) + +noinst_PROGRAMS = gen + +gen_SOURCES = gen.c gen-unix.h + +gen_CPPFLAGS = \ + $(AM_CPPFLAGS) + +EXTRA_DIST = gen-win32.h + +include/dns/enumtype.h: gen Makefile + mkdir -p include/dns + $(builddir)/gen -s $(srcdir) -t > $@ + +include/dns/enumclass.h: gen Makefile + mkdir -p include/dns + $(builddir)/gen -s $(srcdir) -c > $@ + +include/dns/rdatastruct.h: gen rdata/rdatastructpre.h rdata/rdatastructsuf.h Makefile + mkdir -p include/dns + $(builddir)/gen -s $(srcdir) -i \ + -P $(srcdir)/rdata/rdatastructpre.h \ + -S $(srcdir)/rdata/rdatastructsuf.h > $@ + +code.h: gen Makefile + $(builddir)/gen -s $(srcdir) > $@ + +libdns_ladir = $(includedir)/dns +libdns_la_HEADERS = \ + include/dns/acl.h \ + include/dns/adb.h \ + include/dns/badcache.h \ + include/dns/bit.h \ + include/dns/byaddr.h \ + include/dns/cache.h \ + include/dns/callbacks.h \ + include/dns/catz.h \ + include/dns/cert.h \ + include/dns/client.h \ + include/dns/clientinfo.h \ + include/dns/compress.h \ + include/dns/db.h \ + include/dns/dbiterator.h \ + include/dns/dbtable.h \ + include/dns/diff.h \ + include/dns/dispatch.h \ + include/dns/dlz.h \ + include/dns/dlz_dlopen.h \ + include/dns/dns64.h \ + include/dns/dnsrps.h \ + include/dns/dnssec.h \ + include/dns/ds.h \ + include/dns/dsdigest.h \ + include/dns/dnstap.h \ + include/dns/dyndb.h \ + include/dns/ecs.h \ + include/dns/edns.h \ + include/dns/ecdb.h \ + include/dns/events.h \ + include/dns/fixedname.h \ + include/dns/forward.h \ + include/dns/geoip.h \ + include/dns/ipkeylist.h \ + include/dns/iptable.h \ + include/dns/journal.h \ + include/dns/kasp.h \ + include/dns/keydata.h \ + include/dns/keyflags.h \ + include/dns/keymgr.h \ + include/dns/keytable.h \ + include/dns/keyvalues.h \ + include/dns/lib.h \ + include/dns/librpz.h \ + include/dns/lookup.h \ + include/dns/log.h \ + include/dns/master.h \ + include/dns/masterdump.h \ + include/dns/message.h \ + include/dns/name.h \ + include/dns/ncache.h \ + include/dns/nsec.h \ + include/dns/nsec3.h \ + include/dns/nta.h \ + include/dns/opcode.h \ + include/dns/order.h \ + include/dns/peer.h \ + include/dns/portlist.h \ + include/dns/private.h \ + include/dns/rbt.h \ + include/dns/rcode.h \ + include/dns/rdata.h \ + include/dns/rdataclass.h \ + include/dns/rdatalist.h \ + include/dns/rdataset.h \ + include/dns/rdatasetiter.h \ + include/dns/rdataslab.h \ + include/dns/rdatatype.h \ + include/dns/request.h \ + include/dns/resolver.h \ + include/dns/result.h \ + include/dns/rootns.h \ + include/dns/rpz.h \ + include/dns/rriterator.h \ + include/dns/rrl.h \ + include/dns/sdb.h \ + include/dns/sdlz.h \ + include/dns/secalg.h \ + include/dns/secproto.h \ + include/dns/soa.h \ + include/dns/ssu.h \ + include/dns/stats.h \ + include/dns/tcpmsg.h \ + include/dns/time.h \ + include/dns/timer.h \ + include/dns/tkey.h \ + include/dns/tsec.h \ + include/dns/tsig.h \ + include/dns/ttl.h \ + include/dns/types.h \ + include/dns/update.h \ + include/dns/validator.h \ + include/dns/view.h \ + include/dns/xfrin.h \ + include/dns/zone.h \ + include/dns/zonekey.h \ + include/dns/zoneverify.h \ + include/dns/zt.h + +dstdir = $(includedir)/dst +dst_HEADERS = \ + include/dst/dst.h \ + include/dst/gssapi.h \ + include/dst/result.h + +libdns_la_SOURCES = \ + $(libdns_la_HEADERS) \ + $(dst_HEADERS) \ + acl.c \ + adb.c \ + badcache.c \ + byaddr.c \ + cache.c \ + callbacks.c \ + catz.c \ + clientinfo.c \ + compress.c \ + db.c \ + dbiterator.c \ + dbtable.c \ + diff.c \ + dispatch.c \ + dlz.c \ + dns64.c \ + dnsrps.c \ + dnssec.c \ + ds.c \ + dst_api.c \ + dst_internal.h \ + dst_openssl.h \ + dst_parse.c \ + dst_parse.h \ + dst_pkcs11.h \ + dst_result.c \ + dyndb.c \ + ecs.c \ + fixedname.c \ + forward.c \ + hmac_link.c \ + ipkeylist.c \ + iptable.c \ + journal.c \ + kasp.c \ + key.c \ + keydata.c \ + keymgr.c \ + keytable.c \ + lib.c \ + log.c \ + lookup.c \ + master.c \ + masterdump.c \ + message.c \ + name.c \ + ncache.c \ + nsec.c \ + nsec3.c \ + nta.c \ + openssl_link.c \ + openssldh_link.c \ + order.c \ + peer.c \ + private.c \ + portlist.c \ + rbt.c \ + rbtdb.h \ + rbtdb.c \ + rcode.c \ + rdata.c \ + rdatalist.c \ + rdataset.c \ + rdatasetiter.c \ + rdataslab.c \ + request.c \ + resolver.c \ + result.c \ + rootns.c \ + rpz.c \ + rrl.c \ + rriterator.c \ + sdb.c \ + sdlz.c \ + soa.c \ + ssu.c \ + ssu_external.c \ + stats.c \ + tcpmsg.c \ + time.c \ + timer.c \ + tkey.c \ + tsec.c \ + tsig.c \ + ttl.c \ + update.c \ + validator.c \ + view.c \ + xfrin.c \ + zone.c \ + zoneverify.c \ + zonekey.c \ + zt.c \ + client.c \ + ecdb.c \ + rdatalist_p.h \ + tsig_p.h \ + zone_p.h + +if HAVE_GSSAPI +libdns_la_SOURCES += \ + gssapi_link.c \ + gssapictx.c +else !HAVE_GSSAPI +libdns_la_SOURCES += \ + gssapictx-dummy.c +endif + +if HAVE_PKCS11 +libdns_la_SOURCES += \ + pkcs11.c \ + pkcs11ecdsa_link.c \ + pkcs11eddsa_link.c \ + pkcs11rsa_link.c +else !HAVE_PKCS11 +libdns_la_SOURCES += \ + opensslecdsa_link.c \ + openssleddsa_link.c \ + opensslrsa_link.c +endif + +if HAVE_GEOIP2 +libdns_la_SOURCES += \ + geoip2.c +endif + +libdns_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(OPENSSL_CFLAGS) \ + $(LIBLTDL_CFLAGS) + +libdns_la_LDFLAGS = \ + $(libdns_VERSION_INFO) + +libdns_la_LIBADD = \ + $(LIBISC_LIBS) \ + $(OPENSSL_LIBS) \ + $(LIBLTDL_LIBS) + +if HAVE_JSON_C +libdns_la_CPPFLAGS += \ + $(JSON_C_CFLAGS) + +libdns_la_LIBADD += \ + $(JSON_C_LIBS) +endif HAVE_JSON_C + +if HAVE_LIBXML2 +libdns_la_CPPFLAGS += \ + $(LIBXML2_CFLAGS) + +libdns_la_LIBADD += \ + $(LIBXML2_LIBS) +endif HAVE_LIBXML2 + +if HAVE_GSSAPI +libdns_la_CPPFLAGS += \ + $(GSSAPI_CFLAGS) \ + $(KRB5_CFLAGS) +libdns_la_LIBADD += \ + $(GSSAPI_LIBS) \ + $(KRB5_LIBS) +endif + +if HAVE_GEOIP2 +libdns_la_CPPFLAGS += \ + $(MAXMINDDB_CFLAGS) +libdns_la_LDFLAGS += \ + $(MAXMINDDB_LIBS) +endif + +if HAVE_DNSTAP +nodist_libdns_la_SOURCES += \ + dnstap.pb-c.h \ + dnstap.pb-c.c + +libdns_la_SOURCES += \ + dnstap.c + +dnstap.pb-c.h dnstap.pb-c.c: dnstap.proto + $(PROTOC_C) --proto_path=$(srcdir) --c_out=. dnstap.proto + +libdns_la_CPPFLAGS += $(DNSTAP_CFLAGS) +libdns_la_LIBADD += $(DNSTAP_LIBS) +endif + +if HAVE_LMDB +libdns_la_CPPFLAGS += $(LMDB_CFLAGS) +libdns_la_LIBADD += $(LMDB_LIBS) +endif + +if HAVE_CMOCKA +SUBDIRS = tests +endif diff --git a/lib/dns/dnstap.c b/lib/dns/dnstap.c index 55efea3f50..42de18f9e4 100644 --- a/lib/dns/dnstap.c +++ b/lib/dns/dnstap.c @@ -135,7 +135,7 @@ typedef struct ioq { struct fstrm_iothr_queue *ioq; } dt__ioq_t; -ISC_THREAD_LOCAL dt__ioq_t dt_ioq = { 0 }; +static thread_local dt__ioq_t dt_ioq = { 0 }; static atomic_uint_fast32_t global_generation; diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index 94106a3fc1..2466bb734f 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -231,9 +231,9 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) { RETERR(dst__pkcs11eddsa_init(&dst_t_func[DST_ALG_ED25519])); RETERR(dst__pkcs11eddsa_init(&dst_t_func[DST_ALG_ED448])); #endif /* USE_PKCS11 */ -#ifdef GSSAPI +#if HAVE_GSSAPI RETERR(dst__gssapi_init(&dst_t_func[DST_ALG_GSSAPI])); -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ dst_initialized = true; return (ISC_R_SUCCESS); diff --git a/lib/dns/dst_internal.h b/lib/dns/dst_internal.h index 116e2d28fa..48595db66b 100644 --- a/lib/dns/dst_internal.h +++ b/lib/dns/dst_internal.h @@ -237,10 +237,10 @@ dst__pkcs11ecdsa_init(struct dst_func **funcp); isc_result_t dst__pkcs11eddsa_init(struct dst_func **funcp); #endif /* USE_PKCS11 */ -#ifdef GSSAPI +#if HAVE_GSSAPI isc_result_t dst__gssapi_init(struct dst_func **funcp); -#endif /* GSSAPI */ +#endif /* HAVE_GSSAPI*/ /*% * Destructors diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c index fdc8ea59f8..93bc9c712b 100644 --- a/lib/dns/dyndb.c +++ b/lib/dns/dyndb.c @@ -9,12 +9,7 @@ * information regarding copyright ownership. */ -#if HAVE_DLFCN_H -#include -#elif _WIN32 -#include -#endif /* if HAVE_DLFCN_H */ - +#include #include #include @@ -83,19 +78,17 @@ impfind(const char *name) { return (NULL); } -#if HAVE_DLFCN_H && HAVE_DLOPEN static isc_result_t -load_symbol(void *handle, const char *filename, const char *symbol_name, +load_symbol(lt_dlhandle handle, const char *filename, const char *symbol_name, void **symbolp) { - const char *errmsg; void *symbol; REQUIRE(handle != NULL); REQUIRE(symbolp != NULL && *symbolp == NULL); - symbol = dlsym(handle, symbol_name); + symbol = lt_dlsym(handle, symbol_name); if (symbol == NULL) { - errmsg = dlerror(); + const char *errmsg = lt_dlerror(); if (errmsg == NULL) { errmsg = "returned function pointer is NULL"; } @@ -106,7 +99,7 @@ load_symbol(void *handle, const char *filename, const char *symbol_name, symbol_name, filename, errmsg); return (ISC_R_FAILURE); } - dlerror(); + (void)lt_dlerror(); *symbolp = symbol; @@ -117,12 +110,12 @@ static isc_result_t load_library(isc_mem_t *mctx, const char *filename, const char *instname, dyndb_implementation_t **impp) { isc_result_t result; - void *handle = NULL; + lt_dlhandle handle = NULL; dyndb_implementation_t *imp = NULL; dns_dyndb_register_t *register_func = NULL; dns_dyndb_destroy_t *destroy_func = NULL; dns_dyndb_version_t *version_func = NULL; - int version, flags; + int version; REQUIRE(impp != NULL && *impp == NULL); @@ -130,18 +123,17 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname, ISC_LOG_INFO, "loading DynDB instance '%s' driver '%s'", instname, filename); - flags = RTLD_NOW | RTLD_LOCAL; -#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ - flags |= RTLD_DEEPBIND; -#endif /* if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ */ + if (lt_dlinit() != 0) { + CHECK(ISC_R_FAILURE); + } - handle = dlopen(filename, flags); + handle = lt_dlopen(filename); if (handle == NULL) { CHECK(ISC_R_FAILURE); } /* Clear dlerror */ - dlerror(); + (void)lt_dlerror(); CHECK(load_symbol(handle, filename, "dyndb_version", (void **)&version_func)); @@ -183,7 +175,7 @@ cleanup: DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR, "failed to dynamically load instance '%s' " "driver '%s': %s (%s)", - instname, filename, dlerror(), + instname, filename, lt_dlerror(), isc_result_totext(result)); } if (imp != NULL) { @@ -191,7 +183,7 @@ cleanup: sizeof(dyndb_implementation_t)); } if (result != ISC_R_SUCCESS && handle != NULL) { - dlclose(handle); + (void)lt_dlclose(handle); } return (result); @@ -209,140 +201,6 @@ unload_library(dyndb_implementation_t **impp) { isc_mem_free(imp->mctx, imp->name); isc_mem_putanddetach(&imp->mctx, imp, sizeof(dyndb_implementation_t)); } -#elif _WIN32 -static isc_result_t -load_symbol(HMODULE handle, const char *filename, const char *symbol_name, - void **symbolp) { - void *symbol; - - REQUIRE(handle != NULL); - REQUIRE(symbolp != NULL && *symbolp == NULL); - - symbol = GetProcAddress(handle, symbol_name); - if (symbol == NULL) { - int errstatus = GetLastError(); - isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, - DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR, - "failed to lookup symbol %s in " - "dyndb module '%s': %d", - symbol_name, filename, errstatus); - return (ISC_R_FAILURE); - } - - *symbolp = symbol; - - return (ISC_R_SUCCESS); -} - -static isc_result_t -load_library(isc_mem_t *mctx, const char *filename, const char *instname, - dyndb_implementation_t **impp) { - isc_result_t result; - HMODULE handle; - dyndb_implementation_t *imp = NULL; - dns_dyndb_register_t *register_func = NULL; - dns_dyndb_destroy_t *destroy_func = NULL; - dns_dyndb_version_t *version_func = NULL; - int version; - - REQUIRE(impp != NULL && *impp == NULL); - - isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB, - ISC_LOG_INFO, "loading DynDB instance '%s' driver '%s'", - instname, filename); - - handle = LoadLibraryA(filename); - if (handle == NULL) { - CHECK(ISC_R_FAILURE); - } - - CHECK(load_symbol(handle, filename, "dyndb_version", - (void **)&version_func)); - - version = version_func(NULL); - if (version < (DNS_DYNDB_VERSION - DNS_DYNDB_AGE) || - version > DNS_DYNDB_VERSION) - { - isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, - DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR, - "driver API version mismatch: %d/%d", version, - DNS_DYNDB_VERSION); - CHECK(ISC_R_FAILURE); - } - - CHECK(load_symbol(handle, filename, "dyndb_init", - (void **)®ister_func)); - CHECK(load_symbol(handle, filename, "dyndb_destroy", - (void **)&destroy_func)); - - imp = isc_mem_get(mctx, sizeof(dyndb_implementation_t)); - - imp->mctx = NULL; - isc_mem_attach(mctx, &imp->mctx); - imp->handle = handle; - imp->register_func = register_func; - imp->destroy_func = destroy_func; - imp->name = isc_mem_strdup(mctx, instname); - - imp->inst = NULL; - INIT_LINK(imp, link); - - *impp = imp; - imp = NULL; - -cleanup: - if (result != ISC_R_SUCCESS) { - isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, - DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR, - "failed to dynamically load instance '%s' " - "driver '%s': %d (%s)", - instname, filename, GetLastError(), - isc_result_totext(result)); - } - if (imp != NULL) { - isc_mem_putanddetach(&imp->mctx, imp, - sizeof(dyndb_implementation_t)); - } - if (result != ISC_R_SUCCESS && handle != NULL) { - FreeLibrary(handle); - } - - return (result); -} - -static void -unload_library(dyndb_implementation_t **impp) { - dyndb_implementation_t *imp; - - REQUIRE(impp != NULL && *impp != NULL); - - imp = *impp; - *impp = NULL; - - isc_mem_free(imp->mctx, imp->name); - isc_mem_putanddetach(&imp->mctx, imp, sizeof(dyndb_implementation_t)); -} -#else /* HAVE_DLFCN_H || _WIN32 */ -static isc_result_t -load_library(isc_mem_t *mctx, const char *filename, const char *instname, - dyndb_implementation_t **impp) { - UNUSED(mctx); - UNUSED(filename); - UNUSED(instname); - UNUSED(impp); - - isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB, - ISC_LOG_ERROR, - "dynamic database support is not implemented"); - - return (ISC_R_NOTIMPLEMENTED); -} - -static void -unload_library(dyndb_implementation_t **impp) { - UNUSED(impp); -} -#endif /* HAVE_DLFCN_H */ isc_result_t dns_dyndb_load(const char *libname, const char *name, const char *parameters, diff --git a/lib/dns/gen-unix.h b/lib/dns/gen-unix.h index 36f5b4729e..86f1124c48 100644 --- a/lib/dns/gen-unix.h +++ b/lib/dns/gen-unix.h @@ -32,7 +32,13 @@ #include /* Required on some systems for dirent.h. */ #include /* XXXDCL Required for ?. */ -#include +#ifdef __cplusplus +#define ISC_LANG_BEGINDECLS extern "C" { +#define ISC_LANG_ENDDECLS } +#else /* ifdef __cplusplus */ +#define ISC_LANG_BEGINDECLS +#define ISC_LANG_ENDDECLS +#endif /* ifdef __cplusplus */ #ifdef NEED_OPTARG extern char *optarg; diff --git a/lib/dns/gen-win32.h b/lib/dns/gen-win32.h index 31188558a8..ad16243615 100644 --- a/lib/dns/gen-win32.h +++ b/lib/dns/gen-win32.h @@ -65,7 +65,13 @@ #include #include -#include +#ifdef __cplusplus +#define ISC_LANG_BEGINDECLS extern "C" { +#define ISC_LANG_ENDDECLS } +#else /* ifdef __cplusplus */ +#define ISC_LANG_BEGINDECLS +#define ISC_LANG_ENDDECLS +#endif /* ifdef __cplusplus */ int isc_commandline_index = 1; /* Index into parent argv vector. */ int isc_commandline_option; /* Character checked for validity. */ diff --git a/lib/dns/geoip2.c b/lib/dns/geoip2.c index 9e7e6d49f0..91cc5ce94d 100644 --- a/lib/dns/geoip2.c +++ b/lib/dns/geoip2.c @@ -70,7 +70,7 @@ typedef struct geoip_state { MMDB_entry_s entry; } geoip_state_t; -ISC_THREAD_LOCAL geoip_state_t geoip_state = { 0 }; +static thread_local geoip_state_t geoip_state = { 0 }; static void set_state(const MMDB_s *db, const isc_netaddr_t *addr, diff --git a/lib/dns/gssapi_link.c b/lib/dns/gssapi_link.c index 3a939709d4..fe3bc7562f 100644 --- a/lib/dns/gssapi_link.c +++ b/lib/dns/gssapi_link.c @@ -9,9 +9,21 @@ * information regarding copyright ownership. */ -#ifdef GSSAPI - +#include /* IWYU pragma: keep */ #include +#include /* IWYU pragma: keep */ + +#if HAVE_GSSAPI_GSSAPI_H +#include +#elif HAVE_GSSAPI_H +#include +#endif + +#if HAVE_GSSAPI_GSSAPI_KRB5_H +#include +#elif HAVE_GSSAPI_KRB5_H +#include +#endif #include #include @@ -354,8 +366,4 @@ dst__gssapi_init(dst_func_t **funcp) { return (ISC_R_SUCCESS); } -#else /* ifdef GSSAPI */ -int gssapi_link_unneeded = 1; -#endif /* ifdef GSSAPI */ - /*! \file */ diff --git a/lib/dns/gssapictx-dummy.c b/lib/dns/gssapictx-dummy.c new file mode 100644 index 0000000000..b155ef710b --- /dev/null +++ b/lib/dns/gssapictx-dummy.c @@ -0,0 +1,103 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +#include +#include + +#include +#include +#include + +#include + +#include + +isc_result_t +dst_gssapi_acquirecred(const dns_name_t *name, bool initiate, + gss_cred_id_t *cred) { + REQUIRE(cred != NULL && *cred == NULL); + + UNUSED(name); + UNUSED(initiate); + UNUSED(cred); + + return (ISC_R_NOTIMPLEMENTED); +} + +bool +dst_gssapi_identitymatchesrealmkrb5(const dns_name_t *signer, + const dns_name_t *name, + const dns_name_t *realm, bool subdomain) { + UNUSED(signer); + UNUSED(name); + UNUSED(realm); + UNUSED(subdomain); + + return (false); +} + +bool +dst_gssapi_identitymatchesrealmms(const dns_name_t *signer, + const dns_name_t *name, + const dns_name_t *realm, bool subdomain) { + UNUSED(signer); + UNUSED(name); + UNUSED(realm); + UNUSED(subdomain); + + return (false); +} + +isc_result_t +dst_gssapi_releasecred(gss_cred_id_t *cred) { + UNUSED(cred); + + return (ISC_R_NOTIMPLEMENTED); +} + +isc_result_t +dst_gssapi_initctx(const dns_name_t *name, isc_buffer_t *intoken, + isc_buffer_t *outtoken, gss_ctx_id_t *gssctx, + isc_mem_t *mctx, char **err_message) { + UNUSED(name); + UNUSED(intoken); + UNUSED(outtoken); + UNUSED(gssctx); + UNUSED(mctx); + UNUSED(err_message); + + return (ISC_R_NOTIMPLEMENTED); +} + +isc_result_t +dst_gssapi_acceptctx(gss_cred_id_t cred, const char *gssapi_keytab, + isc_region_t *intoken, isc_buffer_t **outtoken, + gss_ctx_id_t *ctxout, dns_name_t *principal, + isc_mem_t *mctx) { + UNUSED(cred); + UNUSED(gssapi_keytab); + UNUSED(intoken); + UNUSED(outtoken); + UNUSED(ctxout); + UNUSED(principal); + UNUSED(mctx); + + return (ISC_R_NOTIMPLEMENTED); +} + +isc_result_t +dst_gssapi_deletectx(isc_mem_t *mctx, gss_ctx_id_t *gssctx) { + UNUSED(mctx); + UNUSED(gssctx); + return (ISC_R_NOTIMPLEMENTED); +} + +/*! \file */ diff --git a/lib/dns/gssapictx.c b/lib/dns/gssapictx.c index 18f1280a28..bf75147ef3 100644 --- a/lib/dns/gssapictx.c +++ b/lib/dns/gssapictx.c @@ -14,6 +14,25 @@ #include #include #include +#include + +#if HAVE_GSSAPI_GSSAPI_H +#include +#elif HAVE_GSSAPI_H +#include +#endif + +#if HAVE_GSSAPI_GSSAPI_KRB5_H +#include +#elif HAVE_GSSAPI_KRB5_H +#include +#endif + +#if HAVE_KRB5_KRB5_H +#include +#elif HAVE_KRB5_H +#include +#endif #include #include @@ -42,50 +61,23 @@ #include "dst_internal.h" -/* - * If we're using our own SPNEGO implementation (see configure.in), - * pull it in now. Otherwise, we just use whatever GSSAPI supplies. - */ -#if defined(GSSAPI) && defined(USE_ISC_SPNEGO) -#include "spnego.h" -#define gss_accept_sec_context gss_accept_sec_context_spnego -#define gss_init_sec_context gss_init_sec_context_spnego -#endif /* if defined(GSSAPI) && defined(USE_ISC_SPNEGO) */ - -/* - * Solaris8 apparently needs an explicit OID set, and Solaris10 needs - * one for anything but Kerberos. Supplying an explicit OID set - * doesn't appear to hurt anything in other implementations, so we - * always use one. If we're not using our own SPNEGO implementation, - * we include SPNEGO's OID. - */ -#ifdef GSSAPI -#ifdef WIN32 -#include -#else /* ifdef WIN32 */ -#include ISC_PLATFORM_KRB5HEADER -#endif /* ifdef WIN32 */ - +#ifndef GSS_KRB5_MECHANISM static unsigned char krb5_mech_oid_bytes[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x01, 0x02, 0x02 }; +static gss_OID_desc __gss_krb5_mechanism_oid_desc = { + sizeof(krb5_mech_oid_bytes), krb5_mech_oid_bytes +}; +#define GSS_KRB5_MECHANISM (&__gss_krb5_mechanism_oid_desc) +#endif /* ifndef GSS_KRB5_MECHANISM */ -#ifndef USE_ISC_SPNEGO +#ifndef GSS_SPNEGO_MECHANISM static unsigned char spnego_mech_oid_bytes[] = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x02 }; -#endif /* ifndef USE_ISC_SPNEGO */ - -static gss_OID_desc mech_oid_set_array[] = { - { sizeof(krb5_mech_oid_bytes), krb5_mech_oid_bytes }, -#ifndef USE_ISC_SPNEGO - { sizeof(spnego_mech_oid_bytes), spnego_mech_oid_bytes }, -#endif /* ifndef USE_ISC_SPNEGO */ +static gss_OID_desc __gss_spnego_mechanism_oid_desc = { + sizeof(spnego_mech_oid_bytes), spnego_mech_oid_bytes }; - -static gss_OID_set_desc mech_oid_set = { sizeof(mech_oid_set_array) / - sizeof(*mech_oid_set_array), - mech_oid_set_array }; - -#endif /* ifdef GSSAPI */ +#define GSS_SPNEGO_MECHANISM (&__gss_spnego_mechanism_oid_desc) +#endif /* ifndef GSS_SPNEGO_MECHANISM */ #define REGION_TO_GBUFFER(r, gb) \ do { \ @@ -106,7 +98,6 @@ static gss_OID_set_desc mech_oid_set = { sizeof(mech_oid_set_array) / goto out; \ } while (0) -#ifdef GSSAPI static inline void name_to_gbuffer(const dns_name_t *name, isc_buffer_t *buffer, gss_buffer_desc *gbuffer) { @@ -187,9 +178,7 @@ log_cred(const gss_cred_id_t cred) { gss_error_tostring(gret, minor, buf, sizeof(buf))); } } -#endif /* ifdef GSSAPI */ -#ifdef GSSAPI /* * check for the most common configuration errors. * @@ -243,12 +232,43 @@ check_config(const char *gss_name) { } krb5_free_context(krb5_ctx); } -#endif /* ifdef GSSAPI */ + +static OM_uint32 +mech_oid_set_create(OM_uint32 *minor, gss_OID_set *mech_oid_set) { + OM_uint32 gret; + + gret = gss_create_empty_oid_set(minor, mech_oid_set); + if (gret != GSS_S_COMPLETE) { + return (gret); + } + + gret = gss_add_oid_set_member(minor, GSS_KRB5_MECHANISM, mech_oid_set); + if (gret != GSS_S_COMPLETE) { + goto release; + } + + gret = gss_add_oid_set_member(minor, GSS_SPNEGO_MECHANISM, + mech_oid_set); + if (gret != GSS_S_COMPLETE) { + goto release; + } + +release: + REQUIRE(gss_release_oid_set(minor, mech_oid_set) == GSS_S_COMPLETE); + + return (gret); +} + +static void +mech_oid_set_release(gss_OID_set *mech_oid_set) { + OM_uint32 minor; + + REQUIRE(gss_release_oid_set(&minor, mech_oid_set) == GSS_S_COMPLETE); +} isc_result_t dst_gssapi_acquirecred(const dns_name_t *name, bool initiate, gss_cred_id_t *cred) { -#ifdef GSSAPI isc_result_t result; isc_buffer_t namebuf; gss_name_t gname; @@ -258,6 +278,7 @@ dst_gssapi_acquirecred(const dns_name_t *name, bool initiate, OM_uint32 lifetime; gss_cred_usage_t usage; char buf[1024]; + gss_OID_set mech_oid_set; REQUIRE(cred != NULL && *cred == NULL); @@ -301,7 +322,14 @@ dst_gssapi_acquirecred(const dns_name_t *name, bool initiate, usage = GSS_C_ACCEPT; } - gret = gss_acquire_cred(&minor, gname, GSS_C_INDEFINITE, &mech_oid_set, + gret = mech_oid_set_create(&minor, &mech_oid_set); + if (gret != GSS_S_COMPLETE) { + gss_log(3, "failed to create OID_set: %s", + gss_error_tostring(gret, minor, buf, sizeof(buf))); + return (ISC_R_FAILURE); + } + + gret = gss_acquire_cred(&minor, gname, GSS_C_INDEFINITE, mech_oid_set, usage, cred, NULL, &lifetime); if (gret != GSS_S_COMPLETE) { @@ -324,6 +352,8 @@ dst_gssapi_acquirecred(const dns_name_t *name, bool initiate, result = ISC_R_SUCCESS; cleanup: + mech_oid_set_release(&mech_oid_set); + if (gname != NULL) { gret = gss_release_name(&minor, &gname); if (gret != GSS_S_COMPLETE) { @@ -334,22 +364,12 @@ cleanup: } return (result); -#else /* ifdef GSSAPI */ - REQUIRE(cred != NULL && *cred == NULL); - - UNUSED(name); - UNUSED(initiate); - UNUSED(cred); - - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef GSSAPI */ } bool dst_gssapi_identitymatchesrealmkrb5(const dns_name_t *signer, const dns_name_t *name, const dns_name_t *realm, bool subdomain) { -#ifdef GSSAPI char sbuf[DNS_NAME_FORMATSIZE]; char rbuf[DNS_NAME_FORMATSIZE]; char *sname; @@ -421,20 +441,12 @@ dst_gssapi_identitymatchesrealmkrb5(const dns_name_t *signer, } return (true); -#else /* ifdef GSSAPI */ - UNUSED(signer); - UNUSED(name); - UNUSED(realm); - UNUSED(subdomain); - return (false); -#endif /* ifdef GSSAPI */ } bool dst_gssapi_identitymatchesrealmms(const dns_name_t *signer, const dns_name_t *name, const dns_name_t *realm, bool subdomain) { -#ifdef GSSAPI char sbuf[DNS_NAME_FORMATSIZE]; char rbuf[DNS_NAME_FORMATSIZE]; char *sname; @@ -509,18 +521,10 @@ dst_gssapi_identitymatchesrealmms(const dns_name_t *signer, } return (true); -#else /* ifdef GSSAPI */ - UNUSED(signer); - UNUSED(name); - UNUSED(realm); - UNUSED(subdomain); - return (false); -#endif /* ifdef GSSAPI */ } isc_result_t dst_gssapi_releasecred(gss_cred_id_t *cred) { -#ifdef GSSAPI OM_uint32 gret, minor; char buf[1024]; @@ -535,14 +539,8 @@ dst_gssapi_releasecred(gss_cred_id_t *cred) { *cred = NULL; return (ISC_R_SUCCESS); -#else /* ifdef GSSAPI */ - UNUSED(cred); - - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef GSSAPI */ } -#ifdef GSSAPI /* * Format a gssapi error message info into a char ** on the given memory * context. This is used to return gssapi error messages back up the @@ -564,13 +562,11 @@ gss_err_message(isc_mem_t *mctx, uint32_t major, uint32_t minor, (*err_message) = isc_mem_strdup(mctx, estr); } } -#endif /* ifdef GSSAPI */ isc_result_t dst_gssapi_initctx(const dns_name_t *name, isc_buffer_t *intoken, isc_buffer_t *outtoken, gss_ctx_id_t *gssctx, isc_mem_t *mctx, char **err_message) { -#ifdef GSSAPI isc_region_t r; isc_buffer_t namebuf; gss_name_t gname; @@ -652,16 +648,6 @@ out: } (void)gss_release_name(&minor, &gname); return (result); -#else /* ifdef GSSAPI */ - UNUSED(name); - UNUSED(intoken); - UNUSED(outtoken); - UNUSED(gssctx); - UNUSED(mctx); - UNUSED(err_message); - - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef GSSAPI */ } isc_result_t @@ -669,7 +655,6 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, const char *gssapi_keytab, isc_region_t *intoken, isc_buffer_t **outtoken, gss_ctx_id_t *ctxout, dns_name_t *principal, isc_mem_t *mctx) { -#ifdef GSSAPI isc_region_t r; isc_buffer_t namebuf; gss_buffer_desc gnamebuf = GSS_C_EMPTY_BUFFER, gintoken, @@ -691,7 +676,6 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, const char *gssapi_keytab, } if (gssapi_keytab != NULL) { -#if defined(ISC_PLATFORM_GSSAPI_KRB5_HEADER) || defined(WIN32) gret = gsskrb5_register_acceptor_identity(gssapi_keytab); if (gret != GSS_S_COMPLETE) { gss_log(3, @@ -701,27 +685,6 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, const char *gssapi_keytab, gss_error_tostring(gret, 0, buf, sizeof(buf))); return (DNS_R_INVALIDTKEY); } -#else /* if defined(ISC_PLATFORM_GSSAPI_KRB5_HEADER) || defined(WIN32) */ - /* - * Minimize memory leakage by only setting KRB5_KTNAME - * if it needs to change. - */ - const char *old = getenv("KRB5_KTNAME"); - if (old == NULL || strcmp(old, gssapi_keytab) != 0) { - size_t size; - char *kt; - - size = strlen(gssapi_keytab) + 13; - kt = malloc(size); - if (kt == NULL) { - return (ISC_R_NOMEMORY); - } - snprintf(kt, size, "KRB5_KTNAME=%s", gssapi_keytab); - if (putenv(kt) != 0) { - return (ISC_R_NOMEMORY); - } - } -#endif /* if defined(ISC_PLATFORM_GSSAPI_KRB5_HEADER) || defined(WIN32) */ } log_cred(cred); @@ -819,22 +782,10 @@ out: } return (result); -#else /* ifdef GSSAPI */ - UNUSED(cred); - UNUSED(gssapi_keytab); - UNUSED(intoken); - UNUSED(outtoken); - UNUSED(ctxout); - UNUSED(principal); - UNUSED(mctx); - - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef GSSAPI */ } isc_result_t dst_gssapi_deletectx(isc_mem_t *mctx, gss_ctx_id_t *gssctx) { -#ifdef GSSAPI OM_uint32 gret, minor; char buf[1024]; @@ -850,16 +801,10 @@ dst_gssapi_deletectx(isc_mem_t *mctx, gss_ctx_id_t *gssctx) { gss_error_tostring(gret, minor, buf, sizeof(buf))); } return (ISC_R_SUCCESS); -#else /* ifdef GSSAPI */ - UNUSED(mctx); - UNUSED(gssctx); - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef GSSAPI */ } char * gss_error_tostring(uint32_t major, uint32_t minor, char *buf, size_t buflen) { -#ifdef GSSAPI gss_buffer_desc msg_minor = GSS_C_EMPTY_BUFFER, msg_major = GSS_C_EMPTY_BUFFER; OM_uint32 msg_ctx, minor_stat; @@ -884,12 +829,6 @@ gss_error_tostring(uint32_t major, uint32_t minor, char *buf, size_t buflen) { (void)gss_release_buffer(&minor_stat, &msg_minor); } return (buf); -#else /* ifdef GSSAPI */ - snprintf(buf, buflen, "GSSAPI error: Major = %u, Minor = %u.", major, - minor); - - return (buf); -#endif /* ifdef GSSAPI */ } void diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h index e20e1e505c..fb90ed610d 100644 --- a/lib/dns/include/dns/types.h +++ b/lib/dns/include/dns/types.h @@ -156,13 +156,6 @@ typedef struct dns_zonemgr dns_zonemgr_t; typedef struct dns_zt dns_zt_t; typedef struct dns_ipkeylist dns_ipkeylist_t; -/* - * If we are not using GSSAPI, define the types we use as opaque types here. - */ -#ifndef GSSAPI -typedef struct not_defined_gss_cred_id *gss_cred_id_t; -typedef struct not_defined_gss_ctx * gss_ctx_id_t; -#endif /* ifndef GSSAPI */ typedef struct dst_gssapi_signverifyctx dst_gssapi_signverifyctx_t; typedef enum { dns_hash_sha1 = 1 } dns_hash_t; diff --git a/lib/dns/include/dns/version.h b/lib/dns/include/dns/version.h deleted file mode 100644 index 0552e81e40..0000000000 --- a/lib/dns/include/dns/version.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file dns/version.h */ - -#ifndef DNS_VERSION_H -#define DNS_VERSION_H 1 - -#include - -LIBDNS_EXTERNAL_DATA extern const char dns_version[]; -LIBDNS_EXTERNAL_DATA extern const char dns_major[]; -LIBDNS_EXTERNAL_DATA extern const char dns_mapapi[]; - -LIBDNS_EXTERNAL_DATA extern const unsigned int dns_libinterface; -LIBDNS_EXTERNAL_DATA extern const unsigned int dns_librevision; -LIBDNS_EXTERNAL_DATA extern const unsigned int dns_libage; - -#endif /* DNS_VERSION_H */ diff --git a/lib/dns/include/dst/gssapi.h b/lib/dns/include/dst/gssapi.h index 4248b39ace..7767577f69 100644 --- a/lib/dns/include/dst/gssapi.h +++ b/lib/dns/include/dst/gssapi.h @@ -17,6 +17,12 @@ #include #include +#if HAVE_GSSAPI_GSSAPI_H +#include +#elif HAVE_GSSAPI_H +#include +#endif + #include #include #include @@ -24,23 +30,16 @@ #include -#ifdef GSSAPI -#ifdef WIN32 /* - * MSVC does not like macros in #include lines. + * Define dummy opaque typedefs if we are not using GSSAPI + * + * FIXME: Make the gssapi types completely opaque and include only + * internally. */ -#include -#include -#else /* ifdef WIN32 */ -#include ISC_PLATFORM_GSSAPIHEADER -#ifdef ISC_PLATFORM_GSSAPI_KRB5_HEADER -#include ISC_PLATFORM_GSSAPI_KRB5_HEADER -#endif /* ifdef ISC_PLATFORM_GSSAPI_KRB5_HEADER */ -#endif /* ifdef WIN32 */ -#ifndef GSS_SPNEGO_MECHANISM -#define GSS_SPNEGO_MECHANISM ((void *)0) -#endif /* ifndef GSS_SPNEGO_MECHANISM */ -#endif /* ifdef GSSAPI */ +#if !HAVE_GSSAPI +typedef void *gss_cred_id_t; +typedef void *gss_ctx_id_t; +#endif ISC_LANG_BEGINDECLS diff --git a/lib/dns/mapapi b/lib/dns/mapapi deleted file mode 100644 index d7a692f964..0000000000 --- a/lib/dns/mapapi +++ /dev/null @@ -1,16 +0,0 @@ -# This value should be increased whenever changing the structure of -# any object that will appear in a type 'map' master file (which -# contains a working memory image of an RBT database), as loading -# an incorrect memory image produces an inconsistent and probably -# nonfunctional database. These structures include but are not -# necessarily limited to dns_masterrawheader, rbtdb_file_header, -# rbt_file_header, dns_rbtdb, dns_rbt, dns_rbtnode, rdatasetheader. -# -# Err on the side of caution: if anything in the RBTDB is changed, -# bump the value. Making map files unreadable protects the system -# from instability; it's a feature not a bug. -# -# Whenever releasing a new major release of BIND9, set this value -# back to 1.0 when releasing the first alpha. Map files are *never* -# compatible across major releases. -MAPAPI=2.0 diff --git a/lib/dns/name.c b/lib/dns/name.c index 831b534fb1..7f581847e4 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -148,7 +148,7 @@ LIBDNS_EXTERNAL_DATA const dns_name_t *dns_wildcardname = &wild; /* * dns_name_t to text post-conversion procedure. */ -ISC_THREAD_LOCAL dns_name_totextfilter_t *totext_filter_proc = NULL; +static thread_local dns_name_totextfilter_t *totext_filter_proc = NULL; static void set_offsets(const dns_name_t *name, unsigned char *offsets, diff --git a/lib/dns/opensslecdsa_link.c b/lib/dns/opensslecdsa_link.c index ba9b4dd1fd..72f4608d99 100644 --- a/lib/dns/opensslecdsa_link.c +++ b/lib/dns/opensslecdsa_link.c @@ -11,8 +11,6 @@ /*! \file */ -#if !USE_PKCS11 - #include #include @@ -684,5 +682,3 @@ dst__opensslecdsa_init(dst_func_t **funcp) { } return (ISC_R_SUCCESS); } - -#endif /* !USE_PKCS11 */ diff --git a/lib/dns/openssleddsa_link.c b/lib/dns/openssleddsa_link.c index 524d6473bf..9ccde3a1e8 100644 --- a/lib/dns/openssleddsa_link.c +++ b/lib/dns/openssleddsa_link.c @@ -9,7 +9,7 @@ * information regarding copyright ownership. */ -#if !USE_PKCS11 +/*! \file */ #if HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448 @@ -33,7 +33,6 @@ #include "dst_internal.h" #include "dst_openssl.h" #include "dst_parse.h" -#include "openssl_shim.h" #define DST_RET(a) \ { \ @@ -777,7 +776,3 @@ dst__openssleddsa_init(dst_func_t **funcp) { } #endif /* HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448 */ - -#endif /* !USE_PKCS11 */ - -/*! \file */ diff --git a/lib/dns/opensslrsa_link.c b/lib/dns/opensslrsa_link.c index bc975be91a..54542f8721 100644 --- a/lib/dns/opensslrsa_link.c +++ b/lib/dns/opensslrsa_link.c @@ -9,7 +9,7 @@ * information regarding copyright ownership. */ -#if !USE_PKCS11 +/*! \file */ #include #include @@ -1193,7 +1193,3 @@ dst__opensslrsa_init(dst_func_t **funcp, unsigned char algorithm) { } return (ISC_R_SUCCESS); } - -#endif /* !USE_PKCS11 */ - -/*! \file */ diff --git a/lib/dns/pkcs11.c b/lib/dns/pkcs11.c index bbe847d377..285b7de049 100644 --- a/lib/dns/pkcs11.c +++ b/lib/dns/pkcs11.c @@ -9,8 +9,6 @@ * information regarding copyright ownership. */ -#if USE_PKCS11 - #include #include @@ -33,6 +31,3 @@ dst__pkcs11_toresult(const char *funcname, const char *file, int line, } return (fallback); } - -#endif /* USE_PKCS11 */ -/*! \file */ diff --git a/lib/dns/pkcs11ecdsa_link.c b/lib/dns/pkcs11ecdsa_link.c index dbbdc48b65..7ad46db951 100644 --- a/lib/dns/pkcs11ecdsa_link.c +++ b/lib/dns/pkcs11ecdsa_link.c @@ -11,8 +11,6 @@ /*! \file */ -#if USE_PKCS11 - #include #include @@ -1149,5 +1147,3 @@ dst__pkcs11ecdsa_init(dst_func_t **funcp) { } return (ISC_R_SUCCESS); } - -#endif /* USE_PKCS11 */ diff --git a/lib/dns/pkcs11eddsa_link.c b/lib/dns/pkcs11eddsa_link.c index 1794128732..9b1061b491 100644 --- a/lib/dns/pkcs11eddsa_link.c +++ b/lib/dns/pkcs11eddsa_link.c @@ -11,8 +11,6 @@ /*! \file */ -#if USE_PKCS11 - #include #include @@ -1111,5 +1109,3 @@ dst__pkcs11eddsa_init(dst_func_t **funcp) { } return (ISC_R_SUCCESS); } - -#endif /* USE_PKCS11 */ diff --git a/lib/dns/pkcs11rsa_link.c b/lib/dns/pkcs11rsa_link.c index 5487f29869..fc5efe3bb8 100644 --- a/lib/dns/pkcs11rsa_link.c +++ b/lib/dns/pkcs11rsa_link.c @@ -11,8 +11,6 @@ /*! \file */ -#if USE_PKCS11 - #include #include @@ -2061,5 +2059,3 @@ dst__pkcs11rsa_init(dst_func_t **funcp) { } return (ISC_R_SUCCESS); } - -#endif /* USE_PKCS11 */ diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index da38f76155..7ac9b0c15c 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -40,7 +40,6 @@ #include #include #include -#include #define CHECK(x) \ do { \ @@ -447,7 +446,7 @@ init_file_version(void) { memset(FILE_VERSION, 0, sizeof(FILE_VERSION)); n = snprintf(FILE_VERSION, sizeof(FILE_VERSION), "RBT Image %s %s", - dns_major, dns_mapapi); + PACKAGE_VERSION_MAJOR, MAPAPI); INSIST(n > 0 && (unsigned int)n < sizeof(FILE_VERSION)); } diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index a4522c1dd8..2e268c7f76 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -7711,7 +7710,7 @@ init_file_version(void) { memset(FILE_VERSION, 0, sizeof(FILE_VERSION)); n = snprintf(FILE_VERSION, sizeof(FILE_VERSION), "RBTDB Image %s %s", - dns_major, dns_mapapi); + PACKAGE_VERSION_MAJOR, MAPAPI); INSIST(n > 0 && (unsigned int)n < sizeof(FILE_VERSION)); } diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 645a3e12cb..80203d95e1 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -583,7 +583,7 @@ struct dns_resolver { #ifdef ENABLE_AFL bool dns_fuzzing_resolver = false; void -dns_resolver_setfuzzing() { +dns_resolver_setfuzzing(void) { dns_fuzzing_resolver = true; } #endif /* ifdef ENABLE_AFL */ diff --git a/lib/dns/spnego.asn1 b/lib/dns/spnego.asn1 deleted file mode 100644 index abf9b76bba..0000000000 --- a/lib/dns/spnego.asn1 +++ /dev/null @@ -1,50 +0,0 @@ --- Copyright (C) The Internet Society 2005. This version of --- this module is part of RFC 4178; see the RFC itself for --- full legal notices. - --- (The above copyright notice is per RFC 3978 5.6 (a), q.v.) - --- This is the SPNEGO ASN.1 module from RFC 4178, tweaked --- to get the Heimdal ASN.1 compiler to accept it. - -SPNEGOASNOneSpec DEFINITIONS ::= BEGIN - -MechType ::= OBJECT IDENTIFIER - -MechTypeList ::= SEQUENCE OF MechType - -ContextFlags ::= BIT STRING { - delegFlag (0), - mutualFlag (1), - replayFlag (2), - sequenceFlag (3), - anonFlag (4), - confFlag (5), - integFlag (6) -} - -NegTokenInit ::= SEQUENCE { - mechTypes [0] MechTypeList, - reqFlags [1] ContextFlags OPTIONAL, - mechToken [2] OCTET STRING OPTIONAL, - mechListMIC [3] OCTET STRING OPTIONAL -} - -NegTokenResp ::= SEQUENCE { - negState [0] ENUMERATED { - accept-completed (0), - accept-incomplete (1), - reject (2), - request-mic (3) - } OPTIONAL, - supportedMech [1] MechType OPTIONAL, - responseToken [2] OCTET STRING OPTIONAL, - mechListMIC [3] OCTET STRING OPTIONAL -} - -NegotiationToken ::= CHOICE { - negTokenInit [0] NegTokenInit, - negTokenResp [1] NegTokenResp -} - -END diff --git a/lib/dns/spnego.c b/lib/dns/spnego.c deleted file mode 100644 index c8efafe474..0000000000 --- a/lib/dns/spnego.c +++ /dev/null @@ -1,1753 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file - * \brief - * Portable SPNEGO implementation. - * - * This is part of a portable implementation of the SPNEGO protocol - * (RFCs 2478 and 4178). This implementation uses the RFC 4178 ASN.1 - * module but is not a full implementation of the RFC 4178 protocol; - * at the moment, we only support GSS-TSIG with Kerberos - * authentication, so we only need enough of the SPNEGO protocol to - * support that. - * - * The files that make up this portable SPNEGO implementation are: - * \li spnego.c (this file) - * \li spnego.h (API SPNEGO exports to the rest of lib/dns) - * \li spnego.asn1 (SPNEGO ASN.1 module) - * \li spnego_asn1.c (routines generated from spngo.asn1) - * \li spnego_asn1.pl (perl script to generate spnego_asn1.c) - * - * Everything but the functions exported in spnego.h is static, to - * avoid possible conflicts with other libraries (particularly Heimdal, - * since much of this code comes from Heimdal by way of mod_auth_kerb). - * - * spnego_asn1.c is shipped as part of lib/dns because generating it - * requires both Perl and the Heimdal ASN.1 compiler. See - * spnego_asn1.pl for further details. We've tried to eliminate all - * compiler warnings from the generated code, but you may see a few - * when using a compiler version we haven't tested yet. - */ - -/* - * Portions of this code were derived from mod_auth_kerb and Heimdal. - * These packages are available from: - * - * http://modauthkerb.sourceforge.net/ - * http://www.pdc.kth.se/heimdal/ - * - * and were released under the following licenses: - * - * ---------------------------------------------------------------- - * - * Copyright (c) 2004 Masarykova universita - * (Masaryk University, Brno, Czech Republic) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. 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. - * - * 3. Neither the name of the University 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 THE COPYRIGHT OWNER OR CONTRIBUTORS 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. - * - * ---------------------------------------------------------------- - * - * Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. 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. - * - * 3. Neither the name of the Institute 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 INSTITUTE 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 THE INSTITUTE OR CONTRIBUTORS 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. - */ - -/* - * XXXSRA We should omit this file entirely in Makefile.in via autoconf, - * but this will keep it from generating errors until that's written. - */ - -#ifdef GSSAPI - -/* - * XXXSRA Some of the following files are almost certainly unnecessary, - * but using this list (borrowed from gssapictx.c) gets rid of some - * whacky compilation errors when building with MSVC and should be - * harmless in any case. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "dst_internal.h" - -/* - * The API we export - */ -#include "spnego.h" - -/* asn1_err.h */ -/* Generated from ../../../lib/asn1/asn1_err.et */ - -#ifndef ERROR_TABLE_BASE_asn1 -/* these may be brought in already via gssapi_krb5.h */ -typedef enum asn1_error_number { - ASN1_BAD_TIMEFORMAT = 1859794432, - ASN1_MISSING_FIELD = 1859794433, - ASN1_MISPLACED_FIELD = 1859794434, - ASN1_TYPE_MISMATCH = 1859794435, - ASN1_OVERFLOW = 1859794436, - ASN1_OVERRUN = 1859794437, - ASN1_BAD_ID = 1859794438, - ASN1_BAD_LENGTH = 1859794439, - ASN1_BAD_FORMAT = 1859794440, - ASN1_PARSE_ERROR = 1859794441 -} asn1_error_number; - -#define ERROR_TABLE_BASE_asn1 1859794432 -#endif /* ifndef ERROR_TABLE_BASE_asn1 */ - -#define __asn1_common_definitions__ - -typedef struct octet_string { - size_t length; - void *data; -} octet_string; - -typedef char *general_string; - -typedef char *utf8_string; - -typedef struct oid { - size_t length; - unsigned *components; -} oid; - -/* der.h */ - -typedef enum { - ASN1_C_UNIV = 0, - ASN1_C_APPL = 1, - ASN1_C_CONTEXT = 2, - ASN1_C_PRIVATE = 3 -} Der_class; - -typedef enum { PRIM = 0, CONS = 1 } Der_type; - -/* Universal tags */ - -enum { UT_Boolean = 1, - UT_Integer = 2, - UT_BitString = 3, - UT_OctetString = 4, - UT_Null = 5, - UT_OID = 6, - UT_Enumerated = 10, - UT_Sequence = 16, - UT_Set = 17, - UT_PrintableString = 19, - UT_IA5String = 22, - UT_UTCTime = 23, - UT_GeneralizedTime = 24, - UT_VisibleString = 26, - UT_GeneralString = 27 }; - -#define ASN1_INDEFINITE 0xdce0deed - -static int -der_get_length(const unsigned char *p, size_t len, size_t *val, size_t *size); - -static int -der_get_octet_string(const unsigned char *p, size_t len, octet_string *data, - size_t *size); -static int -der_get_oid(const unsigned char *p, size_t len, oid *data, size_t *size); -static int -der_get_tag(const unsigned char *p, size_t len, Der_class *xclass, - Der_type *type, int *tag, size_t *size); - -static int -der_match_tag(const unsigned char *p, size_t len, Der_class xclass, - Der_type type, int tag, size_t *size); -static int -der_match_tag_and_length(const unsigned char *p, size_t len, Der_class xclass, - Der_type type, int tag, size_t *length_ret, - size_t *size); - -static int -decode_oid(const unsigned char *p, size_t len, oid *k, size_t *size); - -static int -decode_enumerated(const unsigned char *p, size_t len, void *num, size_t *size); - -static int -decode_octet_string(const unsigned char *, size_t, octet_string *, size_t *); - -static int -der_put_int(unsigned char *p, size_t len, int val, size_t *); - -static int -der_put_length(unsigned char *p, size_t len, size_t val, size_t *); - -static int -der_put_octet_string(unsigned char *p, size_t len, const octet_string *data, - size_t *); -static int -der_put_oid(unsigned char *p, size_t len, const oid *data, size_t *size); -static int -der_put_tag(unsigned char *p, size_t len, Der_class xclass, Der_type type, - int tag, size_t *); -static int -der_put_length_and_tag(unsigned char *, size_t, size_t, Der_class, Der_type, - int, size_t *); - -static int -encode_enumerated(unsigned char *p, size_t len, const void *data, size_t *); - -static int -encode_octet_string(unsigned char *p, size_t len, const octet_string *k, - size_t *); -static int -encode_oid(unsigned char *p, size_t len, const oid *k, size_t *); - -static void -free_octet_string(octet_string *k); - -static void -free_oid(oid *k); - -static size_t -length_len(size_t len); - -static int -fix_dce(size_t reallen, size_t *len); - -/* - * Include stuff generated by the ASN.1 compiler. - */ - -#include "spnego_asn1.c" - -/* - * Force the oid arrays to be uint64_t aligned to silence warnings - * about the arrays not being properly aligned for (void *). - */ -typedef union { - unsigned char b[8]; - uint64_t _align; -} aligned8; -typedef union { - unsigned char b[16]; - uint64_t _align[2]; -} aligned16; - -static aligned16 gss_krb5_mech_oid_bytes = { { 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x12, 0x01, 0x02, 0x02 } }; - -static gss_OID_desc gss_krb5_mech_oid_desc = { 9, gss_krb5_mech_oid_bytes.b }; - -static gss_OID GSS_KRB5_MECH = &gss_krb5_mech_oid_desc; - -static aligned16 gss_mskrb5_mech_oid_bytes = { { 0x2a, 0x86, 0x48, 0x82, 0xf7, - 0x12, 0x01, 0x02, 0x02 } }; - -static gss_OID_desc gss_mskrb5_mech_oid_desc = { 9, - gss_mskrb5_mech_oid_bytes.b }; - -static gss_OID GSS_MSKRB5_MECH = &gss_mskrb5_mech_oid_desc; - -static aligned8 gss_spnego_mech_oid_bytes = { { 0x2b, 0x06, 0x01, 0x05, 0x05, - 0x02 } }; - -static gss_OID_desc gss_spnego_mech_oid_desc = { 6, - gss_spnego_mech_oid_bytes.b }; - -static gss_OID GSS_SPNEGO_MECH = &gss_spnego_mech_oid_desc; - -/* spnegokrb5_locl.h */ - -static OM_uint32 -gssapi_spnego_encapsulate(OM_uint32 *, unsigned char *, size_t, gss_buffer_t, - const gss_OID); - -static OM_uint32 -gssapi_spnego_decapsulate(OM_uint32 *, gss_buffer_t, unsigned char **, size_t *, - const gss_OID); - -/* mod_auth_kerb.c */ - -static bool -cmp_gss_type(gss_buffer_t token, gss_OID gssoid) { - unsigned char *p; - size_t len; - - if (token->length == 0U) { - return (GSS_S_DEFECTIVE_TOKEN); - } - - p = token->value; - if (*p++ != 0x60) { - return (GSS_S_DEFECTIVE_TOKEN); - } - len = *p++; - if (len & 0x80) { - if ((len & 0x7f) > 4U) { - return (GSS_S_DEFECTIVE_TOKEN); - } - p += len & 0x7f; - } - if (*p++ != 0x06) { - return (GSS_S_DEFECTIVE_TOKEN); - } - - if (((OM_uint32)*p++) != gssoid->length) { - return (GSS_S_DEFECTIVE_TOKEN); - } - - return (!isc_safe_memequal(p, gssoid->elements, gssoid->length)); -} - -/* accept_sec_context.c */ -/* - * SPNEGO wrapper for Kerberos5 GSS-API kouril@ics.muni.cz, 2003 (mostly - * based on Heimdal code) - */ - -static OM_uint32 -code_NegTokenArg(OM_uint32 *minor_status, const NegTokenResp *resp, - unsigned char **outbuf, size_t *outbuf_size) { - OM_uint32 ret; - u_char *buf; - size_t buf_size, buf_len = 0; - - buf_size = 1024; - buf = malloc(buf_size); - if (buf == NULL) { - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - do { - ret = encode_NegTokenResp(buf + buf_size - 1, buf_size, resp, - &buf_len); - if (ret == 0) { - size_t tmp; - - ret = der_put_length_and_tag( - buf + buf_size - buf_len - 1, - buf_size - buf_len, buf_len, ASN1_C_CONTEXT, - CONS, 1, &tmp); - if (ret == 0) { - buf_len += tmp; - } - } - if (ret) { - if (ret == ASN1_OVERFLOW) { - u_char *tmp; - - buf_size *= 2; - tmp = realloc(buf, buf_size); - if (tmp == NULL) { - *minor_status = ENOMEM; - free(buf); - return (GSS_S_FAILURE); - } - buf = tmp; - } else { - *minor_status = ret; - free(buf); - return (GSS_S_FAILURE); - } - } - } while (ret == ASN1_OVERFLOW); - - *outbuf = malloc(buf_len); - if (*outbuf == NULL) { - *minor_status = ENOMEM; - free(buf); - return (GSS_S_FAILURE); - } - memmove(*outbuf, buf + buf_size - buf_len, buf_len); - *outbuf_size = buf_len; - - free(buf); - - return (GSS_S_COMPLETE); -} - -static OM_uint32 -send_reject(OM_uint32 *minor_status, gss_buffer_t output_token) { - NegTokenResp resp; - OM_uint32 ret; - - resp.negState = malloc(sizeof(*resp.negState)); - if (resp.negState == NULL) { - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - *(resp.negState) = reject; - - resp.supportedMech = NULL; - resp.responseToken = NULL; - resp.mechListMIC = NULL; - - ret = code_NegTokenArg(minor_status, &resp, - (unsigned char **)&output_token->value, - &output_token->length); - free_NegTokenResp(&resp); - if (ret) { - return (ret); - } - - return (GSS_S_BAD_MECH); -} - -static OM_uint32 -send_accept(OM_uint32 *minor_status, gss_buffer_t output_token, - gss_buffer_t mech_token, const gss_OID pref) { - NegTokenResp resp; - OM_uint32 ret; - - memset(&resp, 0, sizeof(resp)); - resp.negState = malloc(sizeof(*resp.negState)); - if (resp.negState == NULL) { - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - *(resp.negState) = accept_completed; - - resp.supportedMech = malloc(sizeof(*resp.supportedMech)); - if (resp.supportedMech == NULL) { - free_NegTokenResp(&resp); - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - ret = der_get_oid(pref->elements, pref->length, resp.supportedMech, - NULL); - if (ret) { - free_NegTokenResp(&resp); - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - if (mech_token != NULL && mech_token->length != 0U) { - resp.responseToken = malloc(sizeof(*resp.responseToken)); - if (resp.responseToken == NULL) { - free_NegTokenResp(&resp); - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - resp.responseToken->length = mech_token->length; - resp.responseToken->data = mech_token->value; - } - - ret = code_NegTokenArg(minor_status, &resp, - (unsigned char **)&output_token->value, - &output_token->length); - if (resp.responseToken != NULL) { - free(resp.responseToken); - resp.responseToken = NULL; - } - free_NegTokenResp(&resp); - if (ret) { - return (ret); - } - - return (GSS_S_COMPLETE); -} - -OM_uint32 -gss_accept_sec_context_spnego(OM_uint32 *minor_status, - gss_ctx_id_t *context_handle, - const gss_cred_id_t acceptor_cred_handle, - const gss_buffer_t input_token_buffer, - const gss_channel_bindings_t input_chan_bindings, - gss_name_t *src_name, gss_OID *mech_type, - gss_buffer_t output_token, OM_uint32 *ret_flags, - OM_uint32 *time_rec, - gss_cred_id_t *delegated_cred_handle) { - NegTokenInit init_token; - OM_uint32 major_status = GSS_S_COMPLETE; - OM_uint32 minor_status2; - gss_buffer_desc ibuf, obuf; - gss_buffer_t ot = NULL; - gss_OID pref = GSS_KRB5_MECH; - unsigned char *buf; - size_t buf_size; - size_t len, taglen, ni_len; - int found = 0; - int ret; - unsigned i; - - /* - * Before doing anything else, see whether this is a SPNEGO - * PDU. If not, dispatch to the GSSAPI library and get out. - */ - - if (cmp_gss_type(input_token_buffer, GSS_SPNEGO_MECH)) { - return (gss_accept_sec_context( - minor_status, context_handle, acceptor_cred_handle, - input_token_buffer, input_chan_bindings, src_name, - mech_type, output_token, ret_flags, time_rec, - delegated_cred_handle)); - } - - /* - * If we get here, it's SPNEGO. - */ - - memset(&init_token, 0, sizeof(init_token)); - - ret = gssapi_spnego_decapsulate(minor_status, input_token_buffer, &buf, - &buf_size, GSS_SPNEGO_MECH); - if (ret) { - return (ret); - } - - ret = der_match_tag_and_length(buf, buf_size, ASN1_C_CONTEXT, CONS, 0, - &len, &taglen); - if (ret) { - return (ret); - } - - ret = decode_NegTokenInit(buf + taglen, len, &init_token, &ni_len); - if (ret) { - *minor_status = EINVAL; /* XXX */ - return (GSS_S_DEFECTIVE_TOKEN); - } - - for (i = 0; !found && i < init_token.mechTypes.len; ++i) { - unsigned char mechbuf[17]; - size_t mech_len; - - ret = der_put_oid(mechbuf + sizeof(mechbuf) - 1, - sizeof(mechbuf), &init_token.mechTypes.val[i], - &mech_len); - if (ret) { - free_NegTokenInit(&init_token); - return (GSS_S_DEFECTIVE_TOKEN); - } - if (mech_len == GSS_KRB5_MECH->length && - isc_safe_memequal(GSS_KRB5_MECH->elements, - mechbuf + sizeof(mechbuf) - mech_len, - mech_len)) - { - found = 1; - break; - } - if (mech_len == GSS_MSKRB5_MECH->length && - isc_safe_memequal(GSS_MSKRB5_MECH->elements, - mechbuf + sizeof(mechbuf) - mech_len, - mech_len)) - { - found = 1; - if (i == 0) { - pref = GSS_MSKRB5_MECH; - } - break; - } - } - - if (!found) { - free_NegTokenInit(&init_token); - return (send_reject(minor_status, output_token)); - } - - if (i == 0 && init_token.mechToken != NULL) { - ibuf.length = init_token.mechToken->length; - ibuf.value = init_token.mechToken->data; - - major_status = gss_accept_sec_context( - minor_status, context_handle, acceptor_cred_handle, - &ibuf, input_chan_bindings, src_name, mech_type, &obuf, - ret_flags, time_rec, delegated_cred_handle); - if (GSS_ERROR(major_status)) { - free_NegTokenInit(&init_token); - send_reject(&minor_status2, output_token); - return (major_status); - } - ot = &obuf; - } - ret = send_accept(&minor_status2, output_token, ot, pref); - free_NegTokenInit(&init_token); - if (ot != NULL && ot->length != 0U) { - gss_release_buffer(&minor_status2, ot); - } - - return (ret != GSS_S_COMPLETE ? (OM_uint32)ret : major_status); -} - -/* decapsulate.c */ - -static OM_uint32 -gssapi_verify_mech_header(u_char **str, size_t total_len, const gss_OID mech) { - size_t len, len_len, mech_len, foo; - int e; - u_char *p = *str; - - if (total_len < 1U) { - return (GSS_S_DEFECTIVE_TOKEN); - } - if (*p++ != 0x60) { - return (GSS_S_DEFECTIVE_TOKEN); - } - e = der_get_length(p, total_len - 1, &len, &len_len); - if (e || 1 + len_len + len != total_len) { - return (GSS_S_DEFECTIVE_TOKEN); - } - p += len_len; - if (*p++ != 0x06) { - return (GSS_S_DEFECTIVE_TOKEN); - } - e = der_get_length(p, total_len - 1 - len_len - 1, &mech_len, &foo); - if (e) { - return (GSS_S_DEFECTIVE_TOKEN); - } - p += foo; - if (mech_len != mech->length) { - return (GSS_S_BAD_MECH); - } - if (!isc_safe_memequal(p, mech->elements, mech->length)) { - return (GSS_S_BAD_MECH); - } - p += mech_len; - *str = p; - return (GSS_S_COMPLETE); -} - -/* - * Remove the GSS-API wrapping from `in_token' giving `buf and buf_size' Does - * not copy data, so just free `in_token'. - */ - -static OM_uint32 -gssapi_spnego_decapsulate(OM_uint32 *minor_status, - gss_buffer_t input_token_buffer, unsigned char **buf, - size_t *buf_len, const gss_OID mech) { - u_char *p; - OM_uint32 ret; - - p = input_token_buffer->value; - ret = gssapi_verify_mech_header(&p, input_token_buffer->length, mech); - if (ret) { - *minor_status = ret; - return (GSS_S_FAILURE); - } - *buf_len = input_token_buffer->length - - (p - (u_char *)input_token_buffer->value); - *buf = p; - return (GSS_S_COMPLETE); -} - -/* der_free.c */ - -static void -free_octet_string(octet_string *k) { - free(k->data); - k->data = NULL; -} - -static void -free_oid(oid *k) { - free(k->components); - k->components = NULL; -} - -/* der_get.c */ - -/* - * All decoding functions take a pointer `p' to first position in which to - * read, from the left, `len' which means the maximum number of characters we - * are able to read, `ret' were the value will be returned and `size' where - * the number of used bytes is stored. Either 0 or an error code is returned. - */ - -static int -der_get_unsigned(const unsigned char *p, size_t len, unsigned *ret, - size_t *size) { - unsigned val = 0; - size_t oldlen = len; - - while (len--) { - val = val * 256 + *p++; - } - *ret = val; - if (size) { - *size = oldlen; - } - return (0); -} - -static int -der_get_int(const unsigned char *p, size_t len, int *ret, size_t *size) { - int val = 0; - size_t oldlen = len; - - if (len > 0U) { - val = (signed char)*p++; - while (--len) { - val = val * 256 + *p++; - } - } - *ret = val; - if (size) { - *size = oldlen; - } - return (0); -} - -static int -der_get_length(const unsigned char *p, size_t len, size_t *val, size_t *size) { - size_t v; - - if (len <= 0U) { - return (ASN1_OVERRUN); - } - --len; - v = *p++; - if (v < 128U) { - *val = v; - if (size) { - *size = 1; - } - } else { - int e; - size_t l; - unsigned tmp; - - if (v == 0x80U) { - *val = ASN1_INDEFINITE; - if (size) { - *size = 1; - } - return (0); - } - v &= 0x7F; - if (len < v) { - return (ASN1_OVERRUN); - } - e = der_get_unsigned(p, v, &tmp, &l); - if (e) { - return (e); - } - *val = tmp; - if (size) { - *size = l + 1; - } - } - return (0); -} - -static int -der_get_octet_string(const unsigned char *p, size_t len, octet_string *data, - size_t *size) { - data->length = len; - if (len != 0U) { - data->data = malloc(len); - if (data->data == NULL) { - return (ENOMEM); - } - memmove(data->data, p, len); - } else { - data->data = NULL; - } - if (size) { - *size = len; - } - return (0); -} - -static int -der_get_oid(const unsigned char *p, size_t len, oid *data, size_t *size) { - int n; - size_t oldlen = len; - - data->components = NULL; - data->length = 0; - if (len < 1U) { - return (ASN1_OVERRUN); - } - - data->components = malloc(len * sizeof(*data->components)); - if (data->components == NULL) { - return (ENOMEM); - } - data->components[0] = (*p) / 40; - data->components[1] = (*p) % 40; - --len; - ++p; - for (n = 2; len > 0U; ++n) { - unsigned u = 0; - - do { - --len; - u = u * 128 + (*p++ % 128); - } while (len > 0U && p[-1] & 0x80); - data->components[n] = u; - } - if (p[-1] & 0x80) { - free_oid(data); - return (ASN1_OVERRUN); - } - data->length = n; - if (size) { - *size = oldlen; - } - return (0); -} - -static int -der_get_tag(const unsigned char *p, size_t len, Der_class *xclass, - Der_type *type, int *tag, size_t *size) { - if (len < 1U) { - return (ASN1_OVERRUN); - } - *xclass = (Der_class)(((*p) >> 6) & 0x03); - *type = (Der_type)(((*p) >> 5) & 0x01); - *tag = (*p) & 0x1F; - if (size) { - *size = 1; - } - return (0); -} - -static int -der_match_tag(const unsigned char *p, size_t len, Der_class xclass, - Der_type type, int tag, size_t *size) { - size_t l; - Der_class thisclass; - Der_type thistype; - int thistag; - int e; - - e = der_get_tag(p, len, &thisclass, &thistype, &thistag, &l); - if (e) { - return (e); - } - if (xclass != thisclass || type != thistype) { - return (ASN1_BAD_ID); - } - if (tag > thistag) { - return (ASN1_MISPLACED_FIELD); - } - if (tag < thistag) { - return (ASN1_MISSING_FIELD); - } - if (size) { - *size = l; - } - return (0); -} - -static int -der_match_tag_and_length(const unsigned char *p, size_t len, Der_class xclass, - Der_type type, int tag, size_t *length_ret, - size_t *size) { - size_t l, ret = 0; - int e; - - e = der_match_tag(p, len, xclass, type, tag, &l); - if (e) { - return (e); - } - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, length_ret, &l); - if (e) { - return (e); - } - /* p += l; */ - len -= l; - POST(len); - ret += l; - if (size) { - *size = ret; - } - return (0); -} - -static int -decode_enumerated(const unsigned char *p, size_t len, void *num, size_t *size) { - size_t ret = 0; - size_t l, reallen; - int e; - - e = der_match_tag(p, len, ASN1_C_UNIV, PRIM, UT_Enumerated, &l); - if (e) { - return (e); - } - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &reallen, &l); - if (e) { - return (e); - } - p += l; - len -= l; - ret += l; - e = der_get_int(p, reallen, num, &l); - if (e) { - return (e); - } - p += l; - len -= l; - POST(p); - POST(len); - ret += l; - if (size) { - *size = ret; - } - return (0); -} - -static int -decode_octet_string(const unsigned char *p, size_t len, octet_string *k, - size_t *size) { - size_t ret = 0; - size_t l; - int e; - size_t slen; - - k->data = NULL; - k->length = 0; - - e = der_match_tag(p, len, ASN1_C_UNIV, PRIM, UT_OctetString, &l); - if (e) { - return (e); - } - p += l; - len -= l; - ret += l; - - e = der_get_length(p, len, &slen, &l); - if (e) { - return (e); - } - p += l; - len -= l; - ret += l; - if (len < slen) { - return (ASN1_OVERRUN); - } - - e = der_get_octet_string(p, slen, k, &l); - if (e) { - return (e); - } - p += l; - len -= l; - POST(p); - POST(len); - ret += l; - if (size) { - *size = ret; - } - return (0); -} - -static int -decode_oid(const unsigned char *p, size_t len, oid *k, size_t *size) { - size_t ret = 0; - size_t l; - int e; - size_t slen; - - e = der_match_tag(p, len, ASN1_C_UNIV, PRIM, UT_OID, &l); - if (e) { - return (e); - } - p += l; - len -= l; - ret += l; - - e = der_get_length(p, len, &slen, &l); - if (e) { - return (e); - } - p += l; - len -= l; - ret += l; - if (len < slen) { - return (ASN1_OVERRUN); - } - - e = der_get_oid(p, slen, k, &l); - if (e) { - return (e); - } - p += l; - len -= l; - POST(p); - POST(len); - ret += l; - if (size) { - *size = ret; - } - return (0); -} - -static int -fix_dce(size_t reallen, size_t *len) { - if (reallen == ASN1_INDEFINITE) { - return (1); - } - if (*len < reallen) { - return (-1); - } - *len = reallen; - return (0); -} - -/* der_length.c */ - -static size_t -len_unsigned(unsigned val) { - size_t ret = 0; - - do { - ++ret; - val /= 256; - } while (val); - return (ret); -} - -static size_t -length_len(size_t len) { - if (len < 128U) { - return (1); - } else { - return (len_unsigned((unsigned int)len) + 1); - } -} - -/* der_put.c */ - -/* - * All encoding functions take a pointer `p' to first position in which to - * write, from the right, `len' which means the maximum number of characters - * we are able to write. The function returns the number of characters - * written in `size' (if non-NULL). The return value is 0 or an error. - */ - -static int -der_put_unsigned(unsigned char *p, size_t len, unsigned val, size_t *size) { - unsigned char *base = p; - - if (val) { - while (len > 0U && val) { - *p-- = val % 256; - val /= 256; - --len; - } - if (val != 0) { - return (ASN1_OVERFLOW); - } else { - *size = base - p; - return (0); - } - } else if (len < 1U) { - return (ASN1_OVERFLOW); - } else { - *p = 0; - *size = 1; - return (0); - } -} - -static int -der_put_int(unsigned char *p, size_t len, int val, size_t *size) { - unsigned char *base = p; - - if (val >= 0) { - do { - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p-- = val % 256; - len--; - val /= 256; - } while (val); - if (p[1] >= 128) { - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p-- = 0; - len--; - POST(len); - } - } else { - val = ~val; - do { - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p-- = ~(val % 256); - len--; - val /= 256; - } while (val); - if (p[1] < 128) { - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p-- = 0xff; - len--; - POST(len); - } - } - *size = base - p; - return (0); -} - -static int -der_put_length(unsigned char *p, size_t len, size_t val, size_t *size) { - if (len < 1U) { - return (ASN1_OVERFLOW); - } - if (val < 128U) { - *p = (unsigned char)val; - *size = 1; - return (0); - } else { - size_t l; - int e; - - e = der_put_unsigned(p, len - 1, (unsigned int)val, &l); - if (e) { - return (e); - } - p -= l; - *p = 0x80 | (unsigned char)l; - *size = l + 1; - return (0); - } -} - -static int -der_put_octet_string(unsigned char *p, size_t len, const octet_string *data, - size_t *size) { - if (len < data->length) { - return (ASN1_OVERFLOW); - } - p -= data->length; - len -= data->length; - POST(len); - memmove(p + 1, data->data, data->length); - *size = data->length; - return (0); -} - -static int -der_put_oid(unsigned char *p, size_t len, const oid *data, size_t *size) { - unsigned char *base = p; - size_t n; - - for (n = data->length; n >= 3u; --n) { - unsigned u = data->components[n - 1]; - - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p-- = u % 128; - u /= 128; - --len; - while (u > 0) { - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p-- = 128 + u % 128; - u /= 128; - --len; - } - } - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p-- = 40 * data->components[0] + data->components[1]; - *size = base - p; - return (0); -} - -static int -der_put_tag(unsigned char *p, size_t len, Der_class xclass, Der_type type, - int tag, size_t *size) { - if (len < 1U) { - return (ASN1_OVERFLOW); - } - *p = (xclass << 6) | (type << 5) | tag; /* XXX */ - *size = 1; - return (0); -} - -static int -der_put_length_and_tag(unsigned char *p, size_t len, size_t len_val, - Der_class xclass, Der_type type, int tag, size_t *size) { - size_t ret = 0; - size_t l; - int e; - - e = der_put_length(p, len, len_val, &l); - if (e) { - return (e); - } - p -= l; - len -= l; - ret += l; - e = der_put_tag(p, len, xclass, type, tag, &l); - if (e) { - return (e); - } - p -= l; - len -= l; - POST(p); - POST(len); - ret += l; - *size = ret; - return (0); -} - -static int -encode_enumerated(unsigned char *p, size_t len, const void *data, - size_t *size) { - unsigned num = *(const unsigned *)data; - size_t ret = 0; - size_t l; - int e; - - e = der_put_int(p, len, num, &l); - if (e) { - return (e); - } - p -= l; - len -= l; - ret += l; - e = der_put_length_and_tag(p, len, l, ASN1_C_UNIV, PRIM, UT_Enumerated, - &l); - if (e) { - return (e); - } - p -= l; - len -= l; - POST(p); - POST(len); - ret += l; - *size = ret; - return (0); -} - -static int -encode_octet_string(unsigned char *p, size_t len, const octet_string *k, - size_t *size) { - size_t ret = 0; - size_t l; - int e; - - e = der_put_octet_string(p, len, k, &l); - if (e) { - return (e); - } - p -= l; - len -= l; - ret += l; - e = der_put_length_and_tag(p, len, l, ASN1_C_UNIV, PRIM, UT_OctetString, - &l); - if (e) { - return (e); - } - p -= l; - len -= l; - POST(p); - POST(len); - ret += l; - *size = ret; - return (0); -} - -static int -encode_oid(unsigned char *p, size_t len, const oid *k, size_t *size) { - size_t ret = 0; - size_t l; - int e; - - e = der_put_oid(p, len, k, &l); - if (e) { - return (e); - } - p -= l; - len -= l; - ret += l; - e = der_put_length_and_tag(p, len, l, ASN1_C_UNIV, PRIM, UT_OID, &l); - if (e) { - return (e); - } - p -= l; - len -= l; - POST(p); - POST(len); - ret += l; - *size = ret; - return (0); -} - -/* encapsulate.c */ - -static void -gssapi_encap_length(size_t data_len, size_t *len, size_t *total_len, - const gss_OID mech) { - size_t len_len; - - *len = 1 + 1 + mech->length + data_len; - - len_len = length_len(*len); - - *total_len = 1 + len_len + *len; -} - -static u_char * -gssapi_mech_make_header(u_char *p, size_t len, const gss_OID mech) { - int e; - size_t len_len, foo; - - *p++ = 0x60; - len_len = length_len(len); - e = der_put_length(p + len_len - 1, len_len, len, &foo); - if (e || foo != len_len) { - return (NULL); - } - p += len_len; - *p++ = 0x06; - *p++ = mech->length; - memmove(p, mech->elements, mech->length); - p += mech->length; - return (p); -} - -/* - * Give it a krb5_data and it will encapsulate with extra GSS-API wrappings. - */ - -static OM_uint32 -gssapi_spnego_encapsulate(OM_uint32 *minor_status, unsigned char *buf, - size_t buf_size, gss_buffer_t output_token, - const gss_OID mech) { - size_t len, outer_len; - u_char *p; - - gssapi_encap_length(buf_size, &len, &outer_len, mech); - - output_token->length = outer_len; - output_token->value = malloc(outer_len); - if (output_token->value == NULL) { - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - p = gssapi_mech_make_header(output_token->value, len, mech); - if (p == NULL) { - if (output_token->length != 0U) { - gss_release_buffer(minor_status, output_token); - } - return (GSS_S_FAILURE); - } - memmove(p, buf, buf_size); - return (GSS_S_COMPLETE); -} - -/* init_sec_context.c */ -/* - * SPNEGO wrapper for Kerberos5 GSS-API kouril@ics.muni.cz, 2003 (mostly - * based on Heimdal code) - */ - -static int -add_mech(MechTypeList *mech_list, gss_OID mech) { - MechType *tmp; - int ret; - - tmp = realloc(mech_list->val, (mech_list->len + 1) * sizeof(*tmp)); - if (tmp == NULL) { - return (ENOMEM); - } - mech_list->val = tmp; - - ret = der_get_oid(mech->elements, mech->length, - &mech_list->val[mech_list->len], NULL); - if (ret) { - return (ret); - } - - mech_list->len++; - return (0); -} - -/* - * return the length of the mechanism in token or -1 - * (which implies that the token was bad - GSS_S_DEFECTIVE_TOKEN - */ - -static ssize_t -gssapi_krb5_get_mech(const u_char *ptr, size_t total_len, - const u_char **mech_ret) { - size_t len, len_len, mech_len, foo; - const u_char *p = ptr; - int e; - - if (total_len < 1U) { - return (-1); - } - if (*p++ != 0x60) { - return (-1); - } - e = der_get_length(p, total_len - 1, &len, &len_len); - if (e || 1 + len_len + len != total_len) { - return (-1); - } - p += len_len; - if (*p++ != 0x06) { - return (-1); - } - e = der_get_length(p, total_len - 1 - len_len - 1, &mech_len, &foo); - if (e) { - return (-1); - } - p += foo; - *mech_ret = p; - return (mech_len); -} - -static OM_uint32 -spnego_initial(OM_uint32 *minor_status, - const gss_cred_id_t initiator_cred_handle, - gss_ctx_id_t *context_handle, const gss_name_t target_name, - const gss_OID mech_type, OM_uint32 req_flags, OM_uint32 time_req, - const gss_channel_bindings_t input_chan_bindings, - const gss_buffer_t input_token, gss_OID *actual_mech_type, - gss_buffer_t output_token, OM_uint32 *ret_flags, - OM_uint32 *time_rec) { - NegTokenInit token_init; - OM_uint32 major_status, minor_status2; - gss_buffer_desc krb5_output_token = GSS_C_EMPTY_BUFFER; - unsigned char *buf = NULL; - size_t buf_size; - size_t len; - int ret; - - (void)mech_type; - - memset(&token_init, 0, sizeof(token_init)); - - ret = add_mech(&token_init.mechTypes, GSS_KRB5_MECH); - if (ret) { - *minor_status = ret; - ret = GSS_S_FAILURE; - goto end; - } - - major_status = gss_init_sec_context( - minor_status, initiator_cred_handle, context_handle, - target_name, GSS_KRB5_MECH, req_flags, time_req, - input_chan_bindings, input_token, actual_mech_type, - &krb5_output_token, ret_flags, time_rec); - if (GSS_ERROR(major_status)) { - ret = major_status; - goto end; - } - if (krb5_output_token.length > 0U) { - token_init.mechToken = malloc(sizeof(*token_init.mechToken)); - if (token_init.mechToken == NULL) { - *minor_status = ENOMEM; - ret = GSS_S_FAILURE; - goto end; - } - token_init.mechToken->data = krb5_output_token.value; - token_init.mechToken->length = krb5_output_token.length; - } - /* - * The MS implementation of SPNEGO seems to not like the mechListMIC - * field, so we omit it (it's optional anyway) - */ - - buf_size = 1024; - buf = malloc(buf_size); - if (buf == NULL) { - *minor_status = ENOMEM; - ret = GSS_S_FAILURE; - goto end; - } - - do { - ret = encode_NegTokenInit(buf + buf_size - 1, buf_size, - &token_init, &len); - if (ret == 0) { - size_t tmp; - - ret = der_put_length_and_tag( - buf + buf_size - len - 1, buf_size - len, len, - ASN1_C_CONTEXT, CONS, 0, &tmp); - if (ret == 0) { - len += tmp; - } - } - if (ret) { - if (ret == ASN1_OVERFLOW) { - u_char *tmp; - - buf_size *= 2; - tmp = realloc(buf, buf_size); - if (tmp == NULL) { - *minor_status = ENOMEM; - ret = GSS_S_FAILURE; - goto end; - } - buf = tmp; - } else { - *minor_status = ret; - ret = GSS_S_FAILURE; - goto end; - } - } - } while (ret == ASN1_OVERFLOW); - - ret = gssapi_spnego_encapsulate(minor_status, buf + buf_size - len, len, - output_token, GSS_SPNEGO_MECH); - if (ret == GSS_S_COMPLETE) { - ret = major_status; - } - -end: - if (token_init.mechToken != NULL) { - free(token_init.mechToken); - token_init.mechToken = NULL; - } - free_NegTokenInit(&token_init); - if (krb5_output_token.length != 0U) { - gss_release_buffer(&minor_status2, &krb5_output_token); - } - if (buf) { - free(buf); - } - - return (ret); -} - -static OM_uint32 -spnego_reply(OM_uint32 *minor_status, const gss_cred_id_t initiator_cred_handle, - gss_ctx_id_t *context_handle, const gss_name_t target_name, - const gss_OID mech_type, OM_uint32 req_flags, OM_uint32 time_req, - const gss_channel_bindings_t input_chan_bindings, - const gss_buffer_t input_token, gss_OID *actual_mech_type, - gss_buffer_t output_token, OM_uint32 *ret_flags, - OM_uint32 *time_rec) { - OM_uint32 ret; - NegTokenResp resp; - unsigned char *buf; - size_t buf_size; - u_char oidbuf[17]; - size_t oidlen; - gss_buffer_desc sub_token; - ssize_t mech_len; - const u_char *p; - size_t len, taglen; - - (void)mech_type; - - output_token->length = 0; - output_token->value = NULL; - - /* - * SPNEGO doesn't include gss wrapping on SubsequentContextToken - * like the Kerberos 5 mech does. But lets check for it anyway. - */ - - mech_len = gssapi_krb5_get_mech(input_token->value, input_token->length, - &p); - - if (mech_len < 0) { - buf = input_token->value; - buf_size = input_token->length; - } else if ((size_t)mech_len == GSS_KRB5_MECH->length && - isc_safe_memequal(GSS_KRB5_MECH->elements, p, mech_len)) - { - return (gss_init_sec_context( - minor_status, initiator_cred_handle, context_handle, - target_name, GSS_KRB5_MECH, req_flags, time_req, - input_chan_bindings, input_token, actual_mech_type, - output_token, ret_flags, time_rec)); - } else if ((size_t)mech_len == GSS_SPNEGO_MECH->length && - isc_safe_memequal(GSS_SPNEGO_MECH->elements, p, mech_len)) - { - ret = gssapi_spnego_decapsulate(minor_status, input_token, &buf, - &buf_size, GSS_SPNEGO_MECH); - if (ret) { - return (ret); - } - } else { - return (GSS_S_BAD_MECH); - } - - ret = der_match_tag_and_length(buf, buf_size, ASN1_C_CONTEXT, CONS, 1, - &len, &taglen); - if (ret) { - return (ret); - } - - if (len > buf_size - taglen) { - return (ASN1_OVERRUN); - } - - ret = decode_NegTokenResp(buf + taglen, len, &resp, NULL); - if (ret) { - free_NegTokenResp(&resp); - *minor_status = ENOMEM; - return (GSS_S_FAILURE); - } - - if (resp.negState == NULL || *(resp.negState) == reject || - resp.supportedMech == NULL) - { - free_NegTokenResp(&resp); - return (GSS_S_BAD_MECH); - } - - ret = der_put_oid(oidbuf + sizeof(oidbuf) - 1, sizeof(oidbuf), - resp.supportedMech, &oidlen); - if (ret || oidlen != GSS_KRB5_MECH->length || - !isc_safe_memequal(oidbuf + sizeof(oidbuf) - oidlen, - GSS_KRB5_MECH->elements, oidlen)) - { - free_NegTokenResp(&resp); - return (GSS_S_BAD_MECH); - } - - if (resp.responseToken != NULL) { - sub_token.length = resp.responseToken->length; - sub_token.value = resp.responseToken->data; - } else { - sub_token.length = 0; - sub_token.value = NULL; - } - - ret = gss_init_sec_context(minor_status, initiator_cred_handle, - context_handle, target_name, GSS_KRB5_MECH, - req_flags, time_req, input_chan_bindings, - &sub_token, actual_mech_type, output_token, - ret_flags, time_rec); - if (ret) { - free_NegTokenResp(&resp); - return (ret); - } - - /* - * XXXSRA I don't think this limited implementation ever needs - * to check the MIC -- our preferred mechanism (Kerberos) - * authenticates its own messages and is the only mechanism - * we'll accept, so if the mechanism negotiation completes - * successfully, we don't need the MIC. See RFC 4178. - */ - - free_NegTokenResp(&resp); - return (ret); -} - -OM_uint32 -gss_init_sec_context_spnego( - OM_uint32 *minor_status, const gss_cred_id_t initiator_cred_handle, - gss_ctx_id_t *context_handle, const gss_name_t target_name, - const gss_OID mech_type, OM_uint32 req_flags, OM_uint32 time_req, - const gss_channel_bindings_t input_chan_bindings, - const gss_buffer_t input_token, gss_OID *actual_mech_type, - gss_buffer_t output_token, OM_uint32 *ret_flags, OM_uint32 *time_rec) { - /* Dirty trick to suppress compiler warnings */ - - /* Figure out whether we're starting over or processing a reply */ - - if (input_token == GSS_C_NO_BUFFER || input_token->length == 0U) { - return (spnego_initial(minor_status, initiator_cred_handle, - context_handle, target_name, mech_type, - req_flags, time_req, input_chan_bindings, - input_token, actual_mech_type, - output_token, ret_flags, time_rec)); - } else { - return (spnego_reply(minor_status, initiator_cred_handle, - context_handle, target_name, mech_type, - req_flags, time_req, input_chan_bindings, - input_token, actual_mech_type, - output_token, ret_flags, time_rec)); - } -} - -#endif /* GSSAPI */ diff --git a/lib/dns/spnego.h b/lib/dns/spnego.h deleted file mode 100644 index 2753dfc8c6..0000000000 --- a/lib/dns/spnego.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file - * \brief - * Entry points into portable SPNEGO implementation. - * See spnego.c for information on the SPNEGO implementation itself. - */ - -#ifndef _SPNEGO_H_ -#define _SPNEGO_H_ - -/*% - * Wrapper for GSSAPI gss_init_sec_context(), using portable SPNEGO - * implementation instead of the one that's part of the GSSAPI - * library. Takes arguments identical to the standard GSSAPI - * function, uses standard gss_init_sec_context() to handle - * everything inside the SPNEGO wrapper. - */ -OM_uint32 -gss_init_sec_context_spnego(OM_uint32 *, const gss_cred_id_t, gss_ctx_id_t *, - const gss_name_t, const gss_OID, OM_uint32, - OM_uint32, const gss_channel_bindings_t, - const gss_buffer_t, gss_OID *, gss_buffer_t, - OM_uint32 *, OM_uint32 *); - -/*% - * Wrapper for GSSAPI gss_accept_sec_context(), using portable SPNEGO - * implementation instead of the one that's part of the GSSAPI - * library. Takes arguments identical to the standard GSSAPI - * function. Checks the OID of the input token to see if it's SPNEGO; - * if so, processes it, otherwise hands the call off to the standard - * gss_accept_sec_context() function. - */ -OM_uint32 -gss_accept_sec_context_spnego(OM_uint32 *, gss_ctx_id_t *, const gss_cred_id_t, - const gss_buffer_t, const gss_channel_bindings_t, - gss_name_t *, gss_OID *, gss_buffer_t, - OM_uint32 *, OM_uint32 *, gss_cred_id_t *); - -#endif /* ifndef _SPNEGO_H_ */ diff --git a/lib/dns/spnego_asn1.c b/lib/dns/spnego_asn1.c deleted file mode 100644 index 142cf3e5af..0000000000 --- a/lib/dns/spnego_asn1.c +++ /dev/null @@ -1,983 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file - * \brief Method routines generated from SPNEGO ASN.1 module. - * See spnego_asn1.pl for details. Do not edit. - */ - -/* Generated from spnego.asn1 */ -/* Do not edit */ - -#ifndef __asn1_h__ -#define __asn1_h__ - -#ifndef __asn1_common_definitions__ -#define __asn1_common_definitions__ - -typedef struct octet_string { - size_t length; - void *data; -} octet_string; - -typedef char *general_string; - -typedef char *utf8_string; - -typedef struct oid { - size_t length; - unsigned *components; -} oid; - -#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \ - do { \ - (BL) = length_##T((S)); \ - (B) = malloc((BL)); \ - if ((B) == NULL) { \ - (R) = ENOMEM; \ - } else { \ - (R) = encode_##T(((unsigned char *)(B)) + (BL)-1, \ - (BL), (S), (L)); \ - if ((R) != 0) { \ - free((B)); \ - (B) = NULL; \ - } \ - } \ - } while (0) - -#endif /* ifndef __asn1_common_definitions__ */ - -/* - * MechType ::= OBJECT IDENTIFIER - */ - -typedef oid MechType; - -static int -encode_MechType(unsigned char *, size_t, const MechType *, size_t *); -static int -decode_MechType(const unsigned char *, size_t, MechType *, size_t *); -static void -free_MechType(MechType *); -/* unused declaration: length_MechType */ -/* unused declaration: copy_MechType */ - -/* - * MechTypeList ::= SEQUENCE OF MechType - */ - -typedef struct MechTypeList { - unsigned int len; - MechType *val; -} MechTypeList; - -static int -encode_MechTypeList(unsigned char *, size_t, const MechTypeList *, size_t *); -static int -decode_MechTypeList(const unsigned char *, size_t, MechTypeList *, size_t *); -static void -free_MechTypeList(MechTypeList *); -/* unused declaration: length_MechTypeList */ -/* unused declaration: copy_MechTypeList */ - -/* - * ContextFlags ::= BIT STRING { delegFlag(0), mutualFlag(1), replayFlag(2), - * sequenceFlag(3), anonFlag(4), confFlag(5), integFlag(6) } - */ - -typedef struct ContextFlags { - unsigned int delegFlag : 1; - unsigned int mutualFlag : 1; - unsigned int replayFlag : 1; - unsigned int sequenceFlag : 1; - unsigned int anonFlag : 1; - unsigned int confFlag : 1; - unsigned int integFlag : 1; -} ContextFlags; - -static int -encode_ContextFlags(unsigned char *, size_t, const ContextFlags *, size_t *); -static int -decode_ContextFlags(const unsigned char *, size_t, ContextFlags *, size_t *); -static void -free_ContextFlags(ContextFlags *); -/* unused declaration: length_ContextFlags */ -/* unused declaration: copy_ContextFlags */ -/* unused declaration: ContextFlags2int */ -/* unused declaration: int2ContextFlags */ -/* unused declaration: asn1_ContextFlags_units */ - -/* - * NegTokenInit ::= SEQUENCE { mechTypes[0] MechTypeList, reqFlags[1] - * ContextFlags OPTIONAL, mechToken[2] OCTET STRING OPTIONAL, - * mechListMIC[3] OCTET STRING OPTIONAL } - */ - -typedef struct NegTokenInit { - MechTypeList mechTypes; - ContextFlags *reqFlags; - octet_string *mechToken; - octet_string *mechListMIC; -} NegTokenInit; - -static int -encode_NegTokenInit(unsigned char *, size_t, const NegTokenInit *, size_t *); -static int -decode_NegTokenInit(const unsigned char *, size_t, NegTokenInit *, size_t *); -static void -free_NegTokenInit(NegTokenInit *); -/* unused declaration: length_NegTokenInit */ -/* unused declaration: copy_NegTokenInit */ - -/* - * NegTokenResp ::= SEQUENCE { negState[0] ENUMERATED { - * accept-completed(0), accept-incomplete(1), reject(2), request-mic(3) } - * OPTIONAL, supportedMech[1] MechType OPTIONAL, responseToken[2] OCTET - * STRING OPTIONAL, mechListMIC[3] OCTET STRING OPTIONAL } - */ - -typedef struct NegTokenResp { - enum { accept_completed = 0, - accept_incomplete = 1, - reject = 2, - request_mic = 3 } * - negState; - - MechType *supportedMech; - octet_string *responseToken; - octet_string *mechListMIC; -} NegTokenResp; - -static int -encode_NegTokenResp(unsigned char *, size_t, const NegTokenResp *, size_t *); -static int -decode_NegTokenResp(const unsigned char *, size_t, NegTokenResp *, size_t *); -static void -free_NegTokenResp(NegTokenResp *); -/* unused declaration: length_NegTokenResp */ -/* unused declaration: copy_NegTokenResp */ - -#endif /* __asn1_h__ */ -/* Generated from spnego.asn1 */ -/* Do not edit */ - -#define BACK \ - if (e) \ - return (e); \ - p -= l; \ - len -= l; \ - ret += l; \ - POST(p); \ - POST(len); \ - POST(ret) - -static int -encode_MechType(unsigned char *p, size_t len, const MechType *data, - size_t *size) { - size_t ret = 0; - size_t l; - int e; - - e = encode_oid(p, len, data, &l); - BACK; - *size = ret; - return (0); -} - -#define FORW \ - if (e) \ - goto fail; \ - p += l; \ - len -= l; \ - ret += l; \ - POST(p); \ - POST(len); \ - POST(ret) - -static int -decode_MechType(const unsigned char *p, size_t len, MechType *data, - size_t *size) { - size_t ret = 0; - size_t l; - int e; - - memset(data, 0, sizeof(*data)); - e = decode_oid(p, len, data, &l); - FORW; - if (size) { - *size = ret; - } - return (0); -fail: - free_MechType(data); - return (e); -} - -static void -free_MechType(MechType *data) { - free_oid(data); -} - -/* unused function: length_MechType */ - -/* unused function: copy_MechType */ - -/* Generated from spnego.asn1 */ -/* Do not edit */ - -static int -encode_MechTypeList(unsigned char *p, size_t len, const MechTypeList *data, - size_t *size) { - size_t ret = 0; - size_t l; - int i, e; - - for (i = (data)->len - 1; i >= 0; --i) { - size_t oldret = ret; - ret = 0; - e = encode_MechType(p, len, &(data)->val[i], &l); - BACK; - ret += oldret; - } - e = der_put_length_and_tag(p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, - &l); - BACK; - *size = ret; - return (0); -} - -static int -decode_MechTypeList(const unsigned char *p, size_t len, MechTypeList *data, - size_t *size) { - size_t ret = 0, reallen; - size_t l; - int e; - - memset(data, 0, sizeof(*data)); - reallen = 0; - e = der_match_tag_and_length(p, len, ASN1_C_UNIV, CONS, UT_Sequence, - &reallen, &l); - FORW; - if (len < reallen) { - return (ASN1_OVERRUN); - } - len = reallen; - { - size_t origlen = len; - size_t oldret = ret; - ret = 0; - (data)->len = 0; - (data)->val = NULL; - while (ret < origlen) { - void *old = (data)->val; - (data)->len++; - (data)->val = - realloc((data)->val, - sizeof(*((data)->val)) * (data)->len); - if ((data)->val == NULL) { - (data)->val = old; - (data)->len--; - return (ENOMEM); - } - e = decode_MechType(p, len, - &(data)->val[(data)->len - 1], &l); - FORW; - len = origlen - ret; - } - ret += oldret; - } - if (size) { - *size = ret; - } - return (0); -fail: - free_MechTypeList(data); - return (e); -} - -static void -free_MechTypeList(MechTypeList *data) { - while ((data)->len) { - free_MechType(&(data)->val[(data)->len - 1]); - (data)->len--; - } - free((data)->val); - (data)->val = NULL; -} - -/* unused function: length_MechTypeList */ - -/* unused function: copy_MechTypeList */ - -/* Generated from spnego.asn1 */ -/* Do not edit */ - -static int -encode_ContextFlags(unsigned char *p, size_t len, const ContextFlags *data, - size_t *size) { - size_t ret = 0; - size_t l; - int e; - - { - unsigned char c = 0; - *p-- = c; - len--; - ret++; - c = 0; - *p-- = c; - len--; - ret++; - c = 0; - *p-- = c; - len--; - ret++; - c = 0; - if (data->integFlag) { - c |= 1 << 1; - } - if (data->confFlag) { - c |= 1 << 2; - } - if (data->anonFlag) { - c |= 1 << 3; - } - if (data->sequenceFlag) { - c |= 1 << 4; - } - if (data->replayFlag) { - c |= 1 << 5; - } - if (data->mutualFlag) { - c |= 1 << 6; - } - if (data->delegFlag) { - c |= 1 << 7; - } - *p-- = c; - *p-- = 0; - len -= 2; - ret += 2; - } - - e = der_put_length_and_tag(p, len, ret, ASN1_C_UNIV, PRIM, UT_BitString, - &l); - BACK; - *size = ret; - return (0); -} - -static int -decode_ContextFlags(const unsigned char *p, size_t len, ContextFlags *data, - size_t *size) { - size_t ret = 0, reallen; - size_t l; - int e; - - memset(data, 0, sizeof(*data)); - reallen = 0; - e = der_match_tag_and_length(p, len, ASN1_C_UNIV, PRIM, UT_BitString, - &reallen, &l); - FORW; - if (len < reallen) { - return (ASN1_OVERRUN); - } - p++; - len--; - POST(len); - reallen--; - ret++; - data->delegFlag = (*p >> 7) & 1; - data->mutualFlag = (*p >> 6) & 1; - data->replayFlag = (*p >> 5) & 1; - data->sequenceFlag = (*p >> 4) & 1; - data->anonFlag = (*p >> 3) & 1; - data->confFlag = (*p >> 2) & 1; - data->integFlag = (*p >> 1) & 1; - ret += reallen; - if (size) { - *size = ret; - } - return (0); -fail: - free_ContextFlags(data); - return (e); -} - -static void -free_ContextFlags(ContextFlags *data) { - (void)data; -} - -/* unused function: length_ContextFlags */ - -/* unused function: copy_ContextFlags */ - -/* unused function: ContextFlags2int */ - -/* unused function: int2ContextFlags */ - -/* unused variable: ContextFlags_units */ - -/* unused function: asn1_ContextFlags_units */ - -/* Generated from spnego.asn1 */ -/* Do not edit */ - -static int -encode_NegTokenInit(unsigned char *p, size_t len, const NegTokenInit *data, - size_t *size) { - size_t ret = 0; - size_t l; - int e; - - if ((data)->mechListMIC) { - size_t oldret = ret; - ret = 0; - e = encode_octet_string(p, len, (data)->mechListMIC, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 3, - &l); - BACK; - ret += oldret; - } - if ((data)->mechToken) { - size_t oldret = ret; - ret = 0; - e = encode_octet_string(p, len, (data)->mechToken, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 2, - &l); - BACK; - ret += oldret; - } - if ((data)->reqFlags) { - size_t oldret = ret; - ret = 0; - e = encode_ContextFlags(p, len, (data)->reqFlags, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 1, - &l); - BACK; - ret += oldret; - } - { - size_t oldret = ret; - ret = 0; - e = encode_MechTypeList(p, len, &(data)->mechTypes, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 0, - &l); - BACK; - ret += oldret; - } - e = der_put_length_and_tag(p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, - &l); - BACK; - *size = ret; - return (0); -} - -static int -decode_NegTokenInit(const unsigned char *p, size_t len, NegTokenInit *data, - size_t *size) { - size_t ret = 0, reallen; - size_t l; - int e; - - memset(data, 0, sizeof(*data)); - reallen = 0; - e = der_match_tag_and_length(p, len, ASN1_C_UNIV, CONS, UT_Sequence, - &reallen, &l); - FORW; - { - int dce_fix; - if ((dce_fix = fix_dce(reallen, &len)) < 0) { - e = ASN1_BAD_FORMAT; - goto fail; - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 0, &l); - FORW; - { - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - e = ASN1_BAD_FORMAT; - goto fail; - } - e = decode_MechTypeList( - p, len, &(data)->mechTypes, &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 1, &l); - if (e) { - (data)->reqFlags = NULL; - } else { - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - e = ASN1_BAD_FORMAT; - goto fail; - } - (data)->reqFlags = malloc( - sizeof(*(data)->reqFlags)); - if ((data)->reqFlags == NULL) { - e = ENOMEM; - goto fail; - } - e = decode_ContextFlags( - p, len, (data)->reqFlags, &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 2, &l); - if (e) { - (data)->mechToken = NULL; - } else { - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - e = ASN1_BAD_FORMAT; - goto fail; - } - (data)->mechToken = malloc( - sizeof(*(data)->mechToken)); - if ((data)->mechToken == NULL) { - e = ENOMEM; - goto fail; - } - e = decode_octet_string( - p, len, (data)->mechToken, &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 3, &l); - if (e) { - (data)->mechListMIC = NULL; - } else { - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - e = ASN1_BAD_FORMAT; - goto fail; - } - (data)->mechListMIC = malloc( - sizeof(*(data)->mechListMIC)); - if ((data)->mechListMIC == NULL) { - e = ENOMEM; - goto fail; - } - e = decode_octet_string( - p, len, (data)->mechListMIC, - &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - if (dce_fix) { - e = der_match_tag_and_length(p, len, (Der_class)0, - (Der_type)0, 0, &reallen, - &l); - FORW; - } - } - if (size) { - *size = ret; - } - return (0); -fail: - free_NegTokenInit(data); - return (e); -} - -static void -free_NegTokenInit(NegTokenInit *data) { - free_MechTypeList(&(data)->mechTypes); - if ((data)->reqFlags) { - free_ContextFlags((data)->reqFlags); - free((data)->reqFlags); - (data)->reqFlags = NULL; - } - if ((data)->mechToken) { - free_octet_string((data)->mechToken); - free((data)->mechToken); - (data)->mechToken = NULL; - } - if ((data)->mechListMIC) { - free_octet_string((data)->mechListMIC); - free((data)->mechListMIC); - (data)->mechListMIC = NULL; - } -} - -/* unused function: length_NegTokenInit */ - -/* unused function: copy_NegTokenInit */ - -/* Generated from spnego.asn1 */ -/* Do not edit */ - -static int -encode_NegTokenResp(unsigned char *p, size_t len, const NegTokenResp *data, - size_t *size) { - size_t ret = 0; - size_t l; - int e; - - if ((data)->mechListMIC) { - size_t oldret = ret; - ret = 0; - e = encode_octet_string(p, len, (data)->mechListMIC, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 3, - &l); - BACK; - ret += oldret; - } - if ((data)->responseToken) { - size_t oldret = ret; - ret = 0; - e = encode_octet_string(p, len, (data)->responseToken, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 2, - &l); - BACK; - ret += oldret; - } - if ((data)->supportedMech) { - size_t oldret = ret; - ret = 0; - e = encode_MechType(p, len, (data)->supportedMech, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 1, - &l); - BACK; - ret += oldret; - } - if ((data)->negState) { - size_t oldret = ret; - ret = 0; - e = encode_enumerated(p, len, (data)->negState, &l); - BACK; - e = der_put_length_and_tag(p, len, ret, ASN1_C_CONTEXT, CONS, 0, - &l); - BACK; - ret += oldret; - } - e = der_put_length_and_tag(p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, - &l); - BACK; - *size = ret; - return (0); -} - -static int -decode_NegTokenResp(const unsigned char *p, size_t len, NegTokenResp *data, - size_t *size) { - size_t ret = 0, reallen; - size_t l; - int e; - - /* cppcheck-suppress uninitvar */ - memset(data, 0, sizeof(*data)); - reallen = 0; - e = der_match_tag_and_length(p, len, ASN1_C_UNIV, CONS, UT_Sequence, - &reallen, &l); - FORW; - { - int dce_fix; - if ((dce_fix = fix_dce(reallen, &len)) < 0) { - return (ASN1_BAD_FORMAT); - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 0, &l); - if (e) { - (data)->negState = NULL; - } else { - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - return (ASN1_BAD_FORMAT); - } - (data)->negState = malloc( - sizeof(*(data)->negState)); - if ((data)->negState == NULL) { - return (ENOMEM); - } - e = decode_enumerated( - p, len, (data)->negState, &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 1, &l); - if (e) { - (data)->supportedMech = NULL; - } else { - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - return (ASN1_BAD_FORMAT); - } - (data)->supportedMech = malloc( - sizeof(*(data)->supportedMech)); - if ((data)->supportedMech == NULL) { - return (ENOMEM); - } - e = decode_MechType( - p, len, (data)->supportedMech, - &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 2, &l); - if (e) { - (data)->responseToken = NULL; - } else { - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - return (ASN1_BAD_FORMAT); - } - (data)->responseToken = malloc( - sizeof(*(data)->responseToken)); - if ((data)->responseToken == NULL) { - return (ENOMEM); - } - e = decode_octet_string( - p, len, (data)->responseToken, - &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - { - size_t newlen, oldlen; - - e = der_match_tag(p, len, ASN1_C_CONTEXT, CONS, 3, &l); - if (e) { - (data)->mechListMIC = NULL; - } else { - p += l; - len -= l; - ret += l; - e = der_get_length(p, len, &newlen, &l); - FORW; - { - int mydce_fix; - oldlen = len; - if ((mydce_fix = fix_dce(newlen, - &len)) < 0) { - return (ASN1_BAD_FORMAT); - } - (data)->mechListMIC = malloc( - sizeof(*(data)->mechListMIC)); - if ((data)->mechListMIC == NULL) { - return (ENOMEM); - } - e = decode_octet_string( - p, len, (data)->mechListMIC, - &l); - FORW; - if (mydce_fix) { - e = der_match_tag_and_length( - p, len, (Der_class)0, - (Der_type)0, 0, - &reallen, &l); - FORW; - } else { - len = oldlen - newlen; - } - } - } - } - if (dce_fix) { - e = der_match_tag_and_length(p, len, (Der_class)0, - (Der_type)0, 0, &reallen, - &l); - FORW; - } - } - if (size) { - *size = ret; - } - return (0); -fail: - free_NegTokenResp(data); - return (e); -} - -static void -free_NegTokenResp(NegTokenResp *data) { - if ((data)->negState) { - free((data)->negState); - (data)->negState = NULL; - } - if ((data)->supportedMech) { - free_MechType((data)->supportedMech); - free((data)->supportedMech); - (data)->supportedMech = NULL; - } - if ((data)->responseToken) { - free_octet_string((data)->responseToken); - free((data)->responseToken); - (data)->responseToken = NULL; - } - if ((data)->mechListMIC) { - free_octet_string((data)->mechListMIC); - free((data)->mechListMIC); - (data)->mechListMIC = NULL; - } -} - -/* unused function: length_NegTokenResp */ - -/* unused function: copy_NegTokenResp */ - -/* Generated from spnego.asn1 */ -/* Do not edit */ - -/* CHOICE */ -/* unused variable: asn1_NegotiationToken_dummy_holder */ diff --git a/lib/dns/spnego_asn1.pl b/lib/dns/spnego_asn1.pl deleted file mode 100644 index 66f7b731b8..0000000000 --- a/lib/dns/spnego_asn1.pl +++ /dev/null @@ -1,193 +0,0 @@ -#!/bin/bin/perl -w -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# Our SPNEGO implementation uses some functions generated by the -# Heimdal ASN.1 compiler, which this script then whacks a bit to make -# them work properly in this stripped down implementation. We don't -# want to require our users to have a copy of the compiler, so we ship -# the output of this script, but we need to keep the script around in -# any case to cope with future changes to the SPNEGO ASN.1 code, so we -# might as well supply the script for users who want it. - -# Overall plan: run the ASN.1 compiler, run each of its output files -# through indent, fix up symbols and whack everything to be static. -# We use indent for two reasons: (1) to whack the Heimdal compiler's -# output into something closer to ISC's coding standard, and (2) to -# make it easier for this script to parse the result. - -# Output from this script is C code which we expect to be #included -# into another C file, which is why everything generated by this -# script is marked "static". The intent is to minimize the number of -# extern symbols exported by the SPNEGO implementation, to avoid -# potential conflicts with the GSSAPI libraries. - -### - -# Filename of the ASN.1 specification. Hardcoded for the moment -# since this script is intended for compiling exactly one module. - -my $asn1_source = $ENV{ASN1_SOURCE} || "spnego.asn1"; - -# Heimdal ASN.1 compiler. This script was written using the version -# from Heimdal 0.7.1. To build this, download a copy of -# heimdal-0.7.1.tar.gz, configure and build with the default options, -# then look for the compiler in heimdal-0.7.1/lib/asn1/asn1_compile. - -my $asn1_compile = $ENV{ASN1_COMPILE} || "asn1_compile"; - -# BSD indent program. This script was written using the version of -# indent that comes with FreeBSD 4.11-STABLE. The GNU project, as -# usual, couldn't resist the temptation to monkey with indent's -# command line syntax, so this probably won't work with GNU indent. - -my $indent = $ENV{INDENT} || "indent"; - -### - -# Step 1: run the compiler. Input is the ASN.1 file. Outputs are a -# header file (name specified on command line without the .h suffix), -# a file called "asn1_files" listing the names of the other output -# files, and a set of files containing C code generated by the -# compiler for each data type that the compiler found. - -if (! -r $asn1_source || system($asn1_compile, $asn1_source, "asn1")) { - die("Couldn't compile ASN.1 source file $asn1_source\n"); -} - -my @files = ("asn1.h"); - -open(F, "asn1_files") - or die("Couldn't open asn1_files: $!\n"); -push(@files, split) - while (); -close(F); - -unlink("asn1_files"); - -### - -# Step 2: generate header block. - -print(q~/* - * Copyright (C) 2006 Internet Systems Consortium, Inc. ("ISC") - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* $Id: spnego_asn1.pl,v 1.4 2007/06/19 23:47:16 tbox Exp $ */ - -/*! \file - * \brief Method routines generated from SPNEGO ASN.1 module. - * See spnego_asn1.pl for details. Do not edit. - */ - -~); - -### - -# Step 3: read and process each generated file, then delete it. - -my $output; - -for my $file (@files) { - - my $is_static = 0; - - system($indent, "-di1", "-ldi1", $file) == 0 - or die("Couldn't indent $file"); - - unlink("$file.BAK"); - - open(F, $file) - or die("Couldn't open $file: $!"); - - while () { - - # Symbol name fixups - - s/heim_general_string/general_string/g; - s/heim_octet_string/octet_string/g; - s/heim_oid/oid/g; - s/heim_utf8_string/utf8_string/g; - - # Convert all externs to statics - - if (/^static/) { - $is_static = 1; - } - - if (!/^typedef/ && - !$is_static && - /^[A-Za-z_][0-9A-Za-z_]*[ \t]*($|[^:0-9A-Za-z_])/) { - $_ = "static " . $_; - $is_static = 1; - } - - if (/[{};]/) { - $is_static = 0; - } - - # Suppress file inclusion, pass anything else through - - if (!/#include/) { - $output .= $_; - } - } - - close(F); - unlink($file); -} - -# Step 4: Delete unused stuff to avoid code bloat and compiler warnings. - -my @unused_functions = qw(ContextFlags2int - int2ContextFlags - asn1_ContextFlags_units - length_NegTokenInit - copy_NegTokenInit - length_NegTokenResp - copy_NegTokenResp - length_MechTypeList - length_MechType - copy_MechTypeList - length_ContextFlags - copy_ContextFlags - copy_MechType); - -$output =~ s<^static [^\n]+\n$_\(.+?^}>ms - foreach (@unused_functions); - -$output =~ s<^static .+$_\(.*\);$>m - foreach (@unused_functions); - -$output =~ s<^static struct units ContextFlags_units\[\].+?^};> - ms; - -$output =~ s<^static int asn1_NegotiationToken_dummy_holder = 1;> - ms; - -$output =~ s<^static void\nfree_ContextFlags\(ContextFlags \* data\)\n{\n> - <$&\t(void)data;\n>ms; - -# Step 5: Write the result. - -print($output); - diff --git a/lib/dns/ssu_external.c b/lib/dns/ssu_external.c index f690beea31..a1f0a3736a 100644 --- a/lib/dns/ssu_external.c +++ b/lib/dns/ssu_external.c @@ -20,10 +20,10 @@ #include #include -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 #include #include -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ #include #include @@ -58,7 +58,7 @@ ssu_e_log(int level, const char *fmt, ...) { static int ux_socket_connect(const char *path) { int fd = -1; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 struct sockaddr_un addr; REQUIRE(path != NULL); @@ -94,7 +94,7 @@ ux_socket_connect(const char *path) { close(fd); return (-1); } -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ return (fd); } diff --git a/lib/dns/tests/Kyuafile b/lib/dns/tests/Kyuafile deleted file mode 100644 index a3066a6175..0000000000 --- a/lib/dns/tests/Kyuafile +++ /dev/null @@ -1,33 +0,0 @@ -syntax(2) -test_suite('bind9') - -tap_test_program{name='acl_test'} -tap_test_program{name='db_test'} -tap_test_program{name='dbdiff_test'} -tap_test_program{name='dbiterator_test'} -tap_test_program{name='dbversion_test'} -tap_test_program{name='dh_test'} -tap_test_program{name='dispatch_test'} -tap_test_program{name='dnstap_test'} -tap_test_program{name='dst_test'} -tap_test_program{name='geoip_test'} -tap_test_program{name='keytable_test'} -tap_test_program{name='master_test'} -tap_test_program{name='name_test'} -tap_test_program{name='nsec3_test'} -tap_test_program{name='peer_test'} -tap_test_program{name='private_test'} -tap_test_program{name='rbt_serialize_test', is_exclusive=true} -tap_test_program{name='rbt_test'} -tap_test_program{name='rdata_test'} -tap_test_program{name='rdataset_test'} -tap_test_program{name='rdatasetstats_test'} -tap_test_program{name='resolver_test'} -tap_test_program{name='result_test'} -tap_test_program{name='rsa_test'} -tap_test_program{name='sigs_test'} -tap_test_program{name='time_test'} -tap_test_program{name='tsig_test'} -tap_test_program{name='update_test'} -tap_test_program{name='zonemgr_test'} -tap_test_program{name='zt_test'} diff --git a/lib/dns/tests/Makefile.am b/lib/dns/tests/Makefile.am new file mode 100644 index 0000000000..8a890bfb47 --- /dev/null +++ b/lib/dns/tests/Makefile.am @@ -0,0 +1,96 @@ +include $(top_srcdir)/Makefile.top +include $(top_srcdir)/Makefile.tests + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(KRB5_CFLAGS) \ + -DSRCDIR=\"$(abs_srcdir)\" \ + -DBUILDDIR=\"$(abs_builddir)\" + +LDADD += \ + libdnstest.la \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) + +noinst_LTLIBRARIES = libdnstest.la +libdnstest_la_SOURCES = dnstest.c dnstest.h + +check_PROGRAMS = \ + acl_test \ + db_test \ + dbdiff_test \ + dbiterator_test \ + dbversion_test \ + dh_test \ + dispatch_test \ + dst_test \ + geoip_test \ + keytable_test \ + name_test \ + nsec3_test \ + peer_test \ + private_test \ + rbt_serialize_test \ + rbt_test \ + rdata_test \ + rdataset_test \ + rdatasetstats_test \ + resolver_test \ + result_test \ + rsa_test \ + sigs_test \ + time_test \ + tsig_test \ + update_test \ + zonemgr_test \ + zt_test + +TESTS = $(check_PROGRAMS) + +if HAVE_PERL + +check_PROGRAMS += \ + master_test + +EXTRA_master_test_DEPENDENCIES = testdata/master/master12.data testdata/master/master13.data testdata/master/master14.data +CLEANFILES = $(EXTRA_master_test_DEPENDENCIES) + +testdata/master/master12.data: testdata/master/master12.data.in + mkdir -p testdata/master + $(PERL) -w $(srcdir)/mkraw.pl < testdata/master/master12.data.in > $@ + +testdata/master/master13.data: testdata/master/master13.data.in + mkdir -p testdata/master + $(PERL) -w $(srcdir)/mkraw.pl < testdata/master/master13.data.in > $@ + +testdata/master/master14.data: testdata/master/master14.data.in + mkdir -p testdata/master + $(PERL) -w $(srcdir)/mkraw.pl < testdata/master/master14.data.in > $@ + +endif + +if HAVE_GEOIP2 +check_PROGRAMS += \ + geoip_test + +geoip_test_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(MAXMINDDB_CFLAGS) + +geoip_test_LDADD = \ + $(LDADD) \ + $(MAXMINDDB_LIBS) +endif + +if HAVE_DNSTAP +check_PROGRAMS += \ + dnstap_test + +dnstap_test_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(DNSTAP_CFLAGS) +dnstap_test_LDADD = \ + $(LDADD) \ + $(DNSTAP_LIBS) +endif diff --git a/lib/dns/tests/dnstap_test.c b/lib/dns/tests/dnstap_test.c index 165c8f7aa8..39c46b9ddc 100644 --- a/lib/dns/tests/dnstap_test.c +++ b/lib/dns/tests/dnstap_test.c @@ -67,7 +67,7 @@ _teardown(void **state) { } static void -cleanup() { +cleanup(void) { (void)isc_file_remove(TAPFILE); (void)isc_file_remove(TAPSOCK); } diff --git a/lib/dns/tests/geoip_test.c b/lib/dns/tests/geoip_test.c index eca6f9b824..d9d32f4304 100644 --- a/lib/dns/tests/geoip_test.c +++ b/lib/dns/tests/geoip_test.c @@ -22,6 +22,7 @@ #define UNIT_TESTING #include +#include #include #include @@ -30,12 +31,8 @@ #include -#include "dnstest.h" - -#if defined(HAVE_GEOIP2) -#include - #include "../geoip2.c" +#include "dnstest.h" /* Use GeoIP2 databases from the 'geoip2' system test */ #define TEST_GEOIP_DATA "../../../bin/tests/system/geoip2/data" @@ -396,11 +393,9 @@ domain(void **state) { match = do_lookup_string("10.53.0.5", dns_geoip_domain_name, "five.es"); assert_true(match); } -#endif /* HAVE_GEOIP2 */ int main(void) { -#if defined(HAVE_GEOIP2) const struct CMUnitTest tests[] = { cmocka_unit_test(baseline), cmocka_unit_test(country), cmocka_unit_test(country_v6), cmocka_unit_test(city), @@ -410,9 +405,6 @@ main(void) { }; return (cmocka_run_group_tests(tests, _setup, _teardown)); -#else /* if defined(HAVE_GEOIP2) */ - print_message("1..0 # Skip GeoIP not enabled\n"); -#endif /* if defined(HAVE_GEOIP2) */ } #else /* HAVE_CMOCKA */ diff --git a/lib/dns/tests/keytable_test.c b/lib/dns/tests/keytable_test.c index 40fd712cc4..881553660d 100644 --- a/lib/dns/tests/keytable_test.c +++ b/lib/dns/tests/keytable_test.c @@ -172,7 +172,7 @@ create_dsstruct(dns_name_t *name, uint16_t flags, uint8_t proto, uint8_t alg, /* Common setup: create a keytable and ntatable to test with a few keys */ static void -create_tables() { +create_tables(void) { isc_result_t result; unsigned char digest[ISC_MAX_MD_SIZE]; dns_rdata_ds_t ds; @@ -215,7 +215,7 @@ create_tables() { } static void -destroy_tables() { +destroy_tables(void) { if (ntatable != NULL) { dns_ntatable_detach(&ntatable); } diff --git a/lib/dns/tests/master_test.c b/lib/dns/tests/master_test.c index 74709a85ea..9b8913057e 100644 --- a/lib/dns/tests/master_test.c +++ b/lib/dns/tests/master_test.c @@ -23,6 +23,7 @@ #define UNIT_TESTING #include +#include #include #include #include @@ -140,7 +141,8 @@ setup_master(void (*warn)(struct dns_rdatacallbacks *, const char *, ...), } static isc_result_t -test_master(const char *testfile, dns_masterformat_t format, +test_master(const char *workdir, const char *testfile, + dns_masterformat_t format, void (*warn)(struct dns_rdatacallbacks *, const char *, ...), void (*error)(struct dns_rdatacallbacks *, const char *, ...)) { isc_result_t result; @@ -161,9 +163,17 @@ test_master(const char *testfile, dns_masterformat_t format, callbacks.error = error; } + if (workdir != NULL) { + result = isc_dir_chdir(workdir); + if (result != ISC_R_SUCCESS) { + return (result); + } + } + result = dns_master_loadfile(testfile, &dns_origin, &dns_origin, dns_rdataclass_in, true, 0, &callbacks, NULL, NULL, dt_mctx, format, 0); + return (result); } @@ -183,7 +193,7 @@ load_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master1.data", + result = test_master(SRCDIR, "testdata/master/master1.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); } @@ -198,7 +208,7 @@ unexpected_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master2.data", + result = test_master(SRCDIR, "testdata/master/master2.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_UNEXPECTEDEND); } @@ -214,7 +224,7 @@ noowner_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master3.data", + result = test_master(SRCDIR, "testdata/master/master3.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, DNS_R_NOOWNER); } @@ -230,7 +240,7 @@ nottl_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master4.data", + result = test_master(SRCDIR, "testdata/master/master4.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); } @@ -246,7 +256,7 @@ badclass_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master5.data", + result = test_master(SRCDIR, "testdata/master/master5.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, DNS_R_BADCLASS); } @@ -261,7 +271,7 @@ toobig_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master15.data", + result = test_master(SRCDIR, "testdata/master/master15.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_NOSPACE); } @@ -276,7 +286,7 @@ maxrdata_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master16.data", + result = test_master(SRCDIR, "testdata/master/master16.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); } @@ -291,7 +301,7 @@ dnskey_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master6.data", + result = test_master(SRCDIR, "testdata/master/master6.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); } @@ -309,7 +319,7 @@ dnsnokey_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master7.data", + result = test_master(SRCDIR, "testdata/master/master7.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_UNEXPECTEDEND); } @@ -324,7 +334,7 @@ include_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master8.data", + result = test_master(SRCDIR, "testdata/master/master8.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, DNS_R_SEENINCLUDE); } @@ -343,6 +353,9 @@ master_includelist_test(void **state) { result = setup_master(nullmsg, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); + result = isc_dir_chdir(SRCDIR); + assert_int_equal(result, ISC_R_SUCCESS); + result = dns_master_loadfile( "testdata/master/master8.data", &dns_origin, &dns_origin, dns_rdataclass_in, 0, true, &callbacks, include_callback, @@ -365,7 +378,7 @@ includefail_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master9.data", + result = test_master(SRCDIR, "testdata/master/master9.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, DNS_R_BADCLASS); } @@ -380,7 +393,7 @@ blanklines_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master10.data", + result = test_master(SRCDIR, "testdata/master/master10.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); } @@ -396,7 +409,7 @@ leadingzero_test(void **state) { UNUSED(state); - result = test_master("testdata/master/master11.data", + result = test_master(SRCDIR, "testdata/master/master11.data", dns_masterformat_text, nullmsg, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); } @@ -447,21 +460,21 @@ loadraw_test(void **state) { UNUSED(state); /* Raw format version 0 */ - result = test_master("testdata/master/master12.data", + result = test_master(BUILDDIR, "testdata/master/master12.data", dns_masterformat_raw, nullmsg, nullmsg); assert_string_equal(isc_result_totext(result), "success"); assert_true(headerset); assert_int_equal(header.flags, 0); /* Raw format version 1, no source serial */ - result = test_master("testdata/master/master13.data", + result = test_master(BUILDDIR, "testdata/master/master13.data", dns_masterformat_raw, nullmsg, nullmsg); assert_string_equal(isc_result_totext(result), "success"); assert_true(headerset); assert_int_equal(header.flags, 0); /* Raw format version 1, source serial == 2011120101 */ - result = test_master("testdata/master/master14.data", + result = test_master(BUILDDIR, "testdata/master/master14.data", dns_masterformat_raw, nullmsg, nullmsg); assert_string_equal(isc_result_totext(result), "success"); assert_true(headerset); @@ -501,10 +514,16 @@ dumpraw_test(void **state) { dns_rdataclass_in, 0, NULL, &db); assert_int_equal(result, ISC_R_SUCCESS); + result = isc_dir_chdir(SRCDIR); + assert_int_equal(result, ISC_R_SUCCESS); + result = dns_db_load(db, "testdata/master/master1.data", dns_masterformat_text, 0); assert_int_equal(result, ISC_R_SUCCESS); + result = isc_dir_chdir(BUILDDIR); + assert_int_equal(result, ISC_R_SUCCESS); + dns_db_currentversion(db, &version); result = dns_master_dump(dt_mctx, db, version, @@ -512,7 +531,7 @@ dumpraw_test(void **state) { dns_masterformat_raw, NULL); assert_int_equal(result, ISC_R_SUCCESS); - result = test_master("test.dump", dns_masterformat_raw, nullmsg, + result = test_master(NULL, "test.dump", dns_masterformat_raw, nullmsg, nullmsg); assert_string_equal(isc_result_totext(result), "success"); assert_true(headerset); @@ -528,7 +547,7 @@ dumpraw_test(void **state) { dns_masterformat_raw, &header); assert_int_equal(result, ISC_R_SUCCESS); - result = test_master("test.dump", dns_masterformat_raw, nullmsg, + result = test_master(NULL, "test.dump", dns_masterformat_raw, nullmsg, nullmsg); assert_string_equal(isc_result_totext(result), "success"); assert_true(headerset); @@ -573,7 +592,7 @@ neworigin_test(void **state) { UNUSED(state); warn_expect_value = "record with inherited owner"; - result = test_master("testdata/master/master17.data", + result = test_master(SRCDIR, "testdata/master/master17.data", dns_masterformat_text, warn_expect, nullmsg); assert_int_equal(result, ISC_R_SUCCESS); assert_true(warn_expect_result); diff --git a/lib/dns/tkey.c b/lib/dns/tkey.c index 1e6fa5ae4c..97209ff7b1 100644 --- a/lib/dns/tkey.c +++ b/lib/dns/tkey.c @@ -14,6 +14,14 @@ #include #include +#if HAVE_GSSAPI +#if HAVE_GSSAPI_GSSAPI_H +#include +#elif HAVE_GSSAPI_H +#include +#endif +#endif /* HAVE_GSSAPI */ + #include #include #include @@ -574,9 +582,9 @@ process_gsstkey(dns_message_t *msg, dns_name_t *name, dns_rdata_tkey_t *tkeyin, dns_tsigkey_detach(&tsigkey); } } else if (tsigkey == NULL) { -#ifdef GSSAPI +#if HAVE_GSSAPI OM_uint32 gret, minor, lifetime; -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ uint32_t expire; RETERR(dst_key_fromgssapi(name, gss_ctx, ring->mctx, &dstkey, @@ -586,12 +594,12 @@ process_gsstkey(dns_message_t *msg, dns_name_t *name, dns_rdata_tkey_t *tkeyin, * is smaller. */ expire = now + 3600; -#ifdef GSSAPI +#if HAVE_GSSAPI gret = gss_context_time(&minor, gss_ctx, &lifetime); if (gret == GSS_S_COMPLETE && now + lifetime < expire) { expire = now + lifetime; } -#endif /* ifdef GSSAPI */ +#endif /* HAVE_GSSAPI */ RETERR(dns_tsigkey_createfromkey( name, &tkeyin->algorithm, dstkey, true, principal, now, expire, ring->mctx, ring, &tsigkey)); diff --git a/lib/dns/win32/libdns.vcxproj.filters.in b/lib/dns/win32/libdns.vcxproj.filters.in index 89811c148d..33f16d4e84 100644 --- a/lib/dns/win32/libdns.vcxproj.filters.in +++ b/lib/dns/win32/libdns.vcxproj.filters.in @@ -27,9 +27,6 @@ Library Source Files - - Library Source Files - Library Source Files @@ -623,9 +620,6 @@ Library Header Files - - Library Header Files - Library Header Files diff --git a/lib/dns/win32/libdns.vcxproj.in b/lib/dns/win32/libdns.vcxproj.in index 3a5cd719c0..b8e8438d2a 100644 --- a/lib/dns/win32/libdns.vcxproj.in +++ b/lib/dns/win32/libdns.vcxproj.in @@ -223,7 +223,6 @@ - diff --git a/lib/dns/win32/version.c b/lib/dns/win32/version.c deleted file mode 100644 index 19fc7dbd50..0000000000 --- a/lib/dns/win32/version.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include - -LIBDNS_EXTERNAL_DATA const char dns_version[] = VERSION; -LIBDNS_EXTERNAL_DATA const char dns_major[] = MAJOR; -LIBDNS_EXTERNAL_DATA const char dns_mapapi[] = MAPAPI; - -LIBDNS_EXTERNAL_DATA const unsigned int dns_libinterface = LIBINTERFACE; -LIBDNS_EXTERNAL_DATA const unsigned int dns_librevision = LIBREVISION; -LIBDNS_EXTERNAL_DATA const unsigned int dns_libage = LIBAGE; diff --git a/lib/irs/Kyuafile b/lib/irs/Kyuafile deleted file mode 100644 index 0739e3a60c..0000000000 --- a/lib/irs/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('tests/Kyuafile') diff --git a/lib/irs/Makefile.am b/lib/irs/Makefile.am new file mode 100644 index 0000000000..cb7024381c --- /dev/null +++ b/lib/irs/Makefile.am @@ -0,0 +1,40 @@ +include $(top_srcdir)/Makefile.top + +lib_LTLIBRARIES = libirs.la + +libirs_ladir = $(includedir)/irs +libirs_la_HEADERS = \ + include/irs/context.h \ + include/irs/dnsconf.h \ + include/irs/netdb.h \ + include/irs/resconf.h \ + include/irs/types.h + +libirs_la_SOURCES = \ + $(libirs_la_HEADERS) \ + context.c \ + dnsconf.c \ + gai_strerror.c \ + getaddrinfo.c \ + getnameinfo.c \ + resconf.c + +libirs_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBIRS_CFLAGS) + +libirs_la_LIBADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBISCCFG_LIBS) + +libirs_la_LDFLAGS = \ + $(libirs_VERSION_INFO) + + +if HAVE_CMOCKA +SUBDIRS = tests +endif diff --git a/lib/irs/context.c b/lib/irs/context.c index 267383baab..7ac891e635 100644 --- a/lib/irs/context.c +++ b/lib/irs/context.c @@ -42,7 +42,7 @@ #define DNS_CONF "/etc/dns.conf" #endif /* ifndef DNS_CONF */ -ISC_THREAD_LOCAL irs_context_t *irs_context = NULL; +static thread_local irs_context_t *irs_context = NULL; struct irs_context { /* diff --git a/lib/irs/include/irs/netdb.h b/lib/irs/include/irs/netdb.h new file mode 100644 index 0000000000..bf89777473 --- /dev/null +++ b/lib/irs/include/irs/netdb.h @@ -0,0 +1,190 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +/*! \file */ + +#ifndef IRS_NETDB_H +#define IRS_NETDB_H 1 + +#include /* Contractual provision. */ +#include /* Required on FreeBSD (and others?) for size_t. */ + +/* + * Undefine all #defines we are interested in as may or may not have + * defined them. + */ + +/* + * Error return codes from gethostbyname() and gethostbyaddr() + * (left in extern int h_errno). + */ + +#undef NETDB_INTERNAL +#undef NETDB_SUCCESS +#undef HOST_NOT_FOUND +#undef TRY_AGAIN +#undef NO_RECOVERY +#undef NO_DATA +#undef NO_ADDRESS + +#define NETDB_INTERNAL -1 /* see errno */ +#define NETDB_SUCCESS 0 /* no problem */ +#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ +#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ +#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ +#define NO_DATA 4 /* Valid name, no data record of requested type */ +#define NO_ADDRESS NO_DATA /* no address, look for MX record */ + +/* + * Error return codes from getaddrinfo(). EAI_INSECUREDATA is our own extension + * and it's very unlikely to be already defined, but undef it just in case; it + * at least doesn't do any harm. + */ + +#undef EAI_ADDRFAMILY +#undef EAI_AGAIN +#undef EAI_BADFLAGS +#undef EAI_FAIL +#undef EAI_FAMILY +#undef EAI_MEMORY +#undef EAI_NODATA +#undef EAI_NONAME +#undef EAI_SERVICE +#undef EAI_SOCKTYPE +#undef EAI_SYSTEM +#undef EAI_BADHINTS +#undef EAI_PROTOCOL +#undef EAI_OVERFLOW +#undef EAI_INSECUREDATA +#undef EAI_MAX + +#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ +#define EAI_AGAIN 2 /* temporary failure in name resolution */ +#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ +#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ +#define EAI_FAMILY 5 /* ai_family not supported */ +#define EAI_MEMORY 6 /* memory allocation failure */ +#define EAI_NODATA 7 /* no address associated with hostname */ +#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ +#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ +#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ +#define EAI_SYSTEM 11 /* system error returned in errno */ +#define EAI_BADHINTS 12 +#define EAI_PROTOCOL 13 +#define EAI_OVERFLOW 14 +#define EAI_INSECUREDATA 15 +#define EAI_MAX 16 + +/* + * Flag values for getaddrinfo() + */ +#undef AI_PASSIVE +#undef AI_CANONNAME +#undef AI_NUMERICHOST + +#define AI_PASSIVE 0x00000001 +#define AI_CANONNAME 0x00000002 +#define AI_NUMERICHOST 0x00000004 + +/* + * Flag values for getipnodebyname() + */ +#undef AI_V4MAPPED +#undef AI_ALL +#undef AI_ADDRCONFIG +#undef AI_DEFAULT + +#define AI_V4MAPPED 0x00000008 +#define AI_ALL 0x00000010 +#define AI_ADDRCONFIG 0x00000020 +#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) + +/* + * Constants for getnameinfo() + */ +#undef NI_MAXHOST +#undef NI_MAXSERV + +#define NI_MAXHOST 1025 +#define NI_MAXSERV 32 + +/* + * Flag values for getnameinfo() + */ +#undef NI_NOFQDN +#undef NI_NUMERICHOST +#undef NI_NAMEREQD +#undef NI_NUMERICSERV +#undef NI_DGRAM +#undef NI_NUMERICSCOPE + +#define NI_NOFQDN 0x00000001 +#define NI_NUMERICHOST 0x00000002 +#define NI_NAMEREQD 0x00000004 +#define NI_NUMERICSERV 0x00000008 +#define NI_DGRAM 0x00000010 + +/* + * Define to map into irs_ namespace. + */ + +#define IRS_NAMESPACE + +#ifdef IRS_NAMESPACE + +/* + * Use our versions not the ones from the C library. + */ + +#ifdef getnameinfo +#undef getnameinfo +#endif +#define getnameinfo irs_getnameinfo + +#ifdef getaddrinfo +#undef getaddrinfo +#endif +#define getaddrinfo irs_getaddrinfo + +#ifdef freeaddrinfo +#undef freeaddrinfo +#endif +#define freeaddrinfo irs_freeaddrinfo + +#ifdef gai_strerror +#undef gai_strerror +#endif +#define gai_strerror irs_gai_strerror + +int +getaddrinfo(const char *hostname, const char *servname, + const struct addrinfo *hints, struct addrinfo **res); + +int +getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + socklen_t hostlen, char *serv, socklen_t servlen, int flags); + +void +freeaddrinfo(struct addrinfo *ai); + +const char * +gai_strerror(int ecode); + +#endif /* IRS_NAMESPACE */ + +/* + * Tell Emacs to use C mode on this file. + * Local variables: + * mode: c + * End: + */ + +#endif /* IRS_NETDB_H */ diff --git a/lib/irs/include/irs/netdb.h.in b/lib/irs/include/irs/netdb.h.in deleted file mode 100644 index 4089f9e916..0000000000 --- a/lib/irs/include/irs/netdb.h.in +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#ifndef IRS_NETDB_H -#define IRS_NETDB_H 1 - -#include /* Required on FreeBSD (and others?) for size_t. */ -#include /* Contractual provision. */ - -/* - * Undefine all #defines we are interested in as may or may not have - * defined them. - */ - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (left in extern int h_errno). - */ - -#undef NETDB_INTERNAL -#undef NETDB_SUCCESS -#undef HOST_NOT_FOUND -#undef TRY_AGAIN -#undef NO_RECOVERY -#undef NO_DATA -#undef NO_ADDRESS - -#define NETDB_INTERNAL -1 /* see errno */ -#define NETDB_SUCCESS 0 /* no problem */ -#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ -#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ -#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define NO_DATA 4 /* Valid name, no data record of requested type */ -#define NO_ADDRESS NO_DATA /* no address, look for MX record */ - -/* - * Error return codes from getaddrinfo(). EAI_INSECUREDATA is our own extension - * and it's very unlikely to be already defined, but undef it just in case; it - * at least doesn't do any harm. - */ - -#undef EAI_ADDRFAMILY -#undef EAI_AGAIN -#undef EAI_BADFLAGS -#undef EAI_FAIL -#undef EAI_FAMILY -#undef EAI_MEMORY -#undef EAI_NODATA -#undef EAI_NONAME -#undef EAI_SERVICE -#undef EAI_SOCKTYPE -#undef EAI_SYSTEM -#undef EAI_BADHINTS -#undef EAI_PROTOCOL -#undef EAI_OVERFLOW -#undef EAI_INSECUREDATA -#undef EAI_MAX - -#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ -#define EAI_AGAIN 2 /* temporary failure in name resolution */ -#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ -#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /* ai_family not supported */ -#define EAI_MEMORY 6 /* memory allocation failure */ -#define EAI_NODATA 7 /* no address associated with hostname */ -#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ -#define EAI_SYSTEM 11 /* system error returned in errno */ -#define EAI_BADHINTS 12 -#define EAI_PROTOCOL 13 -#define EAI_OVERFLOW 14 -#define EAI_INSECUREDATA 15 -#define EAI_MAX 16 - -/* - * Flag values for getaddrinfo() - */ -#undef AI_PASSIVE -#undef AI_CANONNAME -#undef AI_NUMERICHOST - -#define AI_PASSIVE 0x00000001 -#define AI_CANONNAME 0x00000002 -#define AI_NUMERICHOST 0x00000004 - -/* - * Flag values for getipnodebyname() - */ -#undef AI_V4MAPPED -#undef AI_ALL -#undef AI_ADDRCONFIG -#undef AI_DEFAULT - -#define AI_V4MAPPED 0x00000008 -#define AI_ALL 0x00000010 -#define AI_ADDRCONFIG 0x00000020 -#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG) - -/* - * Constants for getnameinfo() - */ -#undef NI_MAXHOST -#undef NI_MAXSERV - -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 - -/* - * Flag values for getnameinfo() - */ -#undef NI_NOFQDN -#undef NI_NUMERICHOST -#undef NI_NAMEREQD -#undef NI_NUMERICSERV -#undef NI_DGRAM -#undef NI_NUMERICSCOPE - -#define NI_NOFQDN 0x00000001 -#define NI_NUMERICHOST 0x00000002 -#define NI_NAMEREQD 0x00000004 -#define NI_NUMERICSERV 0x00000008 -#define NI_DGRAM 0x00000010 - -/* - * Define to map into irs_ namespace. - */ - -#define IRS_NAMESPACE - -#ifdef IRS_NAMESPACE - -/* - * Use our versions not the ones from the C library. - */ - -#ifdef getnameinfo -#undef getnameinfo -#endif -#define getnameinfo irs_getnameinfo - -#ifdef getaddrinfo -#undef getaddrinfo -#endif -#define getaddrinfo irs_getaddrinfo - -#ifdef freeaddrinfo -#undef freeaddrinfo -#endif -#define freeaddrinfo irs_freeaddrinfo - -#ifdef gai_strerror -#undef gai_strerror -#endif -#define gai_strerror irs_gai_strerror - -int -getaddrinfo(const char *hostname, const char *servname, - const struct addrinfo *hints, struct addrinfo **res); - -int -getnameinfo(const struct sockaddr *sa, socklen_t salen, - char *host, socklen_t hostlen, - char *serv, socklen_t servlen, - int flags); - -void freeaddrinfo (struct addrinfo *ai); - -const char * -gai_strerror(int ecode); - -#endif /* IRS_NAMESPACE */ - -/* - * Tell Emacs to use C mode on this file. - * Local variables: - * mode: c - * End: - */ - -#endif /* IRS_NETDB_H */ diff --git a/lib/irs/include/irs/platform.h.in b/lib/irs/include/irs/platform.h.in deleted file mode 100644 index 5599374078..0000000000 --- a/lib/irs/include/irs/platform.h.in +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#ifndef IRS_PLATFORM_H -#define IRS_PLATFORM_H 1 - -/***** - ***** Platform-dependent defines. - *****/ - -#define LIBIRS_EXTERNAL_DATA - -/* - * Tell Emacs to use C mode on this file. - * Local Variables: - * mode: c - * End: - */ - -#endif /* IRS_PLATFORM_H */ diff --git a/lib/irs/include/irs/version.h b/lib/irs/include/irs/version.h deleted file mode 100644 index b980b4b6d5..0000000000 --- a/lib/irs/include/irs/version.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -LIBIRS_EXTERNAL_DATA extern const char irs_version[]; - -LIBIRS_EXTERNAL_DATA extern const unsigned int irs_libinterface; -LIBIRS_EXTERNAL_DATA extern const unsigned int irs_librevision; -LIBIRS_EXTERNAL_DATA extern const unsigned int irs_libage; diff --git a/lib/irs/tests/Kyuafile b/lib/irs/tests/Kyuafile deleted file mode 100644 index 466f1bff62..0000000000 --- a/lib/irs/tests/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -tap_test_program{name='resconf_test'} diff --git a/lib/irs/tests/Makefile.am b/lib/irs/tests/Makefile.am new file mode 100644 index 0000000000..5dc892cf39 --- /dev/null +++ b/lib/irs/tests/Makefile.am @@ -0,0 +1,15 @@ +include $(top_srcdir)/Makefile.top +include $(top_srcdir)/Makefile.tests + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBIRS_CFLAGS) + +LDADD += \ + $(LIBISC_LIBS) \ + $(LIBIRS_LIBS) + +check_PROGRAMS = \ + resconf_test + +TESTS = $(check_PROGRAMS) diff --git a/lib/irs/tests/resconf_test.c b/lib/irs/tests/resconf_test.c index 7304a4ba6c..2cb81f6c09 100644 --- a/lib/irs/tests/resconf_test.c +++ b/lib/irs/tests/resconf_test.c @@ -32,7 +32,7 @@ static isc_mem_t *mctx = NULL; static void -setup_test() { +setup_test(void) { isc_mem_create(&mctx); /* diff --git a/lib/irs/version.c b/lib/irs/version.c deleted file mode 100644 index 694d964a35..0000000000 --- a/lib/irs/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -const char irs_version[] = VERSION; - -const unsigned int irs_libinterface = LIBINTERFACE; -const unsigned int irs_librevision = LIBREVISION; -const unsigned int irs_libage = LIBAGE; diff --git a/lib/irs/win32/include/irs/.gitignore b/lib/irs/win32/include/irs/.gitignore index a705f39f34..734ffcd9b4 100644 --- a/lib/irs/win32/include/irs/.gitignore +++ b/lib/irs/win32/include/irs/.gitignore @@ -1,2 +1 @@ !netdb.h -!platform.h diff --git a/lib/irs/win32/include/irs/platform.h b/lib/irs/win32/include/irs/platform.h deleted file mode 100644 index 1520601c7d..0000000000 --- a/lib/irs/win32/include/irs/platform.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#ifndef IRS_PLATFORM_H -#define IRS_PLATFORM_H 1 - -/***** -***** Platform-dependent defines. -*****/ - -#ifdef LIBIRS_EXPORTS -#define LIBIRS_EXTERNAL_DATA __declspec(dllexport) -#else /* ifdef LIBIRS_EXPORTS */ -#define LIBIRS_EXTERNAL_DATA __declspec(dllimport) -#endif /* ifdef LIBIRS_EXPORTS */ - -/* - * Tell Emacs to use C mode on this file. - * Local Variables: - * mode: c - * End: - */ - -#endif /* IRS_PLATFORM_H */ diff --git a/lib/irs/win32/libirs.vcxproj.filters.in b/lib/irs/win32/libirs.vcxproj.filters.in index 0ffbc07357..670a65c18f 100644 --- a/lib/irs/win32/libirs.vcxproj.filters.in +++ b/lib/irs/win32/libirs.vcxproj.filters.in @@ -21,9 +21,6 @@ Source Files - - Source Files - Source Files @@ -53,17 +50,11 @@ Header Files - - Header Files - Header Files Header Files - - Header Files - diff --git a/lib/irs/win32/libirs.vcxproj.in b/lib/irs/win32/libirs.vcxproj.in index 7ca472a6c7..0f24284d8e 100644 --- a/lib/irs/win32/libirs.vcxproj.in +++ b/lib/irs/win32/libirs.vcxproj.in @@ -125,16 +125,13 @@ - - - diff --git a/lib/irs/win32/version.c b/lib/irs/win32/version.c deleted file mode 100644 index 76179c1087..0000000000 --- a/lib/irs/win32/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include - -LIBIRS_EXTERNAL_DATA const char irs_version[] = VERSION; - -LIBIRS_EXTERNAL_DATA const unsigned int irs_libinterface = LIBINTERFACE; -LIBIRS_EXTERNAL_DATA const unsigned int irs_librevision = LIBREVISION; -LIBIRS_EXTERNAL_DATA const unsigned int irs_libage = LIBAGE; diff --git a/lib/isc/Kyuafile b/lib/isc/Kyuafile deleted file mode 100644 index 0739e3a60c..0000000000 --- a/lib/isc/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('tests/Kyuafile') diff --git a/lib/isc/Makefile.am b/lib/isc/Makefile.am new file mode 100644 index 0000000000..cb6d6b7d77 --- /dev/null +++ b/lib/isc/Makefile.am @@ -0,0 +1,251 @@ +include $(top_srcdir)/Makefile.top + +lib_LTLIBRARIES = libisc.la + +libisc_ladir = $(includedir)/isc +libisc_la_HEADERS = \ + include/isc/aes.h \ + include/isc/app.h \ + include/isc/assertions.h \ + include/isc/astack.h \ + include/isc/atomic.h \ + include/isc/attributes.h \ + include/isc/backtrace.h \ + include/isc/base32.h \ + include/isc/base64.h \ + include/isc/bind9.h \ + include/isc/buffer.h \ + include/isc/bufferlist.h \ + include/isc/commandline.h \ + include/isc/counter.h \ + include/isc/crc64.h \ + include/isc/deprecated.h \ + include/isc/endian.h \ + include/isc/errno.h \ + include/isc/error.h \ + include/isc/event.h \ + include/isc/eventclass.h \ + include/isc/file.h \ + include/isc/formatcheck.h \ + include/isc/fsaccess.h \ + include/isc/fuzz.h \ + include/isc/glob.h \ + include/isc/hash.h \ + include/isc/heap.h \ + include/isc/hex.h \ + include/isc/hmac.h \ + include/isc/hp.h \ + include/isc/ht.h \ + include/isc/httpd.h \ + include/isc/interfaceiter.h \ + include/isc/iterated_hash.h \ + include/isc/lang.h \ + include/isc/lex.h \ + include/isc/lfsr.h \ + include/isc/lib.h \ + include/isc/likely.h \ + include/isc/list.h \ + include/isc/log.h \ + include/isc/magic.h \ + include/isc/md.h \ + include/isc/mem.h \ + include/isc/meminfo.h \ + include/isc/mutexatomic.h \ + include/isc/mutexblock.h \ + include/isc/netaddr.h \ + include/isc/netmgr.h \ + include/isc/netscope.h \ + include/isc/nonce.h \ + include/isc/os.h \ + include/isc/parseint.h \ + include/isc/pool.h \ + include/isc/portset.h \ + include/isc/platform.h \ + include/isc/print.h \ + include/isc/queue.h \ + include/isc/quota.h \ + include/isc/radix.h \ + include/isc/random.h \ + include/isc/ratelimiter.h \ + include/isc/refcount.h \ + include/isc/regex.h \ + include/isc/region.h \ + include/isc/resource.h \ + include/isc/result.h \ + include/isc/resultclass.h \ + include/isc/rwlock.h \ + include/isc/safe.h \ + include/isc/serial.h \ + include/isc/siphash.h \ + include/isc/sockaddr.h \ + include/isc/socket.h \ + include/isc/stats.h \ + include/isc/stdio.h \ + include/isc/strerr.h \ + include/isc/string.h \ + include/isc/symtab.h \ + include/isc/task.h \ + include/isc/taskpool.h \ + include/isc/timer.h \ + include/isc/tm.h \ + include/isc/types.h \ + include/isc/util.h \ + pthreads/include/isc/condition.h\ + pthreads/include/isc/mutex.h \ + pthreads/include/isc/once.h \ + pthreads/include/isc/thread.h \ + unix/include/isc/align.h \ + unix/include/isc/dir.h \ + unix/include/isc/netdb.h \ + unix/include/isc/net.h \ + unix/include/isc/offset.h \ + unix/include/isc/stat.h \ + unix/include/isc/stdatomic.h \ + unix/include/isc/stdtime.h \ + unix/include/isc/syslog.h \ + unix/include/isc/time.h + +pk11dir = $(includedir)/pk11 +pk11_HEADERS = \ + include/pk11/constants.h \ + include/pk11/internal.h \ + include/pk11/pk11.h \ + include/pk11/result.h \ + include/pk11/site.h + +pkcs11dir = $(includedir)/pkcs11 +pkcs11_HEADERS = \ + include/pkcs11/pkcs11.h + +libisc_la_SOURCES = \ + $(libisc_la_HEADERS) \ + $(pk11_HEADERS) \ + $(pkcs11_HEADERS) \ + netmgr/netmgr-int.h \ + netmgr/netmgr.c \ + netmgr/tcp.c \ + netmgr/tcpdns.c \ + netmgr/udp.c \ + netmgr/uv-compat.c \ + netmgr/uv-compat.h \ + netmgr/uverr2result.c \ + unix/pk11_api.c \ + unix/dir.c \ + unix/errno.c \ + unix/errno2result.c \ + unix/file.c \ + unix/fsaccess.c \ + unix/interfaceiter.c \ + unix/meminfo.c \ + unix/net.c \ + unix/os.c \ + unix/resource.c \ + unix/socket.c \ + unix/stdio.c \ + unix/stdtime.c \ + unix/syslog.c \ + unix/time.c \ + pk11.c \ + pk11_result.c \ + aes.c \ + app.c \ + assertions.c \ + astack.c \ + backtrace.c \ + base32.c \ + base64.c \ + bind9.c \ + buffer.c \ + bufferlist.c \ + commandline.c \ + counter.c \ + crc64.c \ + entropy.c \ + error.c \ + event.c \ + glob.c \ + hash.c \ + hp.c \ + ht.c \ + heap.c \ + hex.c \ + hmac.c \ + httpd.c \ + iterated_hash.c \ + lex.c \ + lfsr.c \ + lib.c \ + log.c \ + md.c \ + mem.c \ + mutexblock.c \ + netaddr.c \ + netscope.c \ + nonce.c \ + openssl_shim.c \ + queue.c \ + openssl_shim.h \ + pool.c \ + parseint.c \ + portset.c \ + quota.c \ + radix.c \ + random.c \ + ratelimiter.c \ + region.c \ + regex.c \ + result.c \ + rwlock.c \ + safe.c \ + serial.c \ + siphash.c \ + sockaddr.c \ + stats.c \ + string.c \ + symtab.c \ + task.c \ + taskpool.c \ + timer.c \ + tm.c \ + pthreads/condition.c \ + pthreads/mutex.c \ + pthreads/thread.c \ + entropy_private.h \ + mem_p.h \ + task_p.h \ + timer_p.h + +libisc_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBUV_CFLAGS) \ + $(OPENSSL_CFLAGS) \ + $(ZLIB_CFLAGS) + +libisc_la_LDFLAGS = \ + $(libisc_VERSION_INFO) + +libisc_la_LIBADD = \ + $(LIBUV_LIBS) \ + $(OPENSSL_LIBS) \ + $(ZLIB_LIBS) + +if HAVE_JSON_C +libisc_la_CPPFLAGS += \ + $(JSON_C_CFLAGS) + +libisc_la_LIBADD += \ + $(JSON_C_LIBS) +endif HAVE_JSON_C + +if HAVE_LIBXML2 +libisc_la_CPPFLAGS += \ + $(LIBXML2_CFLAGS) + +libisc_la_LIBADD += \ + $(LIBXML2_LIBS) +endif HAVE_LIBXML2 + +if HAVE_CMOCKA +SUBDIRS = tests +endif diff --git a/lib/isc/app.c b/lib/isc/app.c index 28f46568c7..3211d7785f 100644 --- a/lib/isc/app.c +++ b/lib/isc/app.c @@ -369,7 +369,7 @@ isc_app_run(void) { } bool -isc_app_isrunning() { +isc_app_isrunning(void) { return (atomic_load_acquire(&is_running)); } diff --git a/lib/isc/assertions.c b/lib/isc/assertions.c index c2ca5f46a1..0215fd3a67 100644 --- a/lib/isc/assertions.c +++ b/lib/isc/assertions.c @@ -96,16 +96,17 @@ default_callback(const char *file, int line, isc_assertiontype_t type, const char *cond) { void *tracebuf[BACKTRACE_MAXFRAME]; int nframes; - const char *logsuffix = "."; + bool have_backtrace = false; isc_result_t result; result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes); if (result == ISC_R_SUCCESS && nframes > 0) { - logsuffix = ", back trace"; + have_backtrace = true; } fprintf(stderr, "%s:%d: %s(%s) failed%s\n", file, line, - isc_assertion_typetotext(type), cond, logsuffix); + isc_assertion_typetotext(type), cond, + (have_backtrace) ? ", back trace" : "."); if (result == ISC_R_SUCCESS) { #if HAVE_BACKTRACE_SYMBOLS diff --git a/lib/isc/hp.c b/lib/isc/hp.c index 2eb7827d59..b19366da96 100644 --- a/lib/isc/hp.c +++ b/lib/isc/hp.c @@ -66,7 +66,7 @@ static int isc__hp_max_retired = HP_MAX_THREADS * HP_MAX_HPS; static atomic_int_fast32_t tid_v_base = ATOMIC_VAR_INIT(0); -ISC_THREAD_LOCAL int tid_v = TID_UNKNOWN; +static thread_local int tid_v = TID_UNKNOWN; typedef struct retirelist { int size; @@ -82,7 +82,7 @@ struct isc_hp { }; static inline int -tid() { +tid(void) { if (tid_v == TID_UNKNOWN) { tid_v = atomic_fetch_add(&tid_v_base, 1); REQUIRE(tid_v < isc__hp_max_threads); diff --git a/lib/isc/include/isc/assertions.h b/lib/isc/include/isc/assertions.h index 2c409eb7ff..a688b62b8d 100644 --- a/lib/isc/include/isc/assertions.h +++ b/lib/isc/include/isc/assertions.h @@ -12,9 +12,9 @@ /*! \file isc/assertions.h */ -#ifndef ISC_ASSERTIONS_H -#define ISC_ASSERTIONS_H 1 +#pragma once +#include #include #include #include @@ -33,10 +33,9 @@ typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t, const char *); /* coverity[+kill] */ -ISC_PLATFORM_NORETURN_PRE +ISC_NORETURN void -isc_assertion_failed(const char *, int, isc_assertiontype_t, - const char *) ISC_PLATFORM_NORETURN_POST; +isc_assertion_failed(const char *, int, isc_assertiontype_t, const char *); void isc_assertion_setcallback(isc_assertioncallback_t); @@ -68,5 +67,3 @@ isc_assertion_typetotext(isc_assertiontype_t type); 0))) ISC_LANG_ENDDECLS - -#endif /* ISC_ASSERTIONS_H */ diff --git a/lib/dns/version.c b/lib/isc/include/isc/attributes.h similarity index 56% rename from lib/dns/version.c rename to lib/isc/include/isc/attributes.h index 629a5847ae..8f291f4969 100644 --- a/lib/dns/version.c +++ b/lib/isc/include/isc/attributes.h @@ -9,14 +9,18 @@ * information regarding copyright ownership. */ -/*! \file */ +#pragma once -#include +#ifdef _WIN32 +#define __attribute__(attribute) /* do nothing */ +#else +#define __declspec(modifier) /* do nothing */ +#endif -const char dns_version[] = VERSION; -const char dns_major[] = MAJOR; -const char dns_mapapi[] = MAPAPI; - -const unsigned int dns_libinterface = LIBINTERFACE; -const unsigned int dns_librevision = LIBREVISION; -const unsigned int dns_libage = LIBAGE; +#if HAVE_FUNC_ATTRIBUTE_NORETURN +#define ISC_NORETURN __attribute__((noreturn)) +#elif _WIN32 +#define ISC_NORETURN __declspec(noreturn) +#else +#define ISC_NORETURN +#endif diff --git a/lib/isc/include/isc/error.h b/lib/isc/include/isc/error.h index 316fea41fb..be1449e199 100644 --- a/lib/isc/include/isc/error.h +++ b/lib/isc/include/isc/error.h @@ -16,6 +16,7 @@ #include +#include #include #include #include @@ -37,14 +38,12 @@ isc_error_unexpected(const char *, int, const char *, ...) ISC_FORMAT_PRINTF(3, 4); /*% fatal error */ -ISC_PLATFORM_NORETURN_PRE void -isc_error_fatal(const char *, int, const char *, ...) - ISC_FORMAT_PRINTF(3, 4) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +isc_error_fatal(const char *, int, const char *, ...) ISC_FORMAT_PRINTF(3, 4); /*% runtimecheck error */ -ISC_PLATFORM_NORETURN_PRE void -isc_error_runtimecheck(const char *, int, - const char *) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +isc_error_runtimecheck(const char *, int, const char *); #define ISC_ERROR_RUNTIMECHECK(cond) \ ((void)(ISC_LIKELY(cond) || \ diff --git a/lib/isc/include/isc/netaddr.h b/lib/isc/include/isc/netaddr.h index aa6efe06a0..a84979224c 100644 --- a/lib/isc/include/isc/netaddr.h +++ b/lib/isc/include/isc/netaddr.h @@ -21,10 +21,10 @@ #include #include -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 #include #include -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ ISC_LANG_BEGINDECLS @@ -33,9 +33,9 @@ struct isc_netaddr { union { struct in_addr in; struct in6_addr in6; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 char un[sizeof(((struct sockaddr_un *)0)->sun_path)]; -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } type; uint32_t zone; }; diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in index 68c0103834..dcda32d251 100644 --- a/lib/isc/include/isc/platform.h.in +++ b/lib/isc/include/isc/platform.h.in @@ -46,35 +46,6 @@ *** Miscellaneous. ***/ -/* - * Defined to or for how to include - * the GSSAPI header. - */ -@ISC_PLATFORM_GSSAPIHEADER@ - -/* - * Defined to or for how to - * include the GSSAPI KRB5 header. - */ -@ISC_PLATFORM_GSSAPI_KRB5_HEADER@ - -/* - * Defined to or for how to include - * the KRB5 header. - */ -@ISC_PLATFORM_KRB5HEADER@ - -/* - * Define if the platform has . - */ -@ISC_PLATFORM_HAVESYSUNH@ - -/* - * Defines for the noreturn attribute. - */ -@ISC_PLATFORM_NORETURN_PRE@ -@ISC_PLATFORM_NORETURN_POST@ - /*** *** Windows dll support. ***/ diff --git a/lib/isc/include/isc/sockaddr.h b/lib/isc/include/isc/sockaddr.h index 846c86cb26..f677fee633 100644 --- a/lib/isc/include/isc/sockaddr.h +++ b/lib/isc/include/isc/sockaddr.h @@ -19,9 +19,9 @@ #include #include #include -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 #include -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ struct isc_sockaddr { union { @@ -29,9 +29,9 @@ struct isc_sockaddr { struct sockaddr_in sin; struct sockaddr_in6 sin6; struct sockaddr_storage ss; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 struct sockaddr_un sunix; -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } type; unsigned int length; /* XXXRTH beginning? */ ISC_LINK(struct isc_sockaddr) link; diff --git a/lib/isc/include/isc/version.h b/lib/isc/include/isc/version.h deleted file mode 100644 index 77bf076bac..0000000000 --- a/lib/isc/include/isc/version.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file isc/version.h */ - -#include - -LIBISC_EXTERNAL_DATA extern const char isc_version[]; - -LIBISC_EXTERNAL_DATA extern const unsigned int isc_libinterface; -LIBISC_EXTERNAL_DATA extern const unsigned int isc_librevision; -LIBISC_EXTERNAL_DATA extern const unsigned int isc_libage; diff --git a/lib/isc/include/pk11/pk11.h b/lib/isc/include/pk11/pk11.h index d1c7761c20..20ec2b280c 100644 --- a/lib/isc/include/pk11/pk11.h +++ b/lib/isc/include/pk11/pk11.h @@ -9,14 +9,14 @@ * information regarding copyright ownership. */ -#ifndef PK11_PK11_H -#define PK11_PK11_H 1 +#pragma once /*! \file pk11/pk11.h */ #include #include +#include #include #include #include @@ -134,9 +134,9 @@ isc_result_t pk11_parse_uri(pk11_object_t *obj, const char *label, isc_mem_t *mctx, pk11_optype_t optype); -ISC_PLATFORM_NORETURN_PRE void +ISC_NORETURN void pk11_error_fatalcheck(const char *file, int line, const char *funcname, - CK_RV rv) ISC_PLATFORM_NORETURN_POST; + CK_RV rv); void pk11_dump_tokens(void); @@ -284,5 +284,3 @@ pkcs_C_GenerateRandom(CK_SESSION_HANDLE hSession, CK_BYTE_PTR RandomData, CK_ULONG ulRandomLen); ISC_LANG_ENDDECLS - -#endif /* PK11_PK11_H */ diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c index ed3fd13bb2..8d3ee2e4f1 100644 --- a/lib/isc/netaddr.c +++ b/lib/isc/netaddr.c @@ -49,13 +49,13 @@ isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b) { return (false); } break; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 case AF_UNIX: if (strcmp(a->type.un, b->type.un) != 0) { return (false); } break; -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ default: return (false); } @@ -142,7 +142,7 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) { case AF_INET6: type = &netaddr->type.in6; break; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 case AF_UNIX: alen = strlen(netaddr->type.un); if (alen > isc_buffer_availablelength(target)) { @@ -152,7 +152,7 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) { (const unsigned char *)(netaddr->type.un), alen); return (ISC_R_SUCCESS); -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ default: return (ISC_R_FAILURE); } @@ -312,7 +312,7 @@ isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6) { isc_result_t isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) { -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 if (strlen(path) > sizeof(netaddr->type.un) - 1) { return (ISC_R_NOSPACE); } @@ -322,11 +322,11 @@ isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) { strlcpy(netaddr->type.un, path, sizeof(netaddr->type.un)); netaddr->zone = 0; return (ISC_R_SUCCESS); -#else /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#else /* ifndef _WIN32 */ UNUSED(netaddr); UNUSED(path); return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } void @@ -355,12 +355,12 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) { memmove(&t->type.in6, &s->type.sin6.sin6_addr, 16); t->zone = s->type.sin6.sin6_scope_id; break; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 case AF_UNIX: memmove(t->type.un, s->type.sunix.sun_path, sizeof(t->type.un)); t->zone = 0; break; -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ default: INSIST(0); ISC_UNREACHABLE(); diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 53882c5d0b..180d3336f9 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -116,7 +116,7 @@ static const isc_statscounter_t unixstatsindex[] = { * request using async_cb. */ -ISC_THREAD_LOCAL int isc__nm_tid_v = ISC_NETMGR_TID_UNKNOWN; +static thread_local int isc__nm_tid_v = ISC_NETMGR_TID_UNKNOWN; static void nmsocket_maybe_destroy(isc_nmsocket_t *sock); @@ -130,12 +130,12 @@ static void process_queue(isc__networker_t *worker, isc_queue_t *queue); int -isc_nm_tid() { +isc_nm_tid(void) { return (isc__nm_tid_v); } bool -isc__nm_in_netthread() { +isc__nm_in_netthread(void) { return (isc__nm_tid_v >= 0); } diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index ed951c5d71..4f73620d8e 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -36,7 +36,7 @@ static atomic_uint_fast32_t last_tcpquota_log = ATOMIC_VAR_INIT(0); static bool -can_log_tcp_quota() { +can_log_tcp_quota(void) { isc_stdtime_t now, last; isc_stdtime_get(&now); diff --git a/lib/isc/pthreads/include/isc/thread.h b/lib/isc/pthreads/include/isc/thread.h index 79f3e96ce2..9dd30d58c2 100644 --- a/lib/isc/pthreads/include/isc/thread.h +++ b/lib/isc/pthreads/include/isc/thread.h @@ -9,12 +9,14 @@ * information regarding copyright ownership. */ -#ifndef ISC_THREAD_H -#define ISC_THREAD_H 1 +#pragma once /*! \file */ #include +#if HAVE_THREADS_H +#include +#endif #if defined(HAVE_PTHREAD_NP_H) #include @@ -50,23 +52,4 @@ isc_thread_setaffinity(int cpu); #define isc_thread_self (unsigned long)pthread_self -/*** - *** Thread-Local Storage - ***/ - -#if defined(HAVE_TLS) -#if defined(HAVE_THREAD_LOCAL) -#include -#define ISC_THREAD_LOCAL static thread_local -#elif defined(HAVE___THREAD) -#define ISC_THREAD_LOCAL static __thread -#else /* if defined(HAVE_THREAD_LOCAL) */ -#error "Unknown method for defining a TLS variable!" -#endif /* if defined(HAVE_THREAD_LOCAL) */ -#else /* if defined(HAVE_TLS) */ -#error "Thread-local storage support is required!" -#endif /* if defined(HAVE_TLS) */ - ISC_LANG_ENDDECLS - -#endif /* ISC_THREAD_H */ diff --git a/lib/isc/random.c b/lib/isc/random.c index 02b92260db..aec88370ad 100644 --- a/lib/isc/random.c +++ b/lib/isc/random.c @@ -60,7 +60,7 @@ */ #include "xoshiro128starstar.c" -ISC_THREAD_LOCAL isc_once_t isc_random_once = ISC_ONCE_INIT; +static thread_local isc_once_t isc_random_once = ISC_ONCE_INIT; static void isc_random_initialize(void) { diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c index 6fb4c69cf7..8472739281 100644 --- a/lib/isc/sockaddr.c +++ b/lib/isc/sockaddr.c @@ -137,7 +137,7 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) { snprintf(pbuf, sizeof(pbuf), "%u", ntohs(sockaddr->type.sin6.sin6_port)); break; -#ifdef ISC_PLAFORM_HAVESYSUNH +#ifndef _WIN32 case AF_UNIX: plen = strlen(sockaddr->type.sunix.sun_path); if (plen >= isc_buffer_availablelength(target)) { @@ -154,7 +154,7 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) { avail.base[0] = '\0'; return (ISC_R_SUCCESS); -#endif /* ifdef ISC_PLAFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ default: return (ISC_R_FAILURE); } @@ -465,7 +465,7 @@ isc_sockaddr_isnetzero(const isc_sockaddr_t *sockaddr) { isc_result_t isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) { -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 if (strlen(path) >= sizeof(sockaddr->type.sunix.sun_path)) { return (ISC_R_NOSPACE); } @@ -475,11 +475,11 @@ isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) { strlcpy(sockaddr->type.sunix.sun_path, path, sizeof(sockaddr->type.sunix.sun_path)); return (ISC_R_SUCCESS); -#else /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#else /* ifndef _WIN32 */ UNUSED(sockaddr); UNUSED(path); return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } isc_result_t @@ -493,11 +493,11 @@ isc_sockaddr_fromsockaddr(isc_sockaddr_t *isa, const struct sockaddr *sa) { case AF_INET6: length = sizeof(isa->type.sin6); break; -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 case AF_UNIX: length = sizeof(isa->type.sunix); break; -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ default: return (ISC_R_NOTIMPLEMENTED); } diff --git a/lib/isc/tests/Kyuafile b/lib/isc/tests/Kyuafile deleted file mode 100644 index d07b11f543..0000000000 --- a/lib/isc/tests/Kyuafile +++ /dev/null @@ -1,31 +0,0 @@ -syntax(2) -test_suite('bind9') - -tap_test_program{name='aes_test'} -tap_test_program{name='buffer_test'} -tap_test_program{name='counter_test'} -tap_test_program{name='errno_test'} -tap_test_program{name='file_test'} -tap_test_program{name='hash_test'} -tap_test_program{name='heap_test'} -tap_test_program{name='hmac_test'} -tap_test_program{name='ht_test'} -tap_test_program{name='lex_test'} -tap_test_program{name='md_test'} -tap_test_program{name='mem_test'} -tap_test_program{name='netaddr_test'} -tap_test_program{name='parse_test'} -tap_test_program{name='pool_test'} -tap_test_program{name='radix_test'} -tap_test_program{name='quota_test'} -tap_test_program{name='regex_test'} -tap_test_program{name='result_test'} -tap_test_program{name='safe_test'} -tap_test_program{name='siphash_test'} -tap_test_program{name='sockaddr_test'} -tap_test_program{name='socket_test'} -tap_test_program{name='symtab_test'} -tap_test_program{name='task_test'} -tap_test_program{name='taskpool_test'} -tap_test_program{name='time_test'} -tap_test_program{name='timer_test'} diff --git a/lib/isc/tests/Makefile.am b/lib/isc/tests/Makefile.am new file mode 100644 index 0000000000..9a0dc87e29 --- /dev/null +++ b/lib/isc/tests/Makefile.am @@ -0,0 +1,65 @@ +include $(top_srcdir)/Makefile.top +include $(top_srcdir)/Makefile.tests + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) + +LDADD += \ + libisctest.la \ + $(LIBISC_LIBS) + +noinst_LTLIBRARIES = libisctest.la +libisctest_la_SOURCES = isctest.c isctest.h + +check_PROGRAMS = \ + aes_test \ + buffer_test \ + counter_test \ + crc64_test \ + errno_test \ + file_test \ + hash_test \ + heap_test \ + hmac_test \ + ht_test \ + lex_test \ + md_test \ + mem_test \ + netaddr_test \ + parse_test \ + pool_test \ + quota_test \ + radix_test \ + random_test \ + regex_test \ + result_test \ + safe_test \ + sockaddr_test \ + socket_test \ + symtab_test \ + task_test \ + taskpool_test \ + time_test \ + timer_test + +TESTS = $(check_PROGRAMS) + +hmac_test_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(OPENSSL_CFLAGS) + +hmac_test_LDADD = \ + $(LDADD) \ + $(OPENSSL_LIBS) + +md_test_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(OPENSSL_CFLAGS) + +md_test_LDADD = \ + $(LDADD) \ + $(OPENSSL_LIBS) + +random_test_LDADD = \ + $(LDADD) \ + -lm diff --git a/lib/isc/tests/ht_test.c b/lib/isc/tests/ht_test.c index 4c07c02730..212735b66d 100644 --- a/lib/isc/tests/ht_test.c +++ b/lib/isc/tests/ht_test.c @@ -195,7 +195,7 @@ test_ht_full(int bits, uintptr_t count) { } static void -test_ht_iterator() { +test_ht_iterator(void) { isc_ht_t *ht = NULL; isc_result_t result; isc_ht_iter_t *iter = NULL; diff --git a/lib/isc/unix/net.c b/lib/isc/unix/net.c index bf11cccaf5..8dcbec049d 100644 --- a/lib/isc/unix/net.c +++ b/lib/isc/unix/net.c @@ -191,9 +191,9 @@ static void initialize_action(void) { ipv4_result = try_proto(PF_INET); ipv6_result = try_proto(PF_INET6); -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 unix_result = try_proto(PF_UNIX); -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } static void @@ -418,7 +418,7 @@ make_nonblock(int fd) { ret = ioctl(fd, FIONBIO, (char *)&on); #else /* ifdef USE_FIONBIO_IOCTL */ flags = fcntl(fd, F_GETFL, 0); - flags |= PORT_NONBLOCK; + flags |= O_NONBLOCK; ret = fcntl(fd, F_SETFL, flags); #endif /* ifdef USE_FIONBIO_IOCTL */ diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index da2b7d0153..2a749e4c99 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -58,9 +59,6 @@ #include #include -#ifdef ISC_PLATFORM_HAVESYSUNH -#include -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ #ifdef HAVE_KQUEUE #include #endif /* ifdef HAVE_KQUEUE */ @@ -1002,7 +1000,7 @@ make_nonblock(int fd) { ret = ioctl(fd, FIONBIO, (char *)&on); #else /* ifdef USE_FIONBIO_IOCTL */ flags = fcntl(fd, F_GETFL, 0); - flags |= PORT_NONBLOCK; + flags |= O_NONBLOCK; ret = fcntl(fd, F_SETFL, flags); #endif /* ifdef USE_FIONBIO_IOCTL */ @@ -4199,7 +4197,7 @@ isc_socket_sendto2(isc_socket_t *sock0, isc_region_t *region, isc_task_t *task, void isc_socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) { -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 int s; struct stat sb; char strbuf[ISC_STRERRORSIZE]; @@ -4324,16 +4322,16 @@ isc_socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) { } cleanup: close(s); -#else /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#else /* ifndef _WIN32 */ UNUSED(sockaddr); UNUSED(active); -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } isc_result_t isc_socket_permunix(const isc_sockaddr_t *sockaddr, uint32_t perm, uint32_t owner, uint32_t group) { -#ifdef ISC_PLATFORM_HAVESYSUNH +#ifndef _WIN32 isc_result_t result = ISC_R_SUCCESS; char strbuf[ISC_STRERRORSIZE]; char path[sizeof(sockaddr->type.sunix.sun_path)]; @@ -4375,13 +4373,13 @@ isc_socket_permunix(const isc_sockaddr_t *sockaddr, uint32_t perm, result = ISC_R_FAILURE; } return (result); -#else /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#else /* ifndef _WIN32 */ UNUSED(sockaddr); UNUSED(perm); UNUSED(owner); UNUSED(group); return (ISC_R_NOTIMPLEMENTED); -#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */ +#endif /* ifndef _WIN32 */ } isc_result_t @@ -5280,7 +5278,7 @@ static isc_once_t hasreuseport_once = ISC_ONCE_INIT; static bool hasreuseport = false; static void -init_hasreuseport() { +init_hasreuseport(void) { /* * SO_REUSEPORT works very differently on *BSD and on Linux (because why not). * We only want to use it on Linux, if it's available. On BSD we want to dup() @@ -5318,7 +5316,7 @@ init_hasreuseport() { } bool -isc_socket_hasreuseport() { +isc_socket_hasreuseport(void) { RUNTIME_CHECK(isc_once_do(&hasreuseport_once, init_hasreuseport) == ISC_R_SUCCESS); return (hasreuseport); diff --git a/lib/isc/version.c b/lib/isc/version.c deleted file mode 100644 index 025bb5f7e1..0000000000 --- a/lib/isc/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -const char isc_version[] = VERSION; - -const unsigned int isc_libinterface = LIBINTERFACE; -const unsigned int isc_librevision = LIBREVISION; -const unsigned int isc_libage = LIBAGE; diff --git a/lib/isc/win32/include/isc/platform.h.in b/lib/isc/win32/include/isc/platform.h.in index cce2bb513e..41eecd94aa 100644 --- a/lib/isc/win32/include/isc/platform.h.in +++ b/lib/isc/win32/include/isc/platform.h.in @@ -16,18 +16,12 @@ ***** Platform-dependent defines. *****/ -#if _MSC_VER > 1400 -#define HAVE_TLS 1 -#define HAVE___DECLSPEC_THREAD 1 -#endif - /* * Some compatibility cludges */ -#if defined(_WIN32) || defined(_WIN64) /* We are on Windows */ -# define strtok_r strtok_s +#define strtok_r strtok_s #define ISC_STRERRORSIZE 128 @@ -40,14 +34,6 @@ typedef uint32_t socklen_t; #endif -#endif - -/* - * Remove __attribute__ ((foo)) on Windows - */ - -#define __attribute__(attribute) /* do nothing */ - /* * Limits */ @@ -66,17 +52,6 @@ typedef uint32_t socklen_t; #undef MSG_TRUNC -/* - * Define if the platform has . - */ -#undef ISC_PLATFORM_HAVESYSUNH - -/* - * Defines for the noreturn attribute. - */ -#define ISC_PLATFORM_NORETURN_PRE __declspec(noreturn) -#define ISC_PLATFORM_NORETURN_POST - /* * Set up a macro for importing and exporting from the DLL */ diff --git a/lib/isc/win32/include/isc/stdatomic.h b/lib/isc/win32/include/isc/stdatomic.h index eb22a80665..aa028ceae2 100644 --- a/lib/isc/win32/include/isc/stdatomic.h +++ b/lib/isc/win32/include/isc/stdatomic.h @@ -105,7 +105,7 @@ typedef uintptr_t volatile atomic_uintptr_t; #endif /* ifdef _WIN64 */ static inline void -atomic_store_abort() { +atomic_store_abort(void) { INSIST(0); ISC_UNREACHABLE(); } @@ -159,7 +159,7 @@ atomic_store_abort() { #endif /* ifdef _WIN64 */ static inline int8_t -atomic_load_abort() { +atomic_load_abort(void) { INSIST(0); ISC_UNREACHABLE(); } @@ -220,7 +220,7 @@ atomic_load_abort() { #endif /* ifdef _WIN64 */ static inline int8_t -atomic_add_abort() { +atomic_add_abort(void) { INSIST(0); ISC_UNREACHABLE(); } @@ -281,7 +281,7 @@ atomic_add_abort() { #endif /* ifdef _WIN64 */ static inline int8_t -atomic_and_abort() { +atomic_and_abort(void) { INSIST(0); ISC_UNREACHABLE(); } @@ -336,7 +336,7 @@ atomic_and_abort() { #endif /* ifdef _WIN64 */ static inline int8_t -atomic_or_abort() { +atomic_or_abort(void) { INSIST(0); ISC_UNREACHABLE(); } @@ -451,7 +451,7 @@ atomic_compare_exchange_strong_explicit64(atomic_int_fast64_t *obj, } static inline bool -atomic_compare_exchange_abort() { +atomic_compare_exchange_abort(void) { INSIST(0); ISC_UNREACHABLE(); } @@ -486,7 +486,7 @@ atomic_compare_exchange_abort() { memory_order_seq_cst) static inline bool -atomic_exchange_abort() { +atomic_exchange_abort(void) { INSIST(0); ISC_UNREACHABLE(); } diff --git a/lib/isc/win32/include/isc/thread.h b/lib/isc/win32/include/isc/thread.h index 9ce612217a..304d149a53 100644 --- a/lib/isc/win32/include/isc/thread.h +++ b/lib/isc/win32/include/isc/thread.h @@ -87,11 +87,7 @@ isc_thread_setaffinity(int cpu); #define isc_thread_yield() Sleep(0) -#if HAVE___DECLSPEC_THREAD -#define ISC_THREAD_LOCAL static __declspec(thread) -#else /* if HAVE___DECLSPEC_THREAD */ -#error "Thread-local storage support is required!" -#endif /* if HAVE___DECLSPEC_THREAD */ +#define thread_local __declspec(thread) ISC_LANG_ENDDECLS diff --git a/lib/isc/win32/libisc.vcxproj.filters.in b/lib/isc/win32/libisc.vcxproj.filters.in index 5e8d0b40bd..249e5271e3 100644 --- a/lib/isc/win32/libisc.vcxproj.filters.in +++ b/lib/isc/win32/libisc.vcxproj.filters.in @@ -266,9 +266,6 @@ Library Header Files - - Library Header Files - @IF PKCS11 Library Header Files @@ -435,9 +432,6 @@ Win32 Source Files - - Win32 Source Files - Win32 Source Files diff --git a/lib/isc/win32/libisc.vcxproj.in b/lib/isc/win32/libisc.vcxproj.in index b9c09da842..aafc24a276 100644 --- a/lib/isc/win32/libisc.vcxproj.in +++ b/lib/isc/win32/libisc.vcxproj.in @@ -372,7 +372,6 @@ copy InstallFiles ..\Build\Release\ - @IF PKCS11 @@ -499,7 +498,6 @@ copy InstallFiles ..\Build\Release\ - @IF PKCS11 diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index c93a635654..487515e003 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -3672,7 +3672,7 @@ isc_socket_socketevent(isc_mem_t *mctx, void *sender, isc_eventtype_t eventtype, } bool -isc_socket_hasreuseport() { +isc_socket_hasreuseport(void) { return (false); } diff --git a/lib/isc/win32/unistd.h b/lib/isc/win32/unistd.h index aa68088ecf..0df49d3b1e 100644 --- a/lib/isc/win32/unistd.h +++ b/lib/isc/win32/unistd.h @@ -10,8 +10,7 @@ */ /* None of these are defined in NT, so define them for our use */ -#define O_NONBLOCK 1 -#define PORT_NONBLOCK O_NONBLOCK +#define O_NONBLOCK 1 /* * fcntl() commands diff --git a/lib/isc/win32/version.c b/lib/isc/win32/version.c deleted file mode 100644 index 6a2a5afbf9..0000000000 --- a/lib/isc/win32/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include - -LIBISC_EXTERNAL_DATA const char isc_version[] = VERSION; - -LIBISC_EXTERNAL_DATA const unsigned int isc_libinterface = LIBINTERFACE; -LIBISC_EXTERNAL_DATA const unsigned int isc_librevision = LIBREVISION; -LIBISC_EXTERNAL_DATA const unsigned int isc_libage = LIBAGE; diff --git a/lib/isc/xoshiro128starstar.c b/lib/isc/xoshiro128starstar.c index 88f9a9c7d1..ba14e48dad 100644 --- a/lib/isc/xoshiro128starstar.c +++ b/lib/isc/xoshiro128starstar.c @@ -34,7 +34,7 @@ * * The state must be seeded so that it is not everywhere zero. */ -ISC_THREAD_LOCAL uint32_t seed[4] = { 0 }; +static thread_local uint32_t seed[4] = { 0 }; static inline uint32_t rotl(const uint32_t x, int k) { diff --git a/lib/isccc/Kyuafile b/lib/isccc/Kyuafile deleted file mode 100644 index 0739e3a60c..0000000000 --- a/lib/isccc/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('tests/Kyuafile') diff --git a/lib/isccc/Makefile.am b/lib/isccc/Makefile.am new file mode 100644 index 0000000000..017f822a32 --- /dev/null +++ b/lib/isccc/Makefile.am @@ -0,0 +1,42 @@ +include $(top_srcdir)/Makefile.top + +lib_LTLIBRARIES = libisccc.la + +libisccc_ladir = $(includedir)/isccc +libisccc_la_HEADERS = \ + include/isccc/alist.h \ + include/isccc/base64.h \ + include/isccc/cc.h \ + include/isccc/ccmsg.h \ + include/isccc/events.h \ + include/isccc/result.h \ + include/isccc/sexpr.h \ + include/isccc/symtab.h \ + include/isccc/symtype.h \ + include/isccc/types.h \ + include/isccc/util.h + +libisccc_la_SOURCES = \ + $(libisccc_la_HEADERS) \ + alist.c \ + base64.c \ + cc.c \ + ccmsg.c \ + result.c \ + sexpr.c \ + symtab.c + +libisccc_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBISCCC_CFLAGS) + +libisccc_la_LIBADD = \ + $(LIBISC_LIBS) + +libisccc_la_LDFLAGS = \ + $(libisccc_VERSION_INFO) + +if HAVE_CMOCKA +SUBDIRS = tests +endif diff --git a/lib/isccc/include/isccc/version.h b/lib/isccc/include/isccc/version.h deleted file mode 100644 index 4a1036cf87..0000000000 --- a/lib/isccc/include/isccc/version.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file isccc/version.h */ - -#include - -LIBISCCC_EXTERNAL_DATA extern const char isccc_version[]; - -LIBISCCC_EXTERNAL_DATA extern const unsigned int isccc_libinterface; -LIBISCCC_EXTERNAL_DATA extern const unsigned int isccc_librevision; -LIBISCCC_EXTERNAL_DATA extern const unsigned int isccc_libage; diff --git a/lib/isccc/tests/Kyuafile b/lib/isccc/tests/Kyuafile deleted file mode 100644 index ce23ab8fc3..0000000000 --- a/lib/isccc/tests/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -tap_test_program{name='result_test'} diff --git a/lib/isccc/tests/Makefile.am b/lib/isccc/tests/Makefile.am new file mode 100644 index 0000000000..000e5c8d42 --- /dev/null +++ b/lib/isccc/tests/Makefile.am @@ -0,0 +1,15 @@ +include $(top_srcdir)/Makefile.top +include $(top_srcdir)/Makefile.tests + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBISCCC_CFLAGS) + +LDADD += \ + $(LIBISC_LIBS) \ + $(LIBISCCC_LIBS) + +check_PROGRAMS = \ + result_test + +TESTS = $(check_PROGRAMS) diff --git a/lib/isccc/version.c b/lib/isccc/version.c deleted file mode 100644 index 25e26a838b..0000000000 --- a/lib/isccc/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -const char isccc_version[] = VERSION; - -const unsigned int isccc_libinterface = LIBINTERFACE; -const unsigned int isccc_librevision = LIBREVISION; -const unsigned int isccc_libage = LIBAGE; diff --git a/lib/isccc/win32/libisccc.vcxproj.filters.in b/lib/isccc/win32/libisccc.vcxproj.filters.in index 1d1ff10372..dda104217a 100644 --- a/lib/isccc/win32/libisccc.vcxproj.filters.in +++ b/lib/isccc/win32/libisccc.vcxproj.filters.in @@ -21,9 +21,6 @@ Source Files - - Source Files - Source Files @@ -80,8 +77,5 @@ Header Files - - Header Files - diff --git a/lib/isccc/win32/libisccc.vcxproj.in b/lib/isccc/win32/libisccc.vcxproj.in index 98f1305afa..2ad7474781 100644 --- a/lib/isccc/win32/libisccc.vcxproj.in +++ b/lib/isccc/win32/libisccc.vcxproj.in @@ -126,7 +126,6 @@ - @@ -140,7 +139,6 @@ - diff --git a/lib/isccc/win32/version.c b/lib/isccc/win32/version.c deleted file mode 100644 index acbbcd07a7..0000000000 --- a/lib/isccc/win32/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include - -LIBISCCC_EXTERNAL_DATA const char isccc_version[] = VERSION; - -LIBISCCC_EXTERNAL_DATA const unsigned int isccc_libinterface = LIBINTERFACE; -LIBISCCC_EXTERNAL_DATA const unsigned int isccc_librevision = LIBREVISION; -LIBISCCC_EXTERNAL_DATA const unsigned int isccc_libage = LIBAGE; diff --git a/lib/isccfg/Kyuafile b/lib/isccfg/Kyuafile deleted file mode 100644 index 0739e3a60c..0000000000 --- a/lib/isccfg/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('tests/Kyuafile') diff --git a/lib/isccfg/Makefile.am b/lib/isccfg/Makefile.am new file mode 100644 index 0000000000..bd337f67ae --- /dev/null +++ b/lib/isccfg/Makefile.am @@ -0,0 +1,39 @@ +include $(top_srcdir)/Makefile.top + +lib_LTLIBRARIES = libisccfg.la + +libisccfg_ladir = $(includedir)/isccfg +libisccfg_la_HEADERS = \ + include/isccfg/aclconf.h \ + include/isccfg/cfg.h \ + include/isccfg/dnsconf.h \ + include/isccfg/grammar.h \ + include/isccfg/kaspconf.h \ + include/isccfg/log.h \ + include/isccfg/namedconf.h + +libisccfg_la_SOURCES = \ + $(libisccfg_la_HEADERS) \ + aclconf.c \ + dnsconf.c \ + kaspconf.c \ + log.c \ + namedconf.c \ + parser.c + +libisccfg_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISCCFG_CFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) + +libisccfg_la_LIBADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) + +libisccfg_la_LDFLAGS = \ + $(libisccfg_VERSION_INFO) + +if HAVE_CMOCKA +SUBDIRS = tests +endif diff --git a/lib/isccfg/include/isccfg/version.h b/lib/isccfg/include/isccfg/version.h deleted file mode 100644 index 30ca02d953..0000000000 --- a/lib/isccfg/include/isccfg/version.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file isccfg/version.h */ - -#include - -LIBISCCFG_EXTERNAL_DATA extern const char cfg_version[]; - -LIBISCCFG_EXTERNAL_DATA extern const unsigned int cfg_libinterface; -LIBISCCFG_EXTERNAL_DATA extern const unsigned int cfg_librevision; -LIBISCCFG_EXTERNAL_DATA extern const unsigned int cfg_libage; diff --git a/lib/isccfg/tests/Kyuafile b/lib/isccfg/tests/Kyuafile deleted file mode 100644 index 89d50352f2..0000000000 --- a/lib/isccfg/tests/Kyuafile +++ /dev/null @@ -1,5 +0,0 @@ -syntax(2) -test_suite('bind9') - -tap_test_program{name='duration_test'} -tap_test_program{name='parser_test'} diff --git a/lib/isccfg/tests/Makefile.am b/lib/isccfg/tests/Makefile.am new file mode 100644 index 0000000000..9f31441bb2 --- /dev/null +++ b/lib/isccfg/tests/Makefile.am @@ -0,0 +1,17 @@ +include $(top_srcdir)/Makefile.top +include $(top_srcdir)/Makefile.tests + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBISCCFG_CFLAGS) + +LDADD += \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBISCCFG_LIBS) + +check_PROGRAMS = \ + parser_test + +TESTS = $(check_PROGRAMS) diff --git a/lib/isccfg/tests/duration_test.c b/lib/isccfg/tests/duration_test.c index 44234152a5..6c7e20898f 100644 --- a/lib/isccfg/tests/duration_test.c +++ b/lib/isccfg/tests/duration_test.c @@ -54,7 +54,7 @@ static isc_logcategory_t categories[] = { { "", 0 }, { NULL, 0 } }; static void -cleanup() { +cleanup(void) { if (lctx != NULL) { isc_log_destroy(&lctx); } @@ -64,7 +64,7 @@ cleanup() { } static isc_result_t -setup() { +setup(void) { isc_result_t result; isc_mem_debugging |= ISC_MEM_DEBUGRECORD; diff --git a/lib/isccfg/tests/parser_test.c b/lib/isccfg/tests/parser_test.c index f5ac432462..e218927704 100644 --- a/lib/isccfg/tests/parser_test.c +++ b/lib/isccfg/tests/parser_test.c @@ -54,7 +54,7 @@ static isc_logcategory_t categories[] = { { "", 0 }, { NULL, 0 } }; static void -cleanup() { +cleanup(void) { if (lctx != NULL) { isc_log_destroy(&lctx); } @@ -64,7 +64,7 @@ cleanup() { } static isc_result_t -setup() { +setup(void) { isc_result_t result; isc_mem_debugging |= ISC_MEM_DEBUGRECORD; diff --git a/lib/isccfg/version.c b/lib/isccfg/version.c deleted file mode 100644 index 21b65bd9c6..0000000000 --- a/lib/isccfg/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -const char cfg_version[] = VERSION; - -const unsigned int cfg_libinterface = LIBINTERFACE; -const unsigned int cfg_librevision = LIBREVISION; -const unsigned int cfg_libage = LIBAGE; diff --git a/lib/isccfg/win32/libisccfg.vcxproj.filters.in b/lib/isccfg/win32/libisccfg.vcxproj.filters.in index 91d4202d7e..70aebf1879 100644 --- a/lib/isccfg/win32/libisccfg.vcxproj.filters.in +++ b/lib/isccfg/win32/libisccfg.vcxproj.filters.in @@ -21,9 +21,6 @@ Source Files - - Source Files - Source Files @@ -65,8 +62,5 @@ Header Files - - Header Files - diff --git a/lib/isccfg/win32/libisccfg.vcxproj.in b/lib/isccfg/win32/libisccfg.vcxproj.in index 8f2b38c973..07571f91ca 100644 --- a/lib/isccfg/win32/libisccfg.vcxproj.in +++ b/lib/isccfg/win32/libisccfg.vcxproj.in @@ -125,7 +125,6 @@ - @@ -135,7 +134,6 @@ - diff --git a/lib/isccfg/win32/version.c b/lib/isccfg/win32/version.c deleted file mode 100644 index a65667667b..0000000000 --- a/lib/isccfg/win32/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include - -LIBISCCFG_EXTERNAL_DATA const char cfg_version[] = VERSION; - -LIBISCCFG_EXTERNAL_DATA const unsigned int cfg_libinterface = LIBINTERFACE; -LIBISCCFG_EXTERNAL_DATA const unsigned int cfg_librevision = LIBREVISION; -LIBISCCFG_EXTERNAL_DATA const unsigned int cfg_libage = LIBAGE; diff --git a/lib/ns/Kyuafile b/lib/ns/Kyuafile deleted file mode 100644 index 0739e3a60c..0000000000 --- a/lib/ns/Kyuafile +++ /dev/null @@ -1,4 +0,0 @@ -syntax(2) -test_suite('bind9') - -include('tests/Kyuafile') diff --git a/lib/ns/Makefile.am b/lib/ns/Makefile.am new file mode 100644 index 0000000000..adafb78204 --- /dev/null +++ b/lib/ns/Makefile.am @@ -0,0 +1,59 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + -DNAMED_PLUGINDIR=\"$(libdir)/named\" + +lib_LTLIBRARIES = libns.la + +libns_ladir = $(includedir)/ns + +libns_la_HEADERS = \ + include/ns/client.h \ + include/ns/hooks.h \ + include/ns/interfacemgr.h \ + include/ns/lib.h \ + include/ns/listenlist.h \ + include/ns/log.h \ + include/ns/notify.h \ + include/ns/query.h \ + include/ns/server.h \ + include/ns/sortlist.h \ + include/ns/stats.h \ + include/ns/types.h \ + include/ns/update.h \ + include/ns/xfrout.h + +libns_la_SOURCES = \ + $(libns_la_HEADERS) \ + client.c \ + hooks.c \ + interfacemgr.c \ + lib.c \ + listenlist.c \ + log.c \ + notify.c \ + query.c \ + server.c \ + sortlist.c \ + stats.c \ + update.c \ + xfrout.c + +libns_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBNS_CFLAGS) \ + $(LIBLTDL_CFLAGS) + +libns_la_LIBADD = \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBLTDL_LIBS) + +libns_la_LDFLAGS = \ + $(libns_VERSION_INFO) + +if HAVE_CMOCKA +SUBDIRS = tests +endif diff --git a/lib/ns/hooks.c b/lib/ns/hooks.c index 8719acefac..a95f54b7a8 100644 --- a/lib/ns/hooks.c +++ b/lib/ns/hooks.c @@ -12,15 +12,10 @@ /*! \file */ #include +#include #include #include -#if HAVE_DLFCN_H -#include -#elif _WIN32 -#include -#endif /* if HAVE_DLFCN_H */ - #include #include #include @@ -95,7 +90,6 @@ ns_plugin_expandpath(const char *src, char *dst, size_t dstsize) { } } -#if HAVE_DLFCN_H && HAVE_DLOPEN static isc_result_t load_symbol(void *handle, const char *modpath, const char *symbol_name, void **symbolp) { @@ -111,10 +105,10 @@ load_symbol(void *handle, const char *modpath, const char *symbol_name, * this ensures that we'll report the correct error condition * if there is one.) */ - dlerror(); - symbol = dlsym(handle, symbol_name); + lt_dlerror(); + symbol = lt_dlsym(handle, symbol_name); if (symbol == NULL) { - const char *errmsg = dlerror(); + const char *errmsg = lt_dlerror(); if (errmsg == NULL) { errmsg = "returned function pointer is NULL"; } @@ -134,24 +128,23 @@ load_symbol(void *handle, const char *modpath, const char *symbol_name, static isc_result_t load_plugin(isc_mem_t *mctx, const char *modpath, ns_plugin_t **pluginp) { isc_result_t result; - void *handle = NULL; + lt_dlhandle handle = NULL; ns_plugin_t *plugin = NULL; ns_plugin_check_t *check_func = NULL; ns_plugin_register_t *register_func = NULL; ns_plugin_destroy_t *destroy_func = NULL; ns_plugin_version_t *version_func = NULL; - int version, flags; + int version; REQUIRE(pluginp != NULL && *pluginp == NULL); - flags = RTLD_LAZY | RTLD_LOCAL; -#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ - flags |= RTLD_DEEPBIND; -#endif /* if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ */ + if (lt_dlinit() != 0) { + return (ISC_R_FAILURE); + } - handle = dlopen(modpath, flags); + handle = lt_dlopen(modpath); if (handle == NULL) { - const char *errmsg = dlerror(); + const char *errmsg = lt_dlerror(); if (errmsg == NULL) { errmsg = "unknown error"; } @@ -210,127 +203,8 @@ cleanup: sizeof(*plugin)); } - (void)dlclose(handle); - } - - return (result); -} - -static void -unload_plugin(ns_plugin_t **pluginp) { - ns_plugin_t *plugin = NULL; - - REQUIRE(pluginp != NULL && *pluginp != NULL); - - plugin = *pluginp; - *pluginp = NULL; - - isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, - ISC_LOG_DEBUG(1), "unloading plugin '%s'", - plugin->modpath); - - if (plugin->inst != NULL) { - plugin->destroy_func(&plugin->inst); - } - if (plugin->handle != NULL) { - (void)dlclose(plugin->handle); - } - if (plugin->modpath != NULL) { - isc_mem_free(plugin->mctx, plugin->modpath); - } - - isc_mem_putanddetach(&plugin->mctx, plugin, sizeof(*plugin)); -} -#elif _WIN32 -static isc_result_t -load_symbol(HMODULE handle, const char *modpath, const char *symbol_name, - void **symbolp) { - void *symbol = NULL; - - REQUIRE(handle != NULL); - REQUIRE(symbolp != NULL && *symbolp == NULL); - - symbol = GetProcAddress(handle, symbol_name); - if (symbol == NULL) { - int errstatus = GetLastError(); - isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, - NS_LOGMODULE_HOOKS, ISC_LOG_ERROR, - "failed to look up symbol %s in " - "plugin '%s': %d", - symbol_name, modpath, errstatus); - return (ISC_R_FAILURE); - } - - *symbolp = symbol; - - return (ISC_R_SUCCESS); -} - -static isc_result_t -load_plugin(isc_mem_t *mctx, const char *modpath, ns_plugin_t **pluginp) { - isc_result_t result; - HMODULE handle; - ns_plugin_t *plugin = NULL; - ns_plugin_register_t *register_func = NULL; - ns_plugin_destroy_t *destroy_func = NULL; - ns_plugin_version_t *version_func = NULL; - int version; - - REQUIRE(pluginp != NULL && *pluginp == NULL); - - handle = LoadLibraryA(modpath); - if (handle == NULL) { - CHECK(ISC_R_FAILURE); - } - - CHECK(load_symbol(handle, modpath, "plugin_version", - (void **)&version_func)); - - version = version_func(); - if (version < (NS_PLUGIN_VERSION - NS_PLUGIN_AGE) || - version > NS_PLUGIN_VERSION) - { - isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, - NS_LOGMODULE_HOOKS, ISC_LOG_ERROR, - "plugin API version mismatch: %d/%d", version, - NS_PLUGIN_VERSION); - CHECK(ISC_R_FAILURE); - } - - CHECK(load_symbol(handle, modpath, "plugin_register", - (void **)®ister_func)); - CHECK(load_symbol(handle, modpath, "plugin_destroy", - (void **)&destroy_func)); - - plugin = isc_mem_get(mctx, sizeof(*plugin)); - memset(plugin, 0, sizeof(*plugin)); - isc_mem_attach(mctx, &plugin->mctx); - plugin->handle = handle; - plugin->modpath = isc_mem_strdup(plugin->mctx, modpath); - plugin->register_func = register_func; - plugin->destroy_func = destroy_func; - - ISC_LINK_INIT(plugin, link); - - *pluginp = plugin; - plugin = NULL; - -cleanup: - if (result != ISC_R_SUCCESS) { - isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, - NS_LOGMODULE_HOOKS, ISC_LOG_ERROR, - "failed to dynamically load " - "plugin '%s': %d (%s)", - modpath, GetLastError(), - isc_result_totext(result)); - - if (plugin != NULL) { - isc_mem_putanddetach(&plugin->mctx, plugin, - sizeof(*plugin)); - } - if (handle != NULL) { - FreeLibrary(handle); + (void)lt_dlclose(handle); } } @@ -354,33 +228,14 @@ unload_plugin(ns_plugin_t **pluginp) { plugin->destroy_func(&plugin->inst); } if (plugin->handle != NULL) { - FreeLibrary(plugin->handle); + (void)lt_dlclose(plugin->handle); } - if (plugin->modpath != NULL) { isc_mem_free(plugin->mctx, plugin->modpath); } isc_mem_putanddetach(&plugin->mctx, plugin, sizeof(*plugin)); } -#else /* HAVE_DLFCN_H || _WIN32 */ -static isc_result_t -load_plugin(isc_mem_t *mctx, const char *modpath, ns_plugin_t **pluginp) { - UNUSED(mctx); - UNUSED(modpath); - UNUSED(pluginp); - - isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, - ISC_LOG_ERROR, "plugin support is not implemented"); - - return (ISC_R_NOTIMPLEMENTED); -} - -static void -unload_plugin(ns_plugin_t **pluginp) { - UNUSED(pluginp); -} -#endif /* HAVE_DLFCN_H */ isc_result_t ns_plugin_register(const char *modpath, const char *parameters, const void *cfg, diff --git a/lib/ns/include/ns/version.h b/lib/ns/include/ns/version.h deleted file mode 100644 index bcb93319e2..0000000000 --- a/lib/ns/include/ns/version.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file include/ns/version.h */ - -#include - -LIBNS_EXTERNAL_DATA extern const char ns_version[]; - -LIBNS_EXTERNAL_DATA extern const unsigned int ns_libinterface; -LIBNS_EXTERNAL_DATA extern const unsigned int ns_librevision; -LIBNS_EXTERNAL_DATA extern const unsigned int ns_libage; diff --git a/lib/ns/query.c b/lib/ns/query.c index 46f1b59c89..8f1a8b1162 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -5782,7 +5782,7 @@ static atomic_uint_fast32_t last_soft, last_hard; #ifdef ISC_MUTEX_ATOMICS static isc_once_t last_once = ISC_ONCE_INIT; static void -last_init() { +last_init(void) { atomic_init(&last_soft, 0); atomic_init(&last_hard, 0); } diff --git a/lib/ns/tests/Kyuafile b/lib/ns/tests/Kyuafile deleted file mode 100644 index adf0b88ca7..0000000000 --- a/lib/ns/tests/Kyuafile +++ /dev/null @@ -1,7 +0,0 @@ -syntax(2) -test_suite('bind9') - -tap_test_program{name='listenlist_test'} -tap_test_program{name='notify_test'} -tap_test_program{name='plugin_test'} -tap_test_program{name='query_test'} diff --git a/lib/ns/tests/Makefile.am b/lib/ns/tests/Makefile.am new file mode 100644 index 0000000000..76145db571 --- /dev/null +++ b/lib/ns/tests/Makefile.am @@ -0,0 +1,45 @@ +include $(top_srcdir)/Makefile.top +include $(top_srcdir)/Makefile.tests + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBNS_CFLAGS) + +LDADD += \ + libnstest.la \ + $(LIBISC_LIBS) \ + $(LIBDNS_LIBS) \ + $(LIBNS_LIBS) + +check_LTLIBRARIES = libnstest.la +libnstest_la_SOURCES = nstest.c nstest.h +check_PROGRAMS = \ + listenlist_test \ + plugin_test + +TESTS = $(check_PROGRAMS) + +if HAVE_LD_WRAP + +check_PROGRAMS += \ + notify_test \ + query_test + +notify_test_SOURCES = \ + notify_test.c \ + wrap.c + +notify_test_LDFLAGS = \ + $(LDFLAGS) \ + -Wl,--wrap=isc_nmhandle_unref + +query_test_SOURCES = \ + query_test.c \ + wrap.c + +query_test_LDFLAGS = \ + $(LDFLAGS) \ + -Wl,--wrap=isc_nmhandle_unref + +endif diff --git a/lib/ns/tests/plugin_test.c b/lib/ns/tests/plugin_test.c index 2e6c6240e2..02f39508c3 100644 --- a/lib/ns/tests/plugin_test.c +++ b/lib/ns/tests/plugin_test.c @@ -23,14 +23,15 @@ #define UNIT_TESTING #include +#include #include #include #include #include #include -ISC_PLATFORM_NORETURN_PRE void -_fail(const char *const file, const int line) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN void +_fail(const char *const file, const int line); #include diff --git a/lib/ns/win32/libns.vcxproj.filters b/lib/ns/win32/libns.vcxproj.filters index 2931412cbf..ac8950d637 100644 --- a/lib/ns/win32/libns.vcxproj.filters +++ b/lib/ns/win32/libns.vcxproj.filters @@ -60,9 +60,6 @@ Source Files - - Source Files - @@ -104,11 +101,8 @@ Header Files - - Header Files - Header Files - \ No newline at end of file + diff --git a/lib/ns/win32/libns.vcxproj.in b/lib/ns/win32/libns.vcxproj.in index c7728e7a3d..125699e16e 100644 --- a/lib/ns/win32/libns.vcxproj.in +++ b/lib/ns/win32/libns.vcxproj.in @@ -131,7 +131,6 @@ - @@ -147,7 +146,6 @@ - diff --git a/lib/ns/win32/version.c b/lib/ns/win32/version.c deleted file mode 100644 index f506fa1ddb..0000000000 --- a/lib/ns/win32/version.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -#include - -LIBNS_EXTERNAL_DATA const char ns_version[] = VERSION; -LIBNS_EXTERNAL_DATA const char ns_major[] = MAJOR; -LIBNS_EXTERNAL_DATA const char ns_mapapi[] = MAPAPI; - -LIBNS_EXTERNAL_DATA const unsigned int ns_libinterface = LIBINTERFACE; -LIBNS_EXTERNAL_DATA const unsigned int ns_librevision = LIBREVISION; -LIBNS_EXTERNAL_DATA const unsigned int ns_libage = LIBAGE; diff --git a/lib/samples/.gitignore b/lib/samples/.gitignore index b132e89060..3d14fb9600 100644 --- a/lib/samples/.gitignore +++ b/lib/samples/.gitignore @@ -1,4 +1,3 @@ -Makefile-postinstall nsprobe process resolve diff --git a/lib/samples/Makefile-postinstall.in b/lib/samples/Makefile-postinstall.in deleted file mode 100644 index f87f4c93d9..0000000000 --- a/lib/samples/Makefile-postinstall.in +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -srcdir = @srcdir@ -#prefix = @prefix@ -#exec_prefix = @exec_prefix@ - -CDEFINES = -CWARNINGS = - -DNSLIBS = -ldns @DNS_CRYPTO_LIBS@ -ISCLIBS = -lisc @OPENSSL_LIBS@ @LIBXML2_LIBS@ -ISCCFGLIBS = -lisccfg -IRSLIBS = -lirs - -LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ - -SUBDIRS = - -TARGETS = sample@EXEEXT@ sample-async@EXEEXT@ sample-gai@EXEEXT@ \ - sample-update@EXEEXT@ sample-request@EXEEXT@ nsprobe@EXEEXT@ - -OBJS = sample.@O@ sample-async.@O@ sample-gai.@O@ sample-update.@O@ \ - sample-request.@O@ nsprobe.@O@ - -SRCS = sample.c sample-async.c sample-gai.c sample-update.c \ - sample-request.c nsprobe.c - -@BIND9_MAKE_RULES@ - -# The following two may depend on BIND9_MAKE_RULES -CINCLUDES = -I@export_includedir@ -LDFLAGS = -L@export_libdir@ - -sample@EXEEXT@: sample.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample.@O@ ${LIBS} - -sample-async@EXEEXT@: sample-async.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-async.@O@ ${LIBS} - -sample-gai@EXEEXT@: sample-gai.@O@ ${IRSDEPLIBS} ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-gai.@O@ ${IRSLIBS} ${LIBS} - -sample-update@EXEEXT@: sample-update.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-update.@O@ ${LIBS} - -sample-request@EXEEXT@: sample-request.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - sample-request.@O@ ${LIBS} - -nsprobe@EXEEXT@: nsprobe.@O@ ${DEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - nsprobe.@O@ ${LIBS} - -clean distclean maintainer-clean:: - rm -f ${TARGETS} diff --git a/lib/samples/Makefile.am b/lib/samples/Makefile.am new file mode 100644 index 0000000000..6f18fcd536 --- /dev/null +++ b/lib/samples/Makefile.am @@ -0,0 +1,32 @@ +include $(top_srcdir)/Makefile.top + +AM_CPPFLAGS += \ + $(LIBISC_CFLAGS) \ + $(LIBDNS_CFLAGS) \ + $(LIBIRS_CFLAGS) + +noinst_PROGRAMS = \ + resolve \ + sample-async \ + sample-gai \ + sample-update \ + sample-request \ + nsprobe + +resolve_SOURCES = resolve.c +resolve_LDADD = $(LIBISC_LIBS) $(LIBIRS_LIBS) $(LIBDNS_LIBS) + +sample_async_SOURCES = sample-async.c +sample_async_LDADD = $(LIBISC_LIBS) $(LIBDNS_LIBS) + +sample_gai_SOURCES = sample-gai.c +sample_gai_LDADD = $(LIBIRS_LIBS) + +sample_update_SOURCES = sample-update.c +sample_update_LDADD = $(LIBISC_LIBS) $(LIBDNS_LIBS) + +sample_request_SOURCES = sample-request.c +sample_request_LDADD = $(LIBISC_LIBS) $(LIBDNS_LIBS) + +nsprobe_SOURCES = nsprobe.c +nsprobe_LDADD = $(LIBISC_LIBS) $(LIBDNS_LIBS) diff --git a/lib/samples/nsprobe.c b/lib/samples/nsprobe.c index 5ac09c8b67..debf75165a 100644 --- a/lib/samples/nsprobe.c +++ b/lib/samples/nsprobe.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -1038,8 +1039,8 @@ cleanup: return (result); } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { diff --git a/lib/samples/resolve.c b/lib/samples/resolve.c index 1466635083..cdfe07f104 100644 --- a/lib/samples/resolve.c +++ b/lib/samples/resolve.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -79,8 +80,8 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner) { return (ISC_R_SUCCESS); } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { diff --git a/lib/samples/sample-async.c b/lib/samples/sample-async.c index 302d31212d..769a5382e7 100644 --- a/lib/samples/sample-async.c +++ b/lib/samples/sample-async.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -252,8 +253,8 @@ cleanup: return (result); } -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { diff --git a/lib/samples/sample-request.c b/lib/samples/sample-request.c index d3290c4b55..8c15c8d5c3 100644 --- a/lib/samples/sample-request.c +++ b/lib/samples/sample-request.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -50,8 +51,8 @@ static isc_mem_t *mctx; static dns_fixedname_t fixedqname; -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { diff --git a/lib/samples/sample-update.c b/lib/samples/sample-update.c index 1ed3d7bd45..4d46590b82 100644 --- a/lib/samples/sample-update.c +++ b/lib/samples/sample-update.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -68,8 +69,8 @@ update_addordelete(isc_mem_t *mctx, char *cmdline, bool isdelete, static void evaluate_prereq(isc_mem_t *mctx, char *cmdline, dns_name_t *name); -ISC_PLATFORM_NORETURN_PRE static void -usage(void) ISC_PLATFORM_NORETURN_POST; +ISC_NORETURN static void +usage(void); static void usage(void) { diff --git a/m4/ax_bind9_lib_version.m4 b/m4/ax_bind9_lib_version.m4 new file mode 100644 index 0000000000..dd08f6b7d7 --- /dev/null +++ b/m4/ax_bind9_lib_version.m4 @@ -0,0 +1,10 @@ +AC_DEFUN([AX_BIND9_LIB_VERSION], + [AS_IF([test -z "$SED"], + [AC_PROG_SED]) + AS_IF([test -z "$SED"], + [AC_MSG_ERROR([sed not found, but required, set \$SED to sed])]) + ax_bind9_lib$1_current=`$SED -n "s,^LIBINTERFACE = \(.*\),\1,p" "$srcdir/lib/$1/api"` + ax_bind9_lib$1_revision=`$SED -n "s,^LIBREVISION = \(.*\),\1,p" "$srcdir/lib/$1/api"` + ax_bind9_lib$1_age=`$SED -n "s,^LIBAGE = \(.*\),\1,p" "$srcdir/lib/$1/api"` + AC_SUBST([lib$1_VERSION_INFO],["-version-info $ax_bind9_lib$1_current:$ax_bind9_lib$1_revision:$ax_bind9_lib$1_age]") + ]) diff --git a/m4/ax_gcc_func_attribute.m4 b/m4/ax_gcc_func_attribute.m4 new file mode 100644 index 0000000000..c926439721 --- /dev/null +++ b/m4/ax_gcc_func_attribute.m4 @@ -0,0 +1,242 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE) +# +# DESCRIPTION +# +# This macro checks if the compiler supports one of GCC's function +# attributes; many other compilers also provide function attributes with +# the same syntax. Compiler warnings are used to detect supported +# attributes as unsupported ones are ignored by default so quieting +# warnings when using this macro will yield false positives. +# +# The ATTRIBUTE parameter holds the name of the attribute to be checked. +# +# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_. +# +# The macro caches its result in the ax_cv_have_func_attribute_ +# variable. +# +# The macro currently supports the following function attributes: +# +# alias +# aligned +# alloc_size +# always_inline +# artificial +# cold +# const +# constructor +# constructor_priority for constructor attribute with priority +# deprecated +# destructor +# dllexport +# dllimport +# error +# externally_visible +# fallthrough +# flatten +# format +# format_arg +# gnu_format +# gnu_inline +# hot +# ifunc +# leaf +# malloc +# noclone +# noinline +# nonnull +# noreturn +# nothrow +# optimize +# pure +# sentinel +# sentinel_position +# unused +# used +# visibility +# warning +# warn_unused_result +# weak +# weakref +# +# Unsupported function attributes will be tested with a prototype +# returning an int and not accepting any arguments and the result of the +# check might be wrong or meaningless so use with care. +# +# LICENSE +# +# Copyright (c) 2013 Gabriele Svelto +# +# 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 + +AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [ + AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1]) + + AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([ + m4_case([$1], + [alias], [ + int foo( void ) { return 0; } + int bar( void ) __attribute__(($1("foo"))); + ], + [aligned], [ + int foo( void ) __attribute__(($1(32))); + ], + [alloc_size], [ + void *foo(int a) __attribute__(($1(1))); + ], + [always_inline], [ + inline __attribute__(($1)) int foo( void ) { return 0; } + ], + [artificial], [ + inline __attribute__(($1)) int foo( void ) { return 0; } + ], + [cold], [ + int foo( void ) __attribute__(($1)); + ], + [const], [ + int foo( void ) __attribute__(($1)); + ], + [constructor_priority], [ + int foo( void ) __attribute__((__constructor__(65535/2))); + ], + [constructor], [ + int foo( void ) __attribute__(($1)); + ], + [deprecated], [ + int foo( void ) __attribute__(($1(""))); + ], + [destructor], [ + int foo( void ) __attribute__(($1)); + ], + [dllexport], [ + __attribute__(($1)) int foo( void ) { return 0; } + ], + [dllimport], [ + int foo( void ) __attribute__(($1)); + ], + [error], [ + int foo( void ) __attribute__(($1(""))); + ], + [externally_visible], [ + int foo( void ) __attribute__(($1)); + ], + [fallthrough], [ + int foo( void ) {switch (0) { case 1: __attribute__(($1)); case 2: break ; }}; + ], + [flatten], [ + int foo( void ) __attribute__(($1)); + ], + [format], [ + int foo(const char *p, ...) __attribute__(($1(printf, 1, 2))); + ], + [gnu_format], [ + int foo(const char *p, ...) __attribute__((format(gnu_printf, 1, 2))); + ], + [format_arg], [ + char *foo(const char *p) __attribute__(($1(1))); + ], + [gnu_inline], [ + inline __attribute__(($1)) int foo( void ) { return 0; } + ], + [hot], [ + int foo( void ) __attribute__(($1)); + ], + [ifunc], [ + int my_foo( void ) { return 0; } + static int (*resolve_foo(void))(void) { return my_foo; } + int foo( void ) __attribute__(($1("resolve_foo"))); + ], + [leaf], [ + __attribute__(($1)) int foo( void ) { return 0; } + ], + [malloc], [ + void *foo( void ) __attribute__(($1)); + ], + [noclone], [ + int foo( void ) __attribute__(($1)); + ], + [noinline], [ + __attribute__(($1)) int foo( void ) { return 0; } + ], + [nonnull], [ + int foo(char *p) __attribute__(($1(1))); + ], + [noreturn], [ + void foo( void ) __attribute__(($1)); + ], + [nothrow], [ + int foo( void ) __attribute__(($1)); + ], + [optimize], [ + __attribute__(($1(3))) int foo( void ) { return 0; } + ], + [pure], [ + int foo( void ) __attribute__(($1)); + ], + [sentinel], [ + int foo(void *p, ...) __attribute__(($1)); + ], + [sentinel_position], [ + int foo(void *p, ...) __attribute__(($1(1))); + ], + [returns_nonnull], [ + void *foo( void ) __attribute__(($1)); + ], + [unused], [ + int foo( void ) __attribute__(($1)); + ], + [used], [ + int foo( void ) __attribute__(($1)); + ], + [visibility], [ + int foo_def( void ) __attribute__(($1("default"))); + int foo_hid( void ) __attribute__(($1("hidden"))); + int foo_int( void ) __attribute__(($1("internal"))); + int foo_pro( void ) __attribute__(($1("protected"))); + ], + [warning], [ + int foo( void ) __attribute__(($1(""))); + ], + [warn_unused_result], [ + int foo( void ) __attribute__(($1)); + ], + [weak], [ + int foo( void ) __attribute__(($1)); + ], + [weakref], [ + static int foo( void ) { return 0; } + static int bar( void ) __attribute__(($1("foo"))); + ], + [ + m4_warn([syntax], [Unsupported attribute $1, the test may fail]) + int foo( void ) __attribute__(($1)); + ] + )], []) + ], + dnl GCC doesn't exit with an error if an unknown attribute is + dnl provided but only outputs a warning, so accept the attribute + dnl only if no warning were issued. + [AS_IF([test -s conftest.err], + [AS_VAR_SET([ac_var], [no])], + [AS_VAR_SET([ac_var], [yes])])], + [AS_VAR_SET([ac_var], [no])]) + ]) + + AS_IF([test yes = AS_VAR_GET([ac_var])], + [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1, + [Define to 1 if the system has the `$1' function attribute])], []) + + AS_VAR_POPDEF([ac_var]) +]) diff --git a/m4/ax_perl_module.m4 b/m4/ax_perl_module.m4 new file mode 100644 index 0000000000..9b636e6cf5 --- /dev/null +++ b/m4/ax_perl_module.m4 @@ -0,0 +1,31 @@ +# +# SYNOPSIS +# +# AX_PERL_MODULE(MODULE[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# Checks for Perl module. +# +# LICENSE +# +# Copyright (c) 2020 Internet Systems Consortium +# +# 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. + +AC_DEFUN([AX_PERL_MODULE],[ + AC_MSG_CHECKING([for perl module: $1]) + $PERL "-M$1" -e exit >/dev/null 2>&1 + AS_IF([test $? -eq 0], + [AC_MSG_RESULT([yes]) + eval AS_TR_CPP(HAVE_PERLMOD_$1)=yes + $2 + ], + [AC_MSG_RESULT([no]) + eval AS_TR_CPP(HAVE_PERLMOD_$1)=no + $3 + ]) + ]) diff --git a/m4/ax_python_module.m4 b/m4/ax_python_module.m4 new file mode 100644 index 0000000000..db1db90a6a --- /dev/null +++ b/m4/ax_python_module.m4 @@ -0,0 +1,32 @@ +# +# SYNOPSIS +# +# AX_PYTHON_MODULE(MODULE[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# Checks for Python module. +# +# LICENSE +# +# Copyright (c) 2008 Andrew Collier +# (c) 2020 Internet Systems Consortium +# +# 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. + +AC_DEFUN([AX_PYTHON_MODULE],[ + AC_MSG_CHECKING([for python module: $1]) + $PYTHON -c "import $1" >/dev/null 2>&1 + AS_IF([test $? -eq 0], + [AC_MSG_RESULT([yes]) + eval AS_TR_CPP(HAVE_PYMOD_$1)=yes + $2 + ], + [AC_MSG_RESULT([no]) + eval AS_TR_CPP(HAVE_PYMOD_$1)=no + $3 + ]) + ]) diff --git a/m4/ax_tls.m4 b/m4/ax_tls.m4 new file mode 100644 index 0000000000..fb184fe201 --- /dev/null +++ b/m4/ax_tls.m4 @@ -0,0 +1,71 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_tls.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_TLS([action-if-found], [action-if-not-found]) +# +# DESCRIPTION +# +# Provides a test for the compiler support of thread local storage (TLS) +# extensions. Defines TLS if it is found. Currently knows about C++11, +# GCC/ICC, and MSVC. I think SunPro uses the same as GCC, and Borland +# apparently supports either. +# +# LICENSE +# +# Copyright (c) 2008 Alan Woodland +# Copyright (c) 2010 Diego Elio Petteno` +# +# 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 15 + +AC_DEFUN([AX_TLS], [ + AC_MSG_CHECKING([for thread local storage (TLS) class]) + AC_CACHE_VAL([ac_cv_tls], + [for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do + AS_CASE([$ax_tls_keyword], + [none], [ac_cv_tls=none ; break], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [#include ], + [static $ax_tls_keyword int bar;] + )], + [ac_cv_tls=$ax_tls_keyword ; break], + [ac_cv_tls=none] + )] + ) + done ] + ) + AC_MSG_RESULT([$ac_cv_tls]) + + AS_IF([test "$ac_cv_tls" != "none"], + [AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class, define it to that here]) + m4_ifnblank([$1],[$1],[[:]])], + [m4_ifnblank([$2],[$2],[[:]])]) +]) diff --git a/make/.gitignore b/make/.gitignore deleted file mode 100644 index d46289bf38..0000000000 --- a/make/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -includes -rules -mkdep diff --git a/make/includes.in b/make/includes.in deleted file mode 100644 index 48cdaf7cc3..0000000000 --- a/make/includes.in +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# Search for machine-generated header files in the build tree, -# and for normal headers in the source tree (${top_srcdir}). -# We only need to look in OS-specific subdirectories for the -# latter case, because there are no machine-generated OS-specific -# headers. - -ISC_INCLUDES = @BIND9_ISC_BUILDINCLUDE@ \ - -I${top_srcdir}/lib/isc \ - -I${top_srcdir}/lib/isc/include \ - -I${top_srcdir}/lib/isc/unix/include \ - -I${top_srcdir}/lib/isc/pthreads/include - -ISCCC_INCLUDES = @BIND9_ISCCC_BUILDINCLUDE@ \ - -I${top_srcdir}/lib/isccc/include - -ISCCFG_INCLUDES = @BIND9_ISCCFG_BUILDINCLUDE@ \ - -I${top_srcdir}/lib/isccfg/include - -DNS_INCLUDES = @BIND9_DNS_BUILDINCLUDE@ \ - -I${top_srcdir}/lib/dns/include - -NS_INCLUDES = @BIND9_NS_BUILDINCLUDE@ \ - -I${top_srcdir}/lib/ns/include - -IRS_INCLUDES = @BIND9_IRS_BUILDINCLUDE@ \ - -I${top_srcdir}/lib/irs/include - -BIND9_INCLUDES = @BIND9_BIND9_BUILDINCLUDE@ \ - -I${top_srcdir}/lib/bind9/include - -TEST_INCLUDES = \ - -I${top_srcdir}/lib/tests/include diff --git a/make/mkdep.in b/make/mkdep.in deleted file mode 100644 index 2ba9495e82..0000000000 --- a/make/mkdep.in +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/sh - - -## -## Modified to handle -vpath option by Michael Graff, ISC. -## The purpose of this is to allow this script to run outside of the -## source directory, for instance when running configure with -## ../bind9-mainline/configure -## and still have "make depend" work. -## - -## ++Copyright++ 1987 -## - -## Copyright (c) 1987 Regents of the University of California. -## All rights reserved. -## -## Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions -## are met: -## 1. Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## 2. 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. -## 3. Neither the name of the University 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 REGENTS 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 THE REGENTS OR CONTRIBUTORS 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. -## - -## Portions Copyright (c) 1993 by Digital Equipment Corporation. -## -## Permission to use, copy, modify, and distribute this software for any -## purpose with or without fee is hereby granted, provided that the above -## copyright notice and this permission notice appear in all copies, and that -## the name of Digital Equipment Corporation not be used in advertising or -## publicity pertaining to distribution of the document or software without -## specific, written prior permission. -## -## THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -## WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -## CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -## SOFTWARE. -## - -## --Copyright-- - -# -# @(#)mkdep.sh 5.12 (Berkeley) 6/30/88 -# - -MAKE=Makefile # default makefile name is "Makefile" - -while : - do case "$1" in - # -vpath allows one to select a virtual path for .c files - -vpath) - VPATH=$2; - shift; shift ;; - # -f allows you to select a makefile name - -f) - MAKE=$2 - shift; shift ;; - - # the -p flag produces "program: program.c" style dependencies - # so .o's don't get produced - -p) - SED='s;\.o;;' - shift ;; - *) - break ;; - esac -done - -if [ $# = 0 ] ; then - echo 'usage: mkdep [-vpath path] [-p] [-f makefile] [flags] file ...' - exit 1 -fi - -if [ ! -w $MAKE ]; then - echo "mkdep: no writeable file \"$MAKE\"" - exit 1 -fi - -TMP=mkdep$$ - -trap 'rm -f $TMP ; exit 1' 1 2 3 13 15 - -cp $MAKE ${MAKE}.bak - -sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP - -cat << _EOF_ >> $TMP -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -_EOF_ - -# If your compiler doesn't have -M, add it. If you can't, the next two -# lines will try and replace the "cc -M". The real problem is that this -# hack can't deal with anything that requires a search path, and doesn't -# even try for anything using bracket (<>) syntax. -# -# egrep '^#include[ ]*".*"' /dev/null $* | -# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' | - -if [ X"${VPATH}" != X ] ; then - for arg in $* ; do - case "$arg" in - -*) - newargs="$newargs $arg" - ;; - *) - newargs="$newargs $VPATH/$arg" - ;; - esac - done -else - newargs="$*"; -fi - -MKDEPPROG="@MKDEPPROG@" -if [ X"${MKDEPPROG}" != X ]; then - @SHELL@ -c "${MKDEPPROG} ${newargs}" -else - @MKDEPCC@ @MKDEPCFLAGS@ ${newargs} | - sed " - s; \\./; ;g - s; \\\\; ;g - @LIBTOOL_MKDEP_SED@ - $SED" | - awk '$1 ~ /:$/ { - if (rec != "") - print rec; - if (NF == 1) - rec = $1; - else - rec = $1 " " $2; - for (i = 3; i <= NF; i++) { - if (length(rec $i) > 76) { - print rec " \\"; - rec = " " $i; - } else { - rec = rec " " $i; - } - } - next; - } - { - for (i = 1; i <= NF; i++) { - if (length(rec $i) > 76) { - print rec, "\\"; - rec = " " $i; - } else { - rec = rec " " $i; - } - } - } - END { - print rec - }' >> $TMP -fi - -cat << _EOF_ >> $TMP - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY -_EOF_ - -# copy to preserve permissions -cp $TMP $MAKE -rm -f ${MAKE}.bak $TMP -exit 0 diff --git a/make/rules.in b/make/rules.in deleted file mode 100644 index e2658bffbd..0000000000 --- a/make/rules.in +++ /dev/null @@ -1,334 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -### -### Common Makefile rules for BIND 9. -### - -### -### Paths -### -### Note: paths that vary by Makefile MUST NOT be listed -### here, or they won't get expanded correctly. - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -sbindir = @sbindir@ -includedir = @includedir@ -libdir = @libdir@ -sysconfdir = @sysconfdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -datarootdir = @datarootdir@ - -plugindir = ${libdir}/named - -DESTDIR = - -@SET_MAKE@ - -top_builddir = @BIND9_TOP_BUILDDIR@ - -### -### All -### -### Makefile may define: -### PREREQS -### TARGETS - -all: ${PREREQS} subdirs ${TARGETS} testdirs - -### -### Subdirectories -### -### Makefile may define: -### SUBDIRS -### DEPDIRS - -ALL_SUBDIRS = ${SUBDIRS} nulldir -ALL_TESTDIRS = ${TESTDIRS} nulldir - -# -# We use a single-colon rule so that additional dependencies of -# subdirectories can be specified after the inclusion of this file. -# The "depend" and "testdirs" targets are treated the same way. -# -subdirs: - @for i in ${ALL_SUBDIRS}; do \ - if [ "$$i" != "nulldir" -a -d $$i ]; then \ - echo "making all in `pwd`/$$i"; \ - (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" all) || exit 1; \ - fi; \ - done - -# -# Tests are built after the targets instead of before -# -testdirs: subdirs ${TARGETS} - @for i in ${ALL_TESTDIRS}; do \ - if [ "$$i" != "nulldir" -a -d $$i ]; then \ - echo "making all in `pwd`/$$i"; \ - (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" all) || exit 1; \ - fi; \ - done - -install:: all - -install uninstall clean distclean maintainer-clean doc docclean man manclean:: - @for i in ${ALL_SUBDIRS} ${ALL_TESTDIRS}; do \ - if [ "$$i" != "nulldir" -a -d $$i -a -f $$i/Makefile ]; then \ - echo "making $@ in `pwd`/$$i"; \ - (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \ - fi; \ - done - -### -### C Programs -### -### Makefile must define -### CC -### Makefile may define -### CFLAGS -### LDFLAGS -### CINCLUDES -### CDEFINES -### CWARNINGS -### User may define externally -### EXT_CFLAGS - -CC = @CC@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -STD_CINCLUDES = @STD_CINCLUDES@ -STD_CDEFINES = @STD_CDEFINES@ -STD_CWARNINGS = @STD_CWARNINGS@ - -BUILD_CC = @BUILD_CC@ -BUILD_CFLAGS = @BUILD_CFLAGS@ -BUILD_CPPFLAGS = @BUILD_CPPFLAGS@ -BUILD_LDFLAGS = @BUILD_LDFLAGS@ -BUILD_LIBS = @BUILD_LIBS@ - -LFS_CFLAGS = @LFS_CFLAGS@ -LFS_LDFLAGS = @LFS_LDFLAGS@ -LFS_LIBS = @LFS_LIBS@ - -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ - -JSON_C_CFLAGS = @JSON_C_CFLAGS@ -JSON_C_LIBS = @JSON_C_LIBS@ - -LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ -LIBXML2_LIBS = @LIBXML2_LIBS@ - -LMDB_CFLAGS = @LMDB_CFLAGS@ -LMDB_LIBS = @LMDB_LIBS@ - -MAXMINDDB_CFLAGS = @MAXMINDDB_CFLAGS@ -MAXMINDDB_LIBS = @MAXMINDDB_LIBS@ - -ZLIB_CFLAGS = @ZLIB_CFLAGS@ -ZLIB_LIBS = @ZLIB_LIBS@ - -.SUFFIXES: -.SUFFIXES: .c .@O@ - -ALWAYS_INCLUDES = -include ${top_builddir}/config.h -I${top_builddir} -I${top_srcdir} -ALWAYS_DEFINES = @ALWAYS_DEFINES@ -ALWAYS_WARNINGS = - -ALL_CPPFLAGS = \ - ${ALWAYS_INCLUDES} ${CINCLUDES} ${STD_CINCLUDES} \ - ${ALWAYS_DEFINES} ${CDEFINES} ${STD_CDEFINES} - -ALL_CFLAGS = ${EXT_CFLAGS} ${ALL_CPPFLAGS} ${CFLAGS} \ - ${ALWAYS_WARNINGS} ${STD_CWARNINGS} ${CWARNINGS} - -@BIND9_CO_RULE@ - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $< - -SHELL = @SHELL@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@ -LIBTOOL_MODE_INSTALL = ${LIBTOOL} @LIBTOOL_MODE_INSTALL@ -LIBTOOL_MODE_LINK = ${LIBTOOL} @LIBTOOL_MODE_LINK@ -LIBTOOL_MODE_UNINSTALL = ${LIBTOOL} @LIBTOOL_MODE_UNINSTALL@ -PURIFY = @PURIFY@ - -MKDEP = ${SHELL} ${top_builddir}/make/mkdep - -### -### This is a template compound command to build an executable binary with -### an internal symbol table. -### This process is tricky. We first link all objects including a tentative -### empty symbol table, then get a tentative list of symbols from the resulting -### binary ($@tmp0). Next, we re-link all objects, but this time with the -### symbol table just created ($tmp@1). The set of symbols should be the same, -### but the corresponding addresses would be changed due to the difference on -### the size of symbol tables. So we create the symbol table and re-create the -### objects once again. Finally, we check the symbol table embedded in the -### final binaryis consistent with the binary itself; otherwise the process is -### terminated. -### -### To minimize the overhead of creating symbol tables, the autoconf switch -### --enable-symtable takes an argument so that the symbol table can be created -### on a per application basis: unless the argument is set to "all", the symbol -### table is created only when a shell (environment) variable "MAKE_SYMTABLE" is -### set to a non-null value in the rule to build the executable binary. -### -### Each Makefile.in that uses this macro is expected to define "LIBS" and -### "NOSYMLIBS"; the former includes libisc with an empty symbol table, and -### the latter includes libisc without the definition of a symbol table. -### The rule to make the executable binary will look like this -### binary@EXEEXT@: ${OBJS} -### #export MAKE_SYMTABLE="yes"; \ <- enable if symtable is always needed -### export BASEOBJS="${OBJS}"; \ -### ${FINALBUILDCMD} -### -### Normally, ${LIBS} includes all necessary libraries to build the binary; -### there are some exceptions however, where the rule lists some of the -### necessary libraries explicitly in addition to (or instead of) ${LIBS}, -### like this: -### binary@EXEEXT@: ${OBJS} -### cc -o $@ ${OBJS} ${OTHERLIB1} ${OTHERLIB2} ${LIBS} -### in order to modify such a rule to use this compound command, a separate -### variable "LIBS0" should be deinfed for the explicitly listed libraries, -### while making sure ${LIBS} still includes libisc. So the above rule would -### be modified as follows: -### binary@EXEEXT@: ${OBJS} -### export BASEOBJS="${OBJS}"; \ -### export LIBS0="${OTHERLIB1} ${OTHERLIB2}"; \ -### ${FINALBUILDCMD} -### See bin/check/Makefile.in for a complete example of the use of LIBS0. -### -FINALBUILDCMD = ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ - -o $@ $${BASEOBJS} $${LIBS0} ${LIBS}; \ - -cleandir: distclean -superclean: maintainer-clean - -clean distclean maintainer-clean:: - rm -f *.@O@ *.o *.lo *.la core *.core *-symtbl.c *tmp0 *tmp1 *tmp2 - rm -rf .depend .libs - -distclean maintainer-clean:: - rm -f Makefile - -depend: - @for i in ${ALL_SUBDIRS} ${ALL_TESTDIRS}; do \ - if [ "$$i" != "nulldir" -a -d $$i ]; then \ - echo "making depend in `pwd`/$$i"; \ - (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \ - fi; \ - done - @if [ X"${srcdir}" != X. ] ; then \ - if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \ - echo ${MKDEP} -vpath ${srcdir} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - ${MKDEP} -vpath ${srcdir} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - echo ${MKDEP} -vpath ${srcdir} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${MKDEP} -vpath ${srcdir} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${DEPENDEXTRA} \ - elif [ X"${SRCS}" != X ] ; then \ - echo ${MKDEP} -vpath ${srcdir} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - ${MKDEP} -vpath ${srcdir} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - ${DEPENDEXTRA} \ - elif [ X"${PSRCS}" != X ] ; then \ - echo ${MKDEP} -vpath ${srcdir} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${MKDEP} -vpath ${srcdir} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${DEPENDEXTRA} \ - fi \ - else \ - if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \ - echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${DEPENDEXTRA} \ - elif [ X"${SRCS}" != X ] ; then \ - echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ - ${DEPENDEXTRA} \ - elif [ X"${PSRCS}" != X ] ; then \ - echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${MKDEP} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ - ${DEPENDEXTRA} \ - fi \ - fi - -FORCE: - -### -### Libraries -### - -AR = @AR@ -ARFLAGS = @ARFLAGS@ -RANLIB = @RANLIB@ - -### -### Installation -### - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -LINK_PROGRAM = @LN_S@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_LIBRARY = @INSTALL_LIBRARY@ - -### -### Programs used when generating documentation. It's ok for these -### not to exist when not generating documentation. -### - -XSLTPROC = @XSLTPROC@ --novalid --xinclude --nonet -XMLLINT = @XMLLINT@ -PERL = @PERL@ -LATEX = @LATEX@ -PDFLATEX = @PDFLATEX@ -DBLATEX = @DBLATEX@ -W3M = @W3M@ -PANDOC = @PANDOC@ - -### -### DocBook -> HTML -### DocBook -> man page -### - -.SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8 - -.docbook.html: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-docbook-html.xsl $< - -.docbook.1: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - -.docbook.2: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - -.docbook.3: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - -.docbook.4: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - -.docbook.5: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - -.docbook.6: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - -.docbook.7: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - -.docbook.8: - ${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $< - diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100644 index f945dbf2bc..0000000000 --- a/mkinstalldirs +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/unit/.gitignore b/unit/.gitignore deleted file mode 100644 index db27d5b1d7..0000000000 --- a/unit/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -!config.h -Makefile -atf -unittest.sh diff --git a/unit/README b/unit/README deleted file mode 100644 index 9cdcf9b904..0000000000 --- a/unit/README +++ /dev/null @@ -1,8 +0,0 @@ -Unit tests for BIND 9 are based on the CMocka testing framework and -the Kyua test execution engine. - -If your distribution of choice doesn't include packages for kyua or cmocka, the -sources can be found here: - - * Kyua 0.13 - https://github.com/jmmv/kyua/releases - * CMocka 1.0 - https://cmocka.org/files/ diff --git a/unit/gdb b/unit/gdb deleted file mode 100755 index 68ccc10325..0000000000 --- a/unit/gdb +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# `kyua debug` command does not work with libtool (see -# https://github.com/jmmv/kyua/issues/207). On some distributions `kyua debug` -# runs the first `gdb` it finds in $PATH, but on Debian and Ubuntu it looks for -# `/usr/bin/gdb`. This script expects `gdb` to be moved to `gdb.orig` and -# executed from there. -coredump="$6" -binary=$(gdb.orig --batch --core="${coredump}" 2>/dev/null | sed -ne "s/Core was generated by \`\(.*\)'./\1/p") -# GDB 6.3 from OpenBSD 6.6 does not tell the full path of the broken binary. -# We need to fix it. Either the binary or it's libtool script will do. -if [ ! -e "${binary}" ]; then - binary="$(find "${TOP}" -name "${binary}" | head -n 1)" -fi - -# $TOP points to BIND sources and should be set on `kyua debug` invocation. -"${TOP}/libtool" --mode=execute gdb.orig \ - --batch \ - --command="${TOP}/bin/tests/system/run.gdb" \ - --core="${coredump}" \ - -- \ - "${binary}" diff --git a/unit/unittest.sh.in b/unit/unittest.sh.in deleted file mode 100755 index 8224fef2cc..0000000000 --- a/unit/unittest.sh.in +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh - -# Find the top of the BIND9 tree. -export TOP=@abs_top_builddir@ -KYUA=@KYUA@ -UNITTESTS=@UNITTESTS@ -CMOCKA_MESSAGE_OUTPUT=TAP -export CMOCKA_MESSAGE_OUTPUT -GDB="$(command -v gdb)" - -kyua_report() { - ${KYUA} --logfile /dev/null report --results-file "${KYUA_RESULT:-LATEST}" -} - -clear_kyua_work_dir() { - KYUA_WORK_DIR="$(grep -i -m1 "failed" "${1}" | sed -n 's|.*\(/tmp/kyua\.[A-Za-z0-9]*\).*|\1|p')" - if [ -n "${CI}" ] && [ -d "${KYUA_WORK_DIR}" ]; then - find "${KYUA_WORK_DIR}" \( -name 'core*' -o -name '*.core' \) -exec mv -v {} . \; - rm -rf "${KYUA_WORK_DIR}" - fi -} - -status=0 -if [ -n "${UNITTESTS}" ] && [ -f Kyuafile ] -then - echo "S:unit:$(date)" - echo "T:unit:1:A" - echo "I:unit tests (using kyua)" - - ${KYUA} -v parallelism="${TEST_PARALLEL_JOBS:-1}" --logfile kyua.log --loglevel debug test --results-file "${KYUA_RESULT:-NEW}" - status=$? - - kyua_report - - clear_kyua_work_dir kyua.log - - # Use kyua-debug(1) facility to gather additional data on failed tests. - # Some runs will just show verbose information from the run, some will - # show backtrace via gdb(1). - USER_ID=$(id -u) - BROKEN_TESTS=$(kyua_report | awk '$2 == "->" && ( $3 == "broken:" || $3 == "failed:" ) { print $1 }') - # Conditions for getting kyua debug info and GDB backtrace: runs under CI - # (safety), GDB present, root privileges, failed tests. - if [ -n "${CI}" ] && [ -n "${GDB}" ] && [ "${USER_ID:-1}" -eq 0 ] && [ -n "${BROKEN_TESTS}" ]; then - if [ "$(uname -s)" = "Linux" ] && ! sysctl -n "kernel.core_pattern" | grep -xq "core.%p"; then - echo "I:*** kernel.core_pattern is not set to 'core.%p'" - echo "I:*** kyua may not be able to find core dumps for broken tests" - fi - if [ "$(uname -s)" = "FreeBSD" ] && ! sysctl -n "kern.corefile" | grep -xq "core.%P"; then - echo "I:*** kern.corefile is not set to 'core.%P'" - echo "I:*** kyua may not be able to find core dumps for broken tests" - fi - # kyua debug command misidentifies broken binaries when libtool - # is used (see https://github.com/jmmv/kyua/issues/207). - # Here we try to "trick" kyua to use our custom gdb script instead - # of using gdb(1) directly. Hence this part needs to be run as root - # and, for safety reasons, only in the CI. - mv "${GDB}" "${GDB}.orig" - cp "${TOP}/unit/gdb" "${GDB}" - i=1 - for test in ${BROKEN_TESTS}; do - echo - echo "----- $test -----" - KYUA_DEBUG_LOG="kyua.debug.log.${i}" - ${KYUA} debug "${test}" 2>&1 | tee "${KYUA_DEBUG_LOG}" - clear_kyua_work_dir "${KYUA_DEBUG_LOG}" - i=$((i + 1)) - done - mv "${GDB}.orig" "${GDB}" - fi - - if [ "${status}" -eq 0 ] - then - rm -f kyua.log - echo "R:PASS" - else - echo "R:FAIL:status:${status}" - fi - echo "E:unit:$(date)" -fi -exit ${status} diff --git a/util/check-ans-prereq.sh b/util/check-ans-prereq.sh deleted file mode 100644 index 6c21d5c59d..0000000000 --- a/util/check-ans-prereq.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -status=0 - -for testscript in bin/tests/system/*/tests.sh; do - testdir="$(dirname "${testscript}")" - prereq="${testdir}/prereq.sh" - if [ -e "${prereq}" ] || [ -e "${prereq}.in" ]; then - continue - fi - if find "${testdir}" -type d -name "ans*" | grep -Eq "/ans[0-9]+$"; then - echo "missing ${prereq}" - status=1 - fi -done - -exit ${status} diff --git a/util/checklibs.sh b/util/checklibs.sh index b5b89390e2..7a07ef07d8 100755 --- a/util/checklibs.sh +++ b/util/checklibs.sh @@ -17,7 +17,7 @@ status=0 list=`git grep -l snprintf lib bin | grep '\.c$' | grep -vE -e '(lib/bind|lib/dns/rdata|lib/dns/gen.c)' \ - -e '(lib/isc/win32/time.c|dlzexternal/driver.c)' | + -e '(lib/isc/win32/time.c|dlzexternal/driver/driver.c)' | xargs grep -EL "(isc/print.h|print_p.h)" 2> /dev/null` [ -n "$list" ] && { status=1 diff --git a/util/copyrights b/util/copyrights index e132f70d0f..bcd70b5cfd 100644 --- a/util/copyrights +++ b/util/copyrights @@ -1,18 +1,14 @@ ./.gitlab-ci.yml X 2018,2019,2020 ./.pylintrc X 2020 ./.uncrustify.cfg X 2018,2019,2020 +./AUTHORS X 2020 ./CHANGES X 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./CODE_OF_CONDUCT X 2019,2020 -./CONTRIBUTING X 2017,2018,2019,2020 +./COPYING X 2020 ./COPYRIGHT TXT.TOP 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./HISTORY X 2010,2013,2016,2017,2018,2019,2020 -./Kyuafile X 2017,2018,2019,2020 ./LICENSE X 2016,2018,2019,2020 -./OPTIONS X 2017,2018,2019,2020 -./PLATFORMS X 2018,2019,2020 -./README X 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./aclocal.m4 X 1999,2000,2001,2012,2014,2018,2019,2020 -./autogen.sh SH 2015,2016,2018,2019,2020 +./Makefile.tests X 2020 +./Makefile.top X 2020 +./NEWS X 2020 ./bin/check/check-tool.c C 2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/check/check-tool.h C 2000,2001,2002,2004,2005,2007,2010,2011,2013,2014,2016,2018,2019,2020 ./bin/check/named-checkconf.8 MAN DOCBOOK @@ -68,11 +64,11 @@ ./bin/dig/dig.docbook SGML 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dig/dig.html HTML DOCBOOK ./bin/dig/dighost.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 +./bin/dig/dighost.h C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dig/host.1 MAN DOCBOOK ./bin/dig/host.c C 2000,2001,2002,2003,2004,2005,2006,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dig/host.docbook SGML 2000,2001,2002,2004,2005,2007,2008,2009,2014,2015,2016,2017,2018,2019,2020 ./bin/dig/host.html HTML DOCBOOK -./bin/dig/include/dig/dig.h C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dig/nslookup.1 MAN DOCBOOK ./bin/dig/nslookup.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dig/nslookup.docbook SGML 2004,2005,2006,2007,2010,2013,2014,2015,2016,2017,2018,2019,2020 @@ -134,6 +130,7 @@ ./bin/dnssec/win32/dnssectool.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dnssec/win32/dnssectool.vcxproj.user X 2013,2018,2019,2020 ./bin/dnssec/win32/dsfromkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 +./bin/dnssec/win32/dsfromkey.vcxproj.in X 2013,2018,2019,2020 ./bin/dnssec/win32/dsfromkey.vcxproj.user X 2013,2018,2019,2020 ./bin/dnssec/win32/importkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/dnssec/win32/importkey.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 @@ -157,12 +154,10 @@ ./bin/dnssec/win32/verify.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dnssec/win32/verify.vcxproj.user X 2013,2018,2019,2020 ./bin/named/bind9.xsl SGML 2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/named/bind9.xsl.h X 2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/builtin.c C 2001,2002,2003,2004,2005,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/config.c C 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/control.c C 2001,2002,2003,2004,2005,2006,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/controlconf.c C 2001,2002,2003,2004,2005,2006,2007,2008,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/named/convertxsl.pl PERL 2006,2007,2008,2012,2014,2016,2018,2019,2020 ./bin/named/fuzz.c C 2016,2017,2018,2019,2020 ./bin/named/geoip.c C 2013,2014,2016,2017,2018,2019,2020 ./bin/named/include/dlz/dlz_dlopen_driver.h C 2011,2016,2018,2019,2020 @@ -206,6 +201,7 @@ ./bin/named/win32/named.vcxproj.user X 2013,2018,2019,2020 ./bin/named/win32/ntservice.c C 1999,2000,2001,2002,2004,2006,2007,2009,2011,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/win32/os.c C 1999,2000,2001,2002,2004,2005,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020 +./bin/named/xsl_p.h X 2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/named/zoneconf.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/nsupdate/nsupdate.1 MAN DOCBOOK ./bin/nsupdate/nsupdate.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -262,56 +258,9 @@ ./bin/rndc/win32/rndcutil.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/rndc/win32/rndcutil.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 ./bin/rndc/win32/rndcutil.vcxproj.user X 2013,2018,2019,2020 -./bin/tests/bigtest/README TXT.BRIEF 2013,2016,2018,2019,2020 -./bin/tests/bigtest/buildzones.sh SH 2013,2016,2018,2019,2020 -./bin/tests/bigtest/rndc.key X 2013,2018,2019,2020 -./bin/tests/bigtest/tests.sh SH 2013,2016,2018,2019,2020 -./bin/tests/bigtest/zones X 2013,2018,2019,2020 ./bin/tests/cfg_test.c C 2001,2002,2004,2005,2007,2009,2010,2011,2015,2016,2018,2019,2020 ./bin/tests/fromhex.pl PERL 2015,2016,2018,2019,2020 ./bin/tests/headerdep_test.sh.in SH 2000,2001,2004,2007,2012,2016,2018,2019,2020 -./bin/tests/makejournal.c C 2013,2015,2016,2017,2018,2019,2020 -./bin/tests/optional/Kchild.example.+005+33180.key X 2018,2019,2020 -./bin/tests/optional/Kchild.example.+005+33180.private X 2018,2019,2020 -./bin/tests/optional/adb_test.c C 1999,2000,2001,2004,2005,2007,2009,2011,2012,2013,2015,2016,2018,2019,2020 -./bin/tests/optional/backtrace_test.c C 2009,2013,2015,2016,2018,2019,2020 -./bin/tests/optional/byaddr_test.c C 2000,2001,2002,2004,2005,2007,2012,2015,2016,2018,2019,2020 -./bin/tests/optional/byname_test.c C 2000,2001,2004,2005,2007,2009,2012,2015,2016,2017,2018,2019,2020 -./bin/tests/optional/db_test.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2013,2015,2016,2017,2018,2019,2020 -./bin/tests/optional/fsaccess_test.c C 2000,2001,2004,2005,2007,2012,2015,2016,2018,2019,2020 -./bin/tests/optional/gsstest.c C 2018,2019,2020 -./bin/tests/optional/inter_test.c C 2000,2001,2003,2004,2005,2007,2008,2015,2016,2018,2019,2020 -./bin/tests/optional/lex_test.c C 1998,1999,2000,2001,2004,2005,2007,2015,2016,2018,2019,2020 -./bin/tests/optional/lfsr_test.c C 1999,2000,2001,2004,2005,2007,2015,2016,2018,2019,2020 -./bin/tests/optional/log_test.c C 1999,2000,2001,2004,2007,2011,2014,2015,2016,2018,2019,2020 -./bin/tests/optional/master_test.c C 1999,2000,2001,2004,2007,2009,2015,2016,2017,2018,2019,2020 -./bin/tests/optional/mempool_test.c C 1999,2000,2001,2004,2007,2016,2018,2019,2020 -./bin/tests/optional/name_test.c C 1998,1999,2000,2001,2003,2004,2005,2007,2009,2015,2016,2017,2018,2019,2020 -./bin/tests/optional/nsecify.c C 1999,2000,2001,2003,2004,2007,2008,2009,2011,2015,2016,2017,2018,2019,2020 -./bin/tests/optional/ratelimiter_test.c C 1999,2000,2001,2004,2007,2015,2016,2018,2019,2020 -./bin/tests/optional/rbt_test.c C 1999,2000,2001,2004,2005,2007,2009,2011,2012,2014,2015,2016,2018,2019,2020 -./bin/tests/optional/rbt_test.out X 1999,2000,2001,2018,2019,2020 -./bin/tests/optional/rbt_test.txt SH 1999,2000,2001,2004,2007,2012,2016,2018,2019 -./bin/tests/optional/rwlock_test.c C 1998,1999,2000,2001,2004,2005,2007,2013,2016,2017,2018,2019,2020 -./bin/tests/optional/serial_test.c C 1999,2000,2001,2003,2004,2007,2015,2016,2018,2019,2020 -./bin/tests/optional/shutdown_test.c C 1998,1999,2000,2001,2004,2007,2011,2013,2016,2017,2018,2019,2020 -./bin/tests/optional/sig0_test.c C 2000,2001,2004,2005,2007,2008,2009,2012,2015,2016,2018,2019,2020 -./bin/tests/optional/sock_test.c C 1998,1999,2000,2001,2004,2007,2008,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tests/optional/sym_test.c C 1998,1999,2000,2001,2004,2005,2007,2015,2016,2018,2019,2020 -./bin/tests/optional/task_test.c C 1998,1999,2000,2001,2004,2007,2013,2014,2015,2016,2018,2019,2020 -./bin/tests/optional/timer_test.c C 1998,1999,2000,2001,2004,2007,2013,2014,2015,2016,2018,2019,2020 -./bin/tests/optional/zone_test.c C 1999,2000,2001,2002,2004,2005,2007,2009,2012,2014,2015,2016,2018,2019,2020 -./bin/tests/pkcs11/README X 2014,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/create.c C 2014,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/find.c C 2014,2015,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/genrsa.c C 2014,2015,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/login.c C 2014,2015,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/privrsa.c C 2014,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/pubrsa.c C 2014,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/session.c C 2014,2015,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/sha1.c C 2014,2015,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/sign.c C 2014,2015,2016,2018,2019,2020 -./bin/tests/pkcs11/benchmarks/verify.c C 2014,2015,2016,2018,2019,2020 ./bin/tests/prepare-softhsm2.sh SH 2020 ./bin/tests/startperf/README X 2011,2018,2019,2020 ./bin/tests/startperf/clean.sh SH 2011,2012,2016,2018,2019,2020 @@ -377,7 +326,6 @@ ./bin/tests/system/chain/ans4/ans.py PYTHON 2017,2018,2019,2020 ./bin/tests/system/chain/clean.sh SH 2011,2012,2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/chain/ns2/sign.sh SH 2017,2018,2019,2020 -./bin/tests/system/chain/prereq.sh SH 2017,2018,2019,2020 ./bin/tests/system/chain/setup.sh SH 2017,2018,2019,2020 ./bin/tests/system/chain/tests.sh SH 2011,2012,2016,2017,2018,2019,2020 ./bin/tests/system/checkconf/clean.sh SH 2011,2012,2013,2014,2016,2018,2019,2020 @@ -418,7 +366,6 @@ ./bin/tests/system/digdelv/ans7/ans.pl PERL 2020 ./bin/tests/system/digdelv/clean.sh SH 2015,2016,2018,2019,2020 ./bin/tests/system/digdelv/ns2/sign.sh SH 2018,2019,2020 -./bin/tests/system/digdelv/prereq.sh SH 2018,2019,2020 ./bin/tests/system/digdelv/setup.sh SH 2018,2019,2020 ./bin/tests/system/digdelv/tests.sh SH 2015,2016,2017,2018,2019,2020 ./bin/tests/system/digdelv/yamlget.py PYTHON 2019,2020 @@ -435,8 +382,8 @@ ./bin/tests/system/dlz/setup.sh SH 2018,2019,2020 ./bin/tests/system/dlz/tests.sh SH 2010,2011,2012,2013,2015,2016,2018,2019,2020 ./bin/tests/system/dlzexternal/clean.sh SH 2010,2012,2014,2015,2016,2018,2019,2020 -./bin/tests/system/dlzexternal/driver.c C 2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/dlzexternal/driver.h C 2011,2016,2018,2019,2020 +./bin/tests/system/dlzexternal/driver/driver.c C 2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 +./bin/tests/system/dlzexternal/driver/driver.h C 2011,2016,2018,2019,2020 ./bin/tests/system/dlzexternal/prereq.sh SH 2010,2011,2012,2014,2016,2018,2019,2020 ./bin/tests/system/dlzexternal/setup.sh SH 2010,2012,2014,2016,2017,2018,2019,2020 ./bin/tests/system/dlzexternal/tests.sh SH 2010,2011,2012,2013,2014,2015,2016,2018,2019,2020 @@ -459,7 +406,6 @@ ./bin/tests/system/dnssec/ns7/named.nosoa TXT.BRIEF 2010,2016,2018,2019,2020 ./bin/tests/system/dnssec/ns7/sign.sh SH 2014,2016,2017,2018,2019,2020 ./bin/tests/system/dnssec/ntadiff.pl PERL 2015,2016,2018,2019,2020 -./bin/tests/system/dnssec/prereq.sh SH 2000,2001,2002,2004,2006,2007,2009,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/dnssec/setup.sh SH 2000,2001,2004,2007,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/dnssec/signer/general/Kexample.com.+005+07065.key X 2018,2019,2020 ./bin/tests/system/dnssec/signer/general/Kexample.com.+005+07065.private X 2018,2019,2020 @@ -544,7 +490,6 @@ ./bin/tests/system/feature-test.c C 2016,2017,2018,2019,2020 ./bin/tests/system/fetchlimit/ans4/ans.pl PERL 2019,2020 ./bin/tests/system/fetchlimit/clean.sh SH 2015,2016,2018,2019,2020 -./bin/tests/system/fetchlimit/prereq.sh SH 2018,2019,2020 ./bin/tests/system/fetchlimit/setup.sh SH 2015,2016,2018,2019,2020 ./bin/tests/system/fetchlimit/tests.sh SH 2015,2016,2018,2019,2020 ./bin/tests/system/filter-aaaa/clean.sh SH 2010,2012,2014,2016,2018,2019,2020 @@ -564,7 +509,6 @@ ./bin/tests/system/forward/clean.sh SH 2000,2001,2004,2007,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/forward/ns1/example.db X 2000,2001,2018,2019 ./bin/tests/system/forward/ns2/example.db X 2000,2001,2018,2019 -./bin/tests/system/forward/prereq.sh SH 2019,2020 ./bin/tests/system/forward/setup.sh SH 2018,2019,2020 ./bin/tests/system/forward/tests.sh SH 2000,2001,2004,2007,2011,2012,2013,2014,2016,2018,2019,2020 ./bin/tests/system/genzone.sh SH 2001,2002,2003,2004,2007,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -583,6 +527,7 @@ ./bin/tests/system/geoip2/prereq.sh SH 2019,2020 ./bin/tests/system/geoip2/setup.sh SH 2019,2020 ./bin/tests/system/geoip2/tests.sh SH 2019,2020 +./bin/tests/system/get_base_port.sh SH 2020 ./bin/tests/system/glue/clean.sh SH 2000,2001,2004,2007,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/glue/fi.good X 2000,2001,2018,2019,2020 ./bin/tests/system/glue/noglue.good X 2000,2001,2018,2019,2020 @@ -592,7 +537,7 @@ ./bin/tests/system/idna/setup.sh SH 2018,2019,2020 ./bin/tests/system/idna/tests.sh SH 2018,2019,2020 ./bin/tests/system/ifconfig.bat BAT 2016,2018,2019,2020 -./bin/tests/system/ifconfig.sh SH 2000,2001,2002,2003,2004,2007,2008,2009,2010,2012,2013,2016,2018,2019,2020 +./bin/tests/system/ifconfig.sh.in X 2000,2001,2002,2003,2004,2007,2008,2009,2010,2012,2013,2016,2018,2019,2020 ./bin/tests/system/include-multiplecfg/clean.sh SH 2020 ./bin/tests/system/include-multiplecfg/setup.sh SH 2020 ./bin/tests/system/include-multiplecfg/tests.sh SH 2020 @@ -611,7 +556,6 @@ ./bin/tests/system/ixfr/ans2/startme X 2011,2018,2019,2020 ./bin/tests/system/ixfr/clean.sh SH 2001,2004,2007,2011,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/ixfr/ixfr-stats.good X 2019,2020 -./bin/tests/system/ixfr/prereq.sh SH 2001,2004,2007,2012,2014,2016,2018,2019,2020 ./bin/tests/system/ixfr/setup.sh SH 2001,2004,2007,2011,2012,2013,2014,2016,2018,2019,2020 ./bin/tests/system/ixfr/tests.sh SH 2001,2004,2007,2011,2012,2014,2016,2018,2019,2020 ./bin/tests/system/kasp/README TXT.BRIEF 2019,2020 @@ -669,6 +613,7 @@ ./bin/tests/system/logfileconfig/ns1/named.versconf X 2016,2018,2019,2020 ./bin/tests/system/logfileconfig/setup.sh SH 2011,2012,2014,2016,2018,2019,2020 ./bin/tests/system/logfileconfig/tests.sh SH 2011,2012,2013,2014,2016,2017,2018,2019,2020 +./bin/tests/system/makejournal.c C 2013,2015,2016,2017,2018,2019,2020 ./bin/tests/system/masterfile/clean.sh SH 2001,2004,2007,2010,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/masterfile/knowngood.dig.out X 2001,2004,2012,2018,2019,2020 ./bin/tests/system/masterfile/setup.sh SH 2018,2019,2020 @@ -729,13 +674,11 @@ ./bin/tests/system/nsupdate/ns8/machine.ccache X 2018,2019,2020 ./bin/tests/system/nsupdate/ns9/dns.keytab X 2018,2019,2020 ./bin/tests/system/nsupdate/ns9/machine.ccache X 2018,2019,2020 -./bin/tests/system/nsupdate/prereq.sh SH 2014,2015,2016,2018,2019,2020 ./bin/tests/system/nsupdate/setup.sh SH 2000,2001,2004,2007,2009,2010,2011,2012,2014,2016,2017,2018,2019,2020 ./bin/tests/system/nsupdate/tests.sh SH 2000,2001,2004,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/nsupdate/update_test.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019,2020 ./bin/tests/system/nsupdate/verylarge.in X 2013,2018,2019,2020 ./bin/tests/system/nzd2nzf/clean.sh SH 2016,2018,2019,2020 -./bin/tests/system/nzd2nzf/prereq.sh SH 2016,2018,2019,2020 ./bin/tests/system/nzd2nzf/setup.sh SH 2016,2018,2019,2020 ./bin/tests/system/nzd2nzf/tests.sh SH 2016,2018,2019,2020 ./bin/tests/system/org.isc.bind.system SH 2010,2012,2013,2016,2018,2019,2020 @@ -755,7 +698,6 @@ ./bin/tests/system/pipelined/input X 2014,2015,2018,2019,2020 ./bin/tests/system/pipelined/inputb X 2014,2015,2018,2019,2020 ./bin/tests/system/pipelined/pipequeries.c C 2014,2015,2015,2016,2017,2018,2019,2020 -./bin/tests/system/pipelined/prereq.sh SH 2020 ./bin/tests/system/pipelined/ref X 2014,2015,2018,2019,2020 ./bin/tests/system/pipelined/refb X 2014,2015,2018,2019,2020 ./bin/tests/system/pipelined/setup.sh SH 2014,2015,2016,2017,2018,2019,2020 @@ -768,7 +710,6 @@ ./bin/tests/system/qmin/ans3/ans.py PYTHON 2018,2019,2020 ./bin/tests/system/qmin/ans4/ans.py PYTHON 2018,2019,2020 ./bin/tests/system/qmin/clean.sh SH 2018,2019,2020 -./bin/tests/system/qmin/prereq.sh SH 2018,2019,2020 ./bin/tests/system/qmin/setup.sh SH 2018,2019,2020 ./bin/tests/system/qmin/tests.sh SH 2018,2019,2020 ./bin/tests/system/reclimit/README TXT.BRIEF 2014,2016,2017,2018,2019,2020 @@ -776,7 +717,6 @@ ./bin/tests/system/reclimit/ans4/ans.pl PERL 2018,2019,2020 ./bin/tests/system/reclimit/ans7/ans.pl PERL 2014,2016,2018,2019,2020 ./bin/tests/system/reclimit/clean.sh SH 2014,2016,2018,2019,2020 -./bin/tests/system/reclimit/prereq.sh SH 2015,2016,2017,2018,2019,2020 ./bin/tests/system/reclimit/setup.sh SH 2014,2016,2018,2019,2020 ./bin/tests/system/reclimit/tests.sh SH 2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/redirect/clean.sh SH 2011,2012,2013,2014,2015,2016,2018,2019,2020 @@ -791,7 +731,6 @@ ./bin/tests/system/resolver/clean.sh SH 2008,2009,2010,2011,2012,2013,2014,2015,2016,2018,2019,2020 ./bin/tests/system/resolver/ns4/named.noaa TXT.BRIEF 2010,2016,2018,2019,2020 ./bin/tests/system/resolver/ns6/keygen.sh SH 2010,2012,2014,2016,2017,2018,2019,2020 -./bin/tests/system/resolver/prereq.sh SH 2000,2001,2004,2007,2012,2014,2016,2018,2019,2020 ./bin/tests/system/resolver/setup.sh SH 2010,2011,2012,2013,2014,2016,2017,2018,2019,2020 ./bin/tests/system/resolver/tests.sh SH 2000,2001,2004,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/rndc/clean.sh SH 2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -826,7 +765,6 @@ ./bin/tests/system/rpzrecurse/ans5/ans.pl PERL 2016,2018,2019,2020 ./bin/tests/system/rpzrecurse/clean.sh SH 2015,2016,2017,2018,2019,2020 ./bin/tests/system/rpzrecurse/ns2/named.conf.header.in X 2015,2016,2017,2018,2019,2020 -./bin/tests/system/rpzrecurse/prereq.sh SH 2015,2016,2017,2018,2019,2020 ./bin/tests/system/rpzrecurse/setup.sh SH 2015,2016,2017,2018,2019,2020 ./bin/tests/system/rpzrecurse/testgen.pl PERL 2015,2016,2017,2018,2019,2020 ./bin/tests/system/rpzrecurse/tests.sh SH 2015,2016,2017,2018,2019,2020 @@ -875,11 +813,10 @@ ./bin/tests/system/rsabigexponent/ns2/Xexample.+005+51829.private X 2012,2018,2019,2020 ./bin/tests/system/rsabigexponent/ns2/dsset-example.in X 2012,2018,2019,2020 ./bin/tests/system/rsabigexponent/ns2/sign.sh SH 2012,2014,2016,2018,2019,2020 -./bin/tests/system/rsabigexponent/prereq.sh SH 2012,2014,2016,2017,2018,2019,2020 ./bin/tests/system/rsabigexponent/setup.sh SH 2012,2014,2016,2017,2018,2019,2020 ./bin/tests/system/rsabigexponent/tests.sh SH 2012,2016,2018,2019,2020 ./bin/tests/system/run.gdb X 2019,2020 -./bin/tests/system/run.sh SH 2000,2001,2004,2007,2010,2012,2014,2015,2016,2017,2018,2019,2020 +./bin/tests/system/run.sh.in X 2000,2001,2004,2007,2010,2012,2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/runall.sh SH 2000,2001,2004,2007,2010,2011,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/runsequential.sh SH 2018,2019,2020 ./bin/tests/system/runtime/README TXT.BRIEF 2014,2016,2018,2019,2020 @@ -891,7 +828,6 @@ ./bin/tests/system/send.pl PERL 2001,2004,2007,2011,2012,2016,2018,2019,2020 ./bin/tests/system/serve-stale/ans2/ans.pl PERL 2017,2018,2019,2020 ./bin/tests/system/serve-stale/clean.sh SH 2017,2018,2019,2020 -./bin/tests/system/serve-stale/prereq.sh SH 2017,2018,2019,2020 ./bin/tests/system/serve-stale/setup.sh SH 2017,2018,2019,2020 ./bin/tests/system/serve-stale/tests.sh SH 2017,2018,2019,2020 ./bin/tests/system/setup.sh SH 2000,2001,2004,2007,2012,2014,2016,2018,2019,2020 @@ -911,7 +847,7 @@ ./bin/tests/system/spf/setup.sh SH 2018,2019,2020 ./bin/tests/system/spf/tests.sh SH 2013,2014,2016,2018,2019,2020 ./bin/tests/system/start.pl SH 2001,2004,2005,2006,2007,2008,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/start.sh SH 2000,2001,2004,2007,2012,2016,2018,2019,2020 +./bin/tests/system/start.sh.in X 2000,2001,2004,2007,2012,2016,2018,2019,2020 ./bin/tests/system/staticstub/clean.sh SH 2010,2012,2014,2015,2016,2018,2019,2020 ./bin/tests/system/staticstub/knowngood.dig.out.rec X 2010,2013,2018,2019,2020 ./bin/tests/system/staticstub/ns3/sign.sh SH 2010,2012,2014,2015,2016,2018,2019,2020 @@ -920,14 +856,12 @@ ./bin/tests/system/staticstub/tests.sh SH 2010,2011,2012,2013,2015,2016,2018,2019,2020 ./bin/tests/system/statistics/ans4/ans.pl PERL 2012,2016,2018,2019,2020 ./bin/tests/system/statistics/clean.sh SH 2012,2014,2015,2016,2018,2019,2020 -./bin/tests/system/statistics/prereq.sh SH 2012,2014,2016,2018,2019,2020 ./bin/tests/system/statistics/setup.sh SH 2018,2019,2020 ./bin/tests/system/statistics/tests.sh SH 2012,2015,2016,2017,2018,2019,2020 ./bin/tests/system/statschannel/clean.sh SH 2015,2016,2017,2018,2019,2020 ./bin/tests/system/statschannel/fetch.pl PERL 2015,2016,2018,2019,2020 ./bin/tests/system/statschannel/mem-xml.pl PERL 2017,2018,2019,2020 ./bin/tests/system/statschannel/ns2/sign.sh SH 2019,2020 -./bin/tests/system/statschannel/prereq.sh SH 2015,2016,2018,2019,2020 ./bin/tests/system/statschannel/server-json.pl PERL 2015,2016,2017,2018,2019,2020 ./bin/tests/system/statschannel/server-xml.pl PERL 2015,2016,2017,2018,2019,2020 ./bin/tests/system/statschannel/setup.sh SH 2018,2019,2020 @@ -942,10 +876,9 @@ ./bin/tests/system/statschannel/zones-json.pl PERL 2019,2020 ./bin/tests/system/statschannel/zones-xml.pl PERL 2019,2020 ./bin/tests/system/stop.pl SH 2001,2004,2005,2006,2007,2012,2016,2017,2018,2019,2020 -./bin/tests/system/stop.sh SH 2000,2001,2004,2007,2012,2016,2018,2019,2020 +./bin/tests/system/stop.sh.in X 2000,2001,2004,2007,2012,2016,2018,2019,2020 ./bin/tests/system/stopall.sh SH 2018,2019,2020 ./bin/tests/system/stress/clean.sh SH 2000,2001,2004,2007,2012,2014,2016,2018,2019,2020 -./bin/tests/system/stress/prereq.sh SH 2015,2016,2018,2019,2020 ./bin/tests/system/stress/setup.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019,2020 ./bin/tests/system/stress/setup.sh SH 2000,2001,2004,2007,2012,2016,2018,2019,2020 ./bin/tests/system/stress/tests.sh SH 2000,2001,2004,2007,2012,2014,2015,2016,2018,2019,2020 @@ -959,10 +892,9 @@ ./bin/tests/system/synthfromdnssec/ns1/sign.sh SH 2017,2018,2019,2020 ./bin/tests/system/synthfromdnssec/setup.sh SH 2017,2018,2019,2020 ./bin/tests/system/synthfromdnssec/tests.sh SH 2017,2018,2019,2020 -./bin/tests/system/system-test-driver.sh X 2019,2020 +./bin/tests/system/system-test-driver.sh.in X 2020 ./bin/tests/system/tcp/ans6/ans.py PYTHON 2019,2020 ./bin/tests/system/tcp/clean.sh SH 2014,2016,2018,2019,2020 -./bin/tests/system/tcp/prereq.sh SH 2019,2020 ./bin/tests/system/tcp/setup.sh SH 2018,2019,2020 ./bin/tests/system/tcp/tests.sh SH 2014,2016,2018,2019,2020 ./bin/tests/system/testcrypto.sh SH 2014,2016,2017,2018,2019,2020 @@ -1010,7 +942,6 @@ ./bin/tests/system/upforwd/knowngood.after2 X 2000,2001,2018,2019,2020 ./bin/tests/system/upforwd/knowngood.before X 2000,2001,2018,2019,2020 ./bin/tests/system/upforwd/knowngood.ns2.before X 2000,2001,2018,2019,2020 -./bin/tests/system/upforwd/prereq.sh SH 2012,2014,2016,2018,2019,2020 ./bin/tests/system/upforwd/setup.sh SH 2000,2001,2004,2007,2011,2012,2014,2016,2017,2018,2019,2020 ./bin/tests/system/upforwd/tests.sh SH 2000,2001,2004,2007,2011,2012,2013,2014,2016,2018,2019,2020 ./bin/tests/system/verify/clean.sh SH 2012,2014,2016,2018,2019,2020 @@ -1039,6 +970,9 @@ ./bin/tests/system/win32/keydelete.vcxproj.filters.in X 2016,2018,2019,2020 ./bin/tests/system/win32/keydelete.vcxproj.in X 2016,2017,2018,2019,2020 ./bin/tests/system/win32/keydelete.vcxproj.user X 2016,2018,2019,2020 +./bin/tests/system/win32/makejournal.vcxproj.filters.in X 2016,2018,2019,2020 +./bin/tests/system/win32/makejournal.vcxproj.in X 2016,2017,2018,2019,2020 +./bin/tests/system/win32/makejournal.vcxproj.user X 2016,2018,2019,2020 ./bin/tests/system/win32/pipequeries.vcxproj.filters.in X 2016,2018,2019,2020 ./bin/tests/system/win32/pipequeries.vcxproj.in X 2016,2017,2018,2019,2020 ./bin/tests/system/win32/pipequeries.vcxproj.user X 2016,2018,2019,2020 @@ -1055,7 +989,6 @@ ./bin/tests/system/xfer/dig2.good X 2000,2001,2003,2004,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/xfer/knowngood.mapped X 2016,2018,2019,2020 ./bin/tests/system/xfer/ns4/named.conf.base X 2011,2013,2016,2018,2019,2020 -./bin/tests/system/xfer/prereq.sh SH 2011,2012,2014,2016,2018,2019,2020 ./bin/tests/system/xfer/setup.sh SH 2001,2002,2004,2007,2011,2012,2013,2014,2015,2016,2018,2019,2020 ./bin/tests/system/xfer/tests.sh SH 2000,2001,2004,2005,2007,2011,2012,2013,2014,2015,2016,2018,2019,2020 ./bin/tests/system/xferquota/clean.sh SH 2000,2001,2004,2007,2012,2014,2015,2016,2018,2019,2020 @@ -1064,7 +997,6 @@ ./bin/tests/system/xferquota/tests.sh SH 2000,2001,2004,2007,2012,2016,2018,2019,2020 ./bin/tests/system/zero/ans5/ans.pl PERL 2016,2018,2019,2020 ./bin/tests/system/zero/clean.sh SH 2013,2014,2015,2016,2018,2019,2020 -./bin/tests/system/zero/prereq.sh SH 2018,2019,2020 ./bin/tests/system/zero/setup.sh SH 2013,2014,2016,2018,2019,2020 ./bin/tests/system/zero/tests.sh SH 2013,2016,2017,2018,2019,2020 ./bin/tests/system/zonechecks/clean.sh SH 2004,2007,2012,2014,2015,2016,2018,2019,2020 @@ -1080,9 +1012,6 @@ ./bin/tests/win32/inter_test.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/tests/win32/inter_test.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 ./bin/tests/win32/inter_test.vcxproj.user X 2013,2018,2019,2020 -./bin/tests/win32/makejournal.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/win32/makejournal.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/win32/makejournal.vcxproj.user X 2016,2018,2019,2020 ./bin/tests/win32/rwlock_test.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/tests/win32/rwlock_test.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 ./bin/tests/win32/rwlock_test.vcxproj.user X 2013,2018,2019,2020 @@ -1162,12 +1091,7 @@ ./bin/win32/BINDInstall/res/BINDInstall.rc2 X 2001,2018,2019,2020 ./bin/win32/BINDInstall/resource.h X 2001,2005,2009,2018,2019,2020 ./bind.keys X 2009,2010,2011,2017,2018,2019,2020 -./bind.keys.h X 2009,2010,2011,2012,2014,2017,2018,2019,2020 -./config.guess X 1998,1999,2000,2001,2004,2009,2013,2018,2019,2020 -./config.h.in X 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./config.h.win32 C 1999,2000,2001,2004,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./config.sub X 1998,1999,2000,2001,2004,2013,2018,2019,2020 -./config.threads.in X 2005,2006,2010,2011,2012,2013,2018,2019,2020 ./conftools/perllib/dnsconf/DNSConf-macros.h C 2000,2001,2004,2007,2016,2018,2019,2020 ./conftools/perllib/dnsconf/DNSConf.i C 2000,2001,2004,2007,2016,2018,2019,2020 ./conftools/perllib/dnsconf/Makefile.PL PERL 2000,2001,2004,2007,2012,2016,2018,2019,2020 @@ -1261,6 +1185,9 @@ ./contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c X 2013,2015,2016,2018,2019,2020 ./contrib/dlz/modules/wildcard/testing/named.conf X 2013,2018,2019 ./contrib/dnspriv/nginx.conf SH 2017,2018,2019 +./contrib/kasp/README X 2020 +./contrib/kasp/kasp.xml X 2020 +./contrib/kasp/policy.good X 2020 ./contrib/scripts/catzhash.py X 2020 ./contrib/scripts/check-secure-delegation.pl.in PERL 2010,2012,2014,2016,2018,2019,2020 ./contrib/scripts/check5011.pl X 2013,2014,2017,2018,2019,2020 @@ -1458,22 +1385,16 @@ ./fuzz/dns_rdata_fromwire_text.c C 2019,2020 ./fuzz/fuzz.h C 2018,2019,2020 ./fuzz/main.c C 2018,2019,2020 -./install-sh X 1998,1999,2000,2001,2018,2019,2020 -./lib/Kyuafile X 2017,2018,2019,2020 ./lib/bind9/api X 2001,2006,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/bind9/check.c C 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/bind9/getaddresses.c C 2001,2002,2004,2005,2007,2014,2015,2016,2017,2018,2019,2020 ./lib/bind9/include/bind9/check.h C 2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/bind9/include/bind9/getaddresses.h C 2001,2004,2005,2006,2007,2009,2016,2017,2018,2019,2020 -./lib/bind9/include/bind9/version.h C 2001,2004,2005,2006,2007,2016,2018,2019,2020 -./lib/bind9/version.c C 2001,2004,2005,2007,2016,2018,2019,2020 ./lib/bind9/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020 ./lib/bind9/win32/libbind9.def X 2001,2018,2019,2020 ./lib/bind9/win32/libbind9.vcxproj.filters.in X 2013,2015,2016,2018,2019,2020 ./lib/bind9/win32/libbind9.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./lib/bind9/win32/libbind9.vcxproj.user X 2013,2018,2019,2020 -./lib/bind9/win32/version.c C 1998,1999,2000,2001,2004,2007,2016,2018,2019,2020 -./lib/dns/Kyuafile X 2017,2018,2019,2020 ./lib/dns/acl.c C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2011,2013,2014,2016,2017,2018,2019,2020 ./lib/dns/adb.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/api X 1999,2000,2001,2006,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -1514,6 +1435,7 @@ ./lib/dns/gen.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/geoip2.c C 2019,2020 ./lib/dns/gssapi_link.c C 2000,2001,2002,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2018,2019,2020 +./lib/dns/gssapictx-dummy.c C 2020 ./lib/dns/gssapictx.c C 2000,2001,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/hmac_link.c C.NAI 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/include/dns/acl.h C 1999,2000,2001,2002,2004,2005,2006,2007,2009,2011,2013,2014,2016,2017,2018,2019,2020 @@ -1608,7 +1530,6 @@ ./lib/dns/include/dns/types.h C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/include/dns/update.h C 2011,2015,2016,2018,2019,2020 ./lib/dns/include/dns/validator.h C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2013,2014,2016,2018,2019,2020 -./lib/dns/include/dns/version.h C 2001,2004,2005,2006,2007,2012,2013,2016,2018,2019,2020 ./lib/dns/include/dns/view.h C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/include/dns/xfrin.h C 1999,2000,2001,2003,2004,2005,2006,2007,2009,2013,2016,2018,2019,2020 ./lib/dns/include/dns/zone.h C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -1629,7 +1550,6 @@ ./lib/dns/lib.c C 1999,2000,2001,2004,2005,2007,2009,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/log.c C 1999,2000,2001,2003,2004,2005,2006,2007,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/lookup.c C 2000,2001,2003,2004,2005,2007,2013,2016,2018,2019,2020 -./lib/dns/mapapi X 2013,2017,2018,2019,2020 ./lib/dns/master.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/masterdump.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/message.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 @@ -1837,18 +1757,12 @@ ./lib/dns/sdb.c C 2000,2001,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/sdlz.c C.PORTION 1999,2000,2001,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/soa.c C 2000,2001,2004,2005,2007,2009,2016,2018,2019,2020 -./lib/dns/spnego.asn1 X 2006,2018,2019,2020 -./lib/dns/spnego.c C 2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/dns/spnego.h C 2006,2007,2016,2018,2019,2020 -./lib/dns/spnego_asn1.c C 2006,2007,2012,2013,2015,2016,2018,2019,2020 -./lib/dns/spnego_asn1.pl PERL 2006,2007,2012,2016,2018,2019,2020 ./lib/dns/ssu.c C 2000,2001,2003,2004,2005,2006,2007,2008,2010,2011,2013,2014,2016,2017,2018,2019,2020 ./lib/dns/ssu_external.c C 2011,2012,2013,2016,2017,2018,2019,2020 ./lib/dns/stats.c C 2000,2001,2004,2005,2007,2008,2009,2012,2016,2018,2019,2020 ./lib/dns/tcpmsg.c C 1999,2000,2001,2004,2005,2006,2007,2015,2016,2018,2019,2020 ./lib/dns/tests/Kdh.+002+18602.key X 2014,2018,2019,2020 ./lib/dns/tests/Krsa.+005+29235.key X 2016,2018,2019,2020 -./lib/dns/tests/Kyuafile X 2017,2018,2019,2020 ./lib/dns/tests/acl_test.c C 2016,2018,2019,2020 ./lib/dns/tests/db_test.c C 2013,2015,2016,2017,2018,2019,2020 ./lib/dns/tests/dbdiff_test.c C 2011,2012,2016,2017,2018,2019,2020 @@ -1929,7 +1843,6 @@ ./lib/dns/ttl.c C 1999,2000,2001,2004,2005,2007,2011,2012,2013,2014,2016,2017,2018,2019,2020 ./lib/dns/update.c C 2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/validator.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/dns/version.c C 1998,1999,2000,2001,2004,2005,2007,2012,2013,2016,2018,2019,2020 ./lib/dns/view.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020 ./lib/dns/win32/gen.vcxproj.filters.in X 2013,2015,2018,2019,2020 @@ -1939,14 +1852,12 @@ ./lib/dns/win32/libdns.vcxproj.filters.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/win32/libdns.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/win32/libdns.vcxproj.user X 2013,2018,2019,2020 -./lib/dns/win32/version.c C 1998,1999,2000,2001,2004,2007,2013,2016,2018,2019,2020 ./lib/dns/xfrin.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/zone.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/dns/zone_p.h C 2018,2019,2020 ./lib/dns/zonekey.c C 2001,2003,2004,2005,2007,2016,2018,2019,2020 ./lib/dns/zoneverify.c C 2018,2019,2020 ./lib/dns/zt.c C 1999,2000,2001,2002,2004,2005,2006,2007,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/irs/Kyuafile X 2017,2018,2019,2020 ./lib/irs/api X 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/irs/context.c C 2009,2014,2016,2018,2019,2020 ./lib/irs/dnsconf.c C 2009,2012,2016,2018,2019,2020 @@ -1955,13 +1866,10 @@ ./lib/irs/getnameinfo.c C 2009,2011,2012,2013,2014,2016,2017,2018,2019,2020 ./lib/irs/include/irs/context.h C 2009,2016,2018,2019,2020 ./lib/irs/include/irs/dnsconf.h C 2009,2016,2018,2019,2020 -./lib/irs/include/irs/netdb.h.in C 2009,2016,2017,2018,2019,2020 -./lib/irs/include/irs/platform.h.in C 2009,2016,2018,2019,2020 +./lib/irs/include/irs/netdb.h C 2009,2016,2017,2018,2019,2020 ./lib/irs/include/irs/resconf.h C 2009,2014,2016,2018,2019,2020 ./lib/irs/include/irs/types.h C 2009,2016,2018,2019,2020 -./lib/irs/include/irs/version.h C 2009,2016,2018,2019,2020 ./lib/irs/resconf.c C 2009,2011,2012,2014,2015,2016,2017,2018,2019,2020 -./lib/irs/tests/Kyuafile X 2017,2018,2019,2020 ./lib/irs/tests/resconf_test.c C 2016,2018,2019,2020 ./lib/irs/tests/testdata/domain.conf CONF-SH 2016,2018,2019 ./lib/irs/tests/testdata/nameserver-v4.conf CONF-SH 2016,2018,2019 @@ -1980,17 +1888,13 @@ ./lib/irs/tests/testdata/sortlist-v4.conf CONF-SH 2016,2018,2019 ./lib/irs/tests/testdata/timeout.conf CONF-SH 2016,2018,2019 ./lib/irs/tests/testdata/unknown.conf CONF-SH 2016,2018,2019 -./lib/irs/version.c C 2009,2016,2018,2019,2020 ./lib/irs/win32/DLLMain.c C 2014,2016,2018,2019,2020 ./lib/irs/win32/include/irs/netdb.h C 2014,2016,2017,2018,2019,2020 -./lib/irs/win32/include/irs/platform.h C 2014,2016,2018,2019,2020 ./lib/irs/win32/libirs.def X 2014,2018,2019,2020 ./lib/irs/win32/libirs.vcxproj.filters.in X 2014,2015,2016,2018,2019,2020 ./lib/irs/win32/libirs.vcxproj.in X 2014,2015,2016,2017,2018,2019,2020 ./lib/irs/win32/libirs.vcxproj.user X 2014,2018,2019,2020 ./lib/irs/win32/resconf.c C 2018,2019,2020 -./lib/irs/win32/version.c C 2014,2016,2018,2019,2020 -./lib/isc/Kyuafile X 2017,2018,2019,2020 ./lib/isc/aes.c C 2014,2016,2017,2018,2019,2020 ./lib/isc/api X 1999,2000,2001,2006,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isc/app.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2013,2014,2015,2016,2017,2018,2019,2020 @@ -2023,6 +1927,7 @@ ./lib/isc/include/isc/assertions.h C 1997,1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2016,2017,2018,2019,2020 ./lib/isc/include/isc/astack.h C 2019,2020 ./lib/isc/include/isc/atomic.h C 2018,2019,2020 +./lib/isc/include/isc/attributes.h C 2020 ./lib/isc/include/isc/backtrace.h C 2009,2016,2018,2019,2020 ./lib/isc/include/isc/base32.h C 2008,2014,2016,2018,2019,2020 ./lib/isc/include/isc/base64.h C 1999,2000,2001,2004,2005,2006,2007,2016,2018,2019,2020 @@ -2103,7 +2008,6 @@ ./lib/isc/include/isc/tm.h C 2014,2016,2018,2019,2020 ./lib/isc/include/isc/types.h C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2012,2013,2014,2016,2017,2018,2019,2020 ./lib/isc/include/isc/util.h C 1998,1999,2000,2001,2004,2005,2006,2007,2010,2011,2012,2015,2016,2017,2018,2019,2020 -./lib/isc/include/isc/version.h C 2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isc/include/pk11/constants.h C 2014,2016,2017,2018,2019,2020 ./lib/isc/include/pk11/internal.h C 2014,2016,2018,2019,2020 ./lib/isc/include/pk11/pk11.h C 2014,2016,2018,2019,2020 @@ -2131,7 +2035,7 @@ ./lib/isc/netscope.c C 2002,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isc/nonce.c C 2018,2019,2020 ./lib/isc/openssl_shim.c C 2018,2019,2020 -./lib/isc/openssl_shim.h C 2018,2019,2020 +./lib/isc/openssl_shim.h C 2020 ./lib/isc/parseint.c C 2001,2002,2003,2004,2005,2007,2012,2016,2018,2019,2020 ./lib/isc/pk11.c C 2014,2015,2016,2017,2018,2019,2020 ./lib/isc/pk11_result.c C 2014,2015,2016,2018,2019,2020 @@ -2163,7 +2067,6 @@ ./lib/isc/task.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isc/task_p.h C 2018,2019,2020 ./lib/isc/taskpool.c C 1999,2000,2001,2004,2005,2007,2011,2012,2013,2016,2018,2019,2020 -./lib/isc/tests/Kyuafile X 2017,2018,2019,2020 ./lib/isc/tests/aes_test.c C 2014,2016,2018,2019,2020 ./lib/isc/tests/buffer_test.c C 2014,2015,2016,2017,2018,2019,2020 ./lib/isc/tests/counter_test.c C 2014,2016,2018,2019,2020 @@ -2229,7 +2132,6 @@ ./lib/isc/unix/stdtime.c C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isc/unix/syslog.c C 2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isc/unix/time.c C 1998,1999,2000,2001,2003,2004,2005,2006,2007,2008,2011,2012,2014,2015,2016,2017,2018,2019,2020 -./lib/isc/version.c C 1998,1999,2000,2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isc/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020 ./lib/isc/win32/condition.c C 1998,1999,2000,2001,2004,2006,2007,2016,2018,2019,2020 ./lib/isc/win32/dir.c C 1999,2000,2001,2004,2007,2008,2009,2011,2012,2013,2016,2017,2018,2019,2020 @@ -2284,10 +2186,8 @@ ./lib/isc/win32/thread.c C 1998,1999,2000,2001,2004,2005,2007,2016,2017,2018,2019,2020 ./lib/isc/win32/time.c C 1998,1999,2000,2001,2003,2004,2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isc/win32/unistd.h C 2000,2001,2004,2007,2008,2009,2016,2018,2019,2020 -./lib/isc/win32/version.c C 1998,1999,2000,2001,2004,2007,2016,2018,2019,2020 ./lib/isc/win32/win32os.c C 2002,2004,2007,2013,2014,2015,2016,2018,2019,2020 ./lib/isc/xoshiro128starstar.c C.PORTION 2018,2019,2020 -./lib/isccc/Kyuafile X 2018,2019,2020 ./lib/isccc/alist.c C.NOM 2001,2004,2005,2007,2015,2016,2018,2019,2020 ./lib/isccc/api X 2001,2006,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isccc/base64.c C.NOM 2001,2004,2005,2007,2013,2016,2018,2019,2020 @@ -2304,20 +2204,15 @@ ./lib/isccc/include/isccc/symtype.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isccc/include/isccc/types.h C.NOM 2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isccc/include/isccc/util.h C.NOM 2001,2004,2005,2006,2007,2014,2016,2018,2019,2020 -./lib/isccc/include/isccc/version.h C 2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isccc/result.c C.NOM 2001,2003,2004,2005,2007,2015,2016,2018,2019,2020 ./lib/isccc/sexpr.c C.NOM 2001,2004,2005,2007,2014,2015,2016,2018,2019,2020 ./lib/isccc/symtab.c C.NOM 2001,2004,2005,2007,2016,2018,2019,2020 -./lib/isccc/tests/Kyuafile X 2018,2019,2020 ./lib/isccc/tests/result_test.c C 2018,2019,2020 -./lib/isccc/version.c C 1998,1999,2000,2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isccc/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020 ./lib/isccc/win32/libisccc.def X 2001,2016,2018,2019,2020 ./lib/isccc/win32/libisccc.vcxproj.filters.in X 2013,2015,2016,2018,2019,2020 ./lib/isccc/win32/libisccc.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isccc/win32/libisccc.vcxproj.user X 2013,2018,2019,2020 -./lib/isccc/win32/version.c C 2001,2004,2007,2016,2018,2019,2020 -./lib/isccfg/Kyuafile X 2017,2018,2019,2020 ./lib/isccfg/aclconf.c C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isccfg/api X 2001,2006,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isccfg/dnsconf.c C 2009,2016,2018,2019,2020 @@ -2328,22 +2223,17 @@ ./lib/isccfg/include/isccfg/kaspconf.h C 2019,2020 ./lib/isccfg/include/isccfg/log.h C 2001,2004,2005,2006,2007,2009,2016,2018,2019,2020 ./lib/isccfg/include/isccfg/namedconf.h C 2002,2004,2005,2006,2007,2009,2010,2014,2016,2018,2019,2020 -./lib/isccfg/include/isccfg/version.h C 2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isccfg/kaspconf.c C 2019,2020 ./lib/isccfg/log.c C 2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isccfg/namedconf.c C 2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isccfg/parser.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/isccfg/tests/Kyuafile X 2017,2018,2019,2020 ./lib/isccfg/tests/duration_test.c C 2019,2020 ./lib/isccfg/tests/parser_test.c C 2016,2018,2019,2020 -./lib/isccfg/version.c C 1998,1999,2000,2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isccfg/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020 ./lib/isccfg/win32/libisccfg.def X 2001,2002,2005,2009,2010,2011,2013,2014,2015,2016,2018,2019,2020 ./lib/isccfg/win32/libisccfg.vcxproj.filters.in X 2013,2014,2015,2016,2018,2019,2020 ./lib/isccfg/win32/libisccfg.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isccfg/win32/libisccfg.vcxproj.user X 2013,2018,2019,2020 -./lib/isccfg/win32/version.c C 1998,1999,2000,2001,2004,2007,2016,2018,2019,2020 -./lib/ns/Kyuafile X 2017,2018,2019,2020 ./lib/ns/api X 2017,2018,2019,2020 ./lib/ns/client.c C 2017,2018,2019,2020 ./lib/ns/hooks.c C 2018,2019,2020 @@ -2360,7 +2250,6 @@ ./lib/ns/include/ns/stats.h C 2017,2018,2019,2020 ./lib/ns/include/ns/types.h C 2017,2018,2019,2020 ./lib/ns/include/ns/update.h C 2017,2018,2019,2020 -./lib/ns/include/ns/version.h C 2017,2018,2019,2020 ./lib/ns/include/ns/xfrout.h C 2017,2018,2019,2020 ./lib/ns/interfacemgr.c C 2017,2018,2019,2020 ./lib/ns/lib.c C 2017,2018,2019,2020 @@ -2371,7 +2260,6 @@ ./lib/ns/server.c C 2017,2018,2019,2020 ./lib/ns/sortlist.c C 2017,2018,2019,2020 ./lib/ns/stats.c C 2017,2018,2019,2020 -./lib/ns/tests/Kyuafile X 2017,2018,2019,2020 ./lib/ns/tests/listenlist_test.c C 2017,2018,2019,2020 ./lib/ns/tests/notify_test.c C 2017,2018,2019,2020 ./lib/ns/tests/nstest.c C 2017,2018,2019,2020 @@ -2381,15 +2269,12 @@ ./lib/ns/tests/testdata/notify/notify1.msg X 2017,2018,2019,2020 ./lib/ns/tests/wrap.c C 2019,2020 ./lib/ns/update.c C 2017,2018,2019,2020 -./lib/ns/version.c C 2017,2018,2019,2020 ./lib/ns/win32/DLLMain.c C 2017,2018,2019,2020 ./lib/ns/win32/libns.def X 2017,2018,2019,2020 ./lib/ns/win32/libns.vcxproj.filters X 2017,2018,2019,2020 ./lib/ns/win32/libns.vcxproj.in X 2017,2018,2019,2020 ./lib/ns/win32/libns.vcxproj.user X 2017,2018,2019,2020 -./lib/ns/win32/version.c C 2017,2018,2019,2020 ./lib/ns/xfrout.c C 2017,2018,2019,2020 -./lib/samples/Makefile-postinstall.in MAKE 2009,2012,2013,2014,2016,2017,2018,2019,2020 ./lib/samples/nsprobe.c C 2009,2010,2011,2012,2013,2014,2015,2016,2018,2019,2020 ./lib/samples/resolve.c C 2009,2012,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/samples/rootkey.sh SH 2013,2016,2018,2019,2020 @@ -2420,14 +2305,6 @@ ./lib/win32/bindevt/bindevt.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./lib/win32/bindevt/bindevt.vcxproj.in X 2013,2014,2015,2016,2018,2019,2020 ./lib/win32/bindevt/bindevt.vcxproj.user X 2013,2018,2019,2020 -./ltmain.sh X 1999,2000,2001,2003,2004,2006,2009,2012,2018,2019,2020 -./make/includes.in MAKE 1999,2000,2001,2004,2005,2007,2012,2014,2016,2017,2018,2019,2020 -./make/mkdep.in X 1999,2000,2001,2006,2011,2014,2018,2019,2020 -./make/rules.in MAKE 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./mkinstalldirs X 1996,2018,2019,2020 -./unit/README X 2011,2013,2018,2019,2020 -./unit/gdb X 2020 -./unit/unittest.sh.in X 2011,2012,2015,2018,2019,2020 ./util/COPYRIGHT X 1996,1997,1998,1999,2000,2001,2004,2007,2016,2018,2019,2020 ./util/COPYRIGHT.BRIEF X 1996,1997,1998,1999,2000,2001,2004,2016,2018,2019,2020 ./util/COPYRIGHT.BSDI X 2000,2001,2004,2007,2016,2018,2019,2020 @@ -2438,7 +2315,6 @@ ./util/api-checker.sh SH 2020 ./util/bindkeys.pl PERL 2009,2010,2011,2012,2014,2016,2017,2018,2019,2020 ./util/branchsync.sh SH 2013,2016,2018,2019,2020 -./util/check-ans-prereq.sh SH 2019,2020 ./util/check-categories.sh SH 2015,2016,2017,2018,2019,2020 ./util/check-changes PERL 2002,2004,2007,2012,2016,2018,2019,2020 ./util/check-cocci X 2018,2019,2020 @@ -2468,8 +2344,6 @@ ./util/update-drafts.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019,2020 ./util/update_branches PERL 2005,2007,2012,2016,2018,2019,2020 ./util/update_copyrights PERL 1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./util/xc SH 2012,2013,2016,2018,2019,2020 -./version X 1998,1999,2000,2001,2003,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2016,2017,2018,2019,2020 ./win32utils/Configure PERL 2013,2014,2015,2016,2017,2018,2019,2020 ./win32utils/GeoIP.diff X 2013,2018,2019,2020 ./win32utils/bind9.sln.in X 2013,2014,2015,2016,2017,2018,2019,2020 diff --git a/util/merge_copyrights b/util/merge_copyrights index d00fb9e5ae..9f5b09447e 100644 --- a/util/merge_copyrights +++ b/util/merge_copyrights @@ -36,8 +36,9 @@ while () { /\.git/ | # git directory /\.gitignore | # .gitignore files /\.gitattributes | # .gitattributes files - /\.clang-format | # .clang-format files - Makefile.in | # build system doesn't need to have copyright + /\.clang-format | # .clang-format files + /ChangeLog | # + Makefile.(am|in) | # build system doesn't need to have copyright /m4/ | # build system doesn't need to have copyright /configure | # build system doesn't need to have copyright /fuzz/.*\.in/ | # ignore fuzz corpus @@ -112,7 +113,7 @@ while () { $file_types{$_} = "CONF-SH"; } elsif ($base =~ /\.md$/) { $file_types{$_} = "MKD"; - } elsif ($base =~ /(\/\.(gitignore|gitattributes)|Kyuafile|\.(gif|jpg))$/i) { + } elsif ($base =~ /(\/\.(gitignore|gitattributes)|\.(gif|jpg))$/i) { $file_types{$_} = "X"; } elsif ($base =~ /\.(def|dep|dsp|dsw|mak|sln)$/i) { $file_types{$_} = "X"; diff --git a/util/suppressions.txt b/util/suppressions.txt index ea5ff3b292..bb86dd6fb2 100644 --- a/util/suppressions.txt +++ b/util/suppressions.txt @@ -1,3 +1,5 @@ unmatchedSuppression:* preprocessorErrorDirective:* unknownMacro:* +uselessAssignmentPtrArg:libltdl/loaders/preopen.c:201 +deallocret:libltdl/lt__alloc.c:78 diff --git a/util/xc b/util/xc deleted file mode 100755 index 73b7b11202..0000000000 --- a/util/xc +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# -# test cross compiler -# - -chmod= -next=0 -for t in ${BUILD_CC} gcc cc -do - type $t > /dev/null 2>&1 && cc=$t && break -done -for i in "$@" -do - [ $next = 1 ] && chmod="$i" - case "$i" in - -o) next=1;; - *) next=0;; - esac -done -if ${cc:-false} "$@" -then - [ "$chmod" != "" ] && chmod a-x "$chmod" - exit 0; -else - exit 1; -fi diff --git a/version b/version deleted file mode 100644 index 66268e7f1a..0000000000 --- a/version +++ /dev/null @@ -1,11 +0,0 @@ -# This file must follow /bin/sh rules. It is imported directly via -# configure. -# -PRODUCT=BIND -DESCRIPTION="(Development Release)" -MAJORVER=9 -MINORVER=17 -PATCHVER=1 -RELEASETYPE= -RELEASEVER= -EXTENSIONS= diff --git a/win32utils/Configure b/win32utils/Configure index d3c839540c..f15680f400 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -112,8 +112,8 @@ my @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj", "..\\bin\\tests\\win32\\backtrace_test.vcxproj.filters", "..\\bin\\tests\\win32\\inter_test.vcxproj", "..\\bin\\tests\\win32\\inter_test.vcxproj.filters", - "..\\bin\\tests\\win32\\makejournal.vcxproj", - "..\\bin\\tests\\win32\\makejournal.vcxproj.filters", + "..\\bin\\tests\\system\\win32\\makejournal.vcxproj", + "..\\bin\\tests\\system\\win32\\makejournal.vcxproj.filters", "..\\bin\\tests\\win32\\rwlock_test.vcxproj", "..\\bin\\tests\\win32\\rwlock_test.vcxproj.filters", "..\\bin\\tests\\win32\\shutdown_test.vcxproj", @@ -173,7 +173,7 @@ my @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj", my %configdefh; -my @substdefh = ("CONFIGARGS", +my @substdefh = ("PACKAGE_CONFIGARGS", "DNS_RDATASET_FIXED", "HAVE_GEOIP2", "HAVE_LIBXML2", @@ -290,7 +290,6 @@ my @substvar = ("BIND9_VERSION", "MACHINE", "OPENSSL_PATH", "PLATFORM", - "PKCS11_TOOLS", "PLATFORM_TOOLSET", "prefix", "PSSUSPEND", @@ -614,19 +613,19 @@ sub appargs { # escape backslashes and double quotes $arg =~ s/([\\"])/\\$1/g; $arg =~ s/([\s])/\\\\$1/g; - if (defined($configdefh{"CONFIGARGS"})) { - $configdefh{"CONFIGARGS"} .= " " . $arg; + if (defined($configdefh{"PACKAGE_CONFIGARGS"})) { + $configdefh{"PACKAGE_CONFIGARGS"} .= " " . $arg; } else { - $configdefh{"CONFIGARGS"} = $arg; + $configdefh{"PACKAGE_CONFIGARGS"} = $arg; } } -if (!$configdefh{"CONFIGARGS"}) { +if (!$configdefh{"PACKAGE_CONFIGARGS"}) { # CONFIGARGS default is "default" - $configdefh{"CONFIGARGS"} = "\"default\""; + $configdefh{"PACKAGE_CONFIGARGS"} = "\"default\""; } else { - my $val = $configdefh{"CONFIGARGS"}; - $configdefh{"CONFIGARGS"} = "\"'$val'\""; + my $val = $configdefh{"PACKAGE_CONFIGARGS"}; + $configdefh{"PACKAGE_CONFIGARGS"} = "\"'$val'\""; } # parse enable/disable @@ -1618,7 +1617,6 @@ if ($cryptolib ne "") { # with-pkcs11 if ($use_pkcs11 ne "no") { $configcond{"PKCS11"} = 1; - $configvar{"PKCS11_TOOLS"} = "pkcs11"; $configdefd{"PK11_LIB_LOCATION"} = "PK11_LIB_LOCATION=\"$pkcs11_path\""; } diff --git a/win32utils/bind9.sln.in b/win32utils/bind9.sln.in index e126677ffc..b7de279f19 100644 --- a/win32utils/bind9.sln.in +++ b/win32utils/bind9.sln.in @@ -519,7 +519,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timer_test", "..\bin\tests\ EndProject @END XTESTS @IF STESTS -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makejournal", "..\bin\tests\win32\makejournal.vcxproj", "{31715139-2C27-47D2-8394-71B71A8AC3D5}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makejournal", "..\bin\tests\system\win32\makejournal.vcxproj", "{31715139-2C27-47D2-8394-71B71A8AC3D5}" ProjectSection(ProjectDependencies) = postProject {A3F71D12-F38A-4C77-8D87-8E8854CA74A1} = {A3F71D12-F38A-4C77-8D87-8E8854CA74A1} {3840E563-D180-4761-AA9C-E6155F02EAFF} = {3840E563-D180-4761-AA9C-E6155F02EAFF}