From 8812cac5b238fde1d7a3b19067759c2c3798d6ff Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 9 Apr 2021 17:26:01 -0500 Subject: [PATCH 1/4] deps: vendor getdns Co-Authored-By: Jiawen Geng Co-Authored-By: Richard Lau --- .github/CODEOWNERS | 1 + configure.py | 22 + deps/getdns/configure_file.py | 216 + deps/getdns/getdns.gyp | 149 + deps/getdns/getdns/.gitignore | 70 + deps/getdns/getdns/CMakeLists.txt | 1157 +++ deps/getdns/getdns/LICENSE | 24 + .../getdns/cmake/include/cmakeconfig.h.in | 528 ++ .../cmake/include/getdns_shared_version.rc.in | 19 + .../getdns/cmake/modules/FindCheck.cmake | 98 + .../getdns/cmake/modules/FindGnuTLS.cmake | 85 + .../getdns/cmake/modules/FindLibev.cmake | 63 + .../getdns/cmake/modules/FindLibevent2.cmake | 69 + .../getdns/cmake/modules/FindLibidn2.cmake | 69 + .../getdns/cmake/modules/FindLibunbound.cmake | 90 + .../getdns/cmake/modules/FindLibuv.cmake | 73 + .../getdns/cmake/modules/FindNettle.cmake | 95 + .../modules/TargetSharedLibraryExports.cmake | 27 + .../modules/TargetSharedLibraryVersion.cmake | 25 + deps/getdns/getdns/getdns.pc.in | 11 + deps/getdns/getdns/getdns_ext_event.pc.in | 11 + deps/getdns/getdns/src/Doxyfile.in | 2430 ++++++ deps/getdns/getdns/src/anchor.c | 1639 ++++ deps/getdns/getdns/src/anchor.h | 83 + deps/getdns/getdns/src/compat/arc4_lock.c | 117 + deps/getdns/getdns/src/compat/arc4random.c | 311 + .../getdns/src/compat/arc4random_uniform.c | 57 + .../getdns/getdns/src/compat/chacha_private.h | 222 + .../getdns/getdns/src/compat/explicit_bzero.c | 17 + .../getdns/src/compat/getentropy_linux.c | 560 ++ .../getdns/getdns/src/compat/getentropy_osx.c | 432 + .../getdns/src/compat/getentropy_solaris.c | 441 + .../getdns/getdns/src/compat/getentropy_win.c | 56 + deps/getdns/getdns/src/compat/gettimeofday.c | 74 + deps/getdns/getdns/src/compat/inet_ntop.c | 214 + deps/getdns/getdns/src/compat/inet_pton.c | 229 + deps/getdns/getdns/src/compat/mkstemp.c | 43 + deps/getdns/getdns/src/compat/sha512.c | 477 ++ deps/getdns/getdns/src/compat/strlcpy.c | 54 + deps/getdns/getdns/src/compat/strptime.c | 345 + deps/getdns/getdns/src/const-info.c | 423 + deps/getdns/getdns/src/const-info.h | 67 + deps/getdns/getdns/src/context.c | 5382 ++++++++++++ deps/getdns/getdns/src/context.h | 612 ++ deps/getdns/getdns/src/convert.c | 1870 ++++ deps/getdns/getdns/src/convert.h | 64 + deps/getdns/getdns/src/debug.h | 200 + deps/getdns/getdns/src/dict.c | 1379 +++ deps/getdns/getdns/src/dict.h | 81 + deps/getdns/getdns/src/dnssec.c | 3945 +++++++++ deps/getdns/getdns/src/dnssec.h | 74 + .../getdns/src/extension/default_eventloop.h | 44 + deps/getdns/getdns/src/extension/libev.c | 189 + .../getdns/getdns/src/extension/libev.symbols | 1 + deps/getdns/getdns/src/extension/libevent.c | 190 + .../getdns/src/extension/libevent.symbols | 1 + deps/getdns/getdns/src/extension/libuv.c | 257 + .../getdns/getdns/src/extension/libuv.symbols | 1 + .../getdns/src/extension/poll_eventloop.c | 551 ++ .../getdns/src/extension/poll_eventloop.h | 66 + .../getdns/src/extension/select_eventloop.c | 315 + .../getdns/src/extension/select_eventloop.h | 59 + deps/getdns/getdns/src/general.c | 939 ++ deps/getdns/getdns/src/general.h | 88 + deps/getdns/getdns/src/getdns/getdns.h.in | 1828 ++++ .../getdns/src/getdns/getdns_ext_libev.h | 73 + .../getdns/src/getdns/getdns_ext_libevent.h | 72 + .../getdns/src/getdns/getdns_ext_libuv.h | 72 + .../getdns/src/getdns/getdns_extra.h.in | 2390 ++++++ deps/getdns/getdns/src/gldns/compare.sh | 21 + deps/getdns/getdns/src/gldns/gbuffer.c | 196 + deps/getdns/getdns/src/gldns/gbuffer.h | 810 ++ deps/getdns/getdns/src/gldns/import.sh | 20 + deps/getdns/getdns/src/gldns/keyraw.c | 108 + deps/getdns/getdns/src/gldns/keyraw.h | 51 + deps/getdns/getdns/src/gldns/parse.c | 483 ++ deps/getdns/getdns/src/gldns/parse.h | 184 + deps/getdns/getdns/src/gldns/parseutil.c | 739 ++ deps/getdns/getdns/src/gldns/parseutil.h | 148 + deps/getdns/getdns/src/gldns/pkthdr.h | 158 + deps/getdns/getdns/src/gldns/rrdef.c | 764 ++ deps/getdns/getdns/src/gldns/rrdef.h | 527 ++ deps/getdns/getdns/src/gldns/str2wire.c | 2208 +++++ deps/getdns/getdns/src/gldns/str2wire.h | 576 ++ deps/getdns/getdns/src/gldns/wire2str.c | 2136 +++++ deps/getdns/getdns/src/gldns/wire2str.h | 1057 +++ .../getdns/src/gnutls/keyraw-internal.c | 15 + .../getdns/src/gnutls/keyraw-internal.h | 31 + .../src/gnutls/pubkey-pinning-internal.c | 59 + deps/getdns/getdns/src/gnutls/tls-internal.h | 103 + deps/getdns/getdns/src/gnutls/tls.c | 903 ++ deps/getdns/getdns/src/jsmn/.gitattributes | 6 + deps/getdns/getdns/src/jsmn/.travis.yml | 4 + deps/getdns/getdns/src/jsmn/LICENSE | 20 + deps/getdns/getdns/src/jsmn/README.md | 168 + .../getdns/getdns/src/jsmn/example/jsondump.c | 126 + deps/getdns/getdns/src/jsmn/example/simple.c | 76 + deps/getdns/getdns/src/jsmn/jsmn.c | 353 + deps/getdns/getdns/src/jsmn/jsmn.h | 76 + deps/getdns/getdns/src/jsmn/library.json | 16 + deps/getdns/getdns/src/jsmn/test/test.h | 27 + deps/getdns/getdns/src/jsmn/test/tests.c | 407 + deps/getdns/getdns/src/jsmn/test/testutil.h | 94 + deps/getdns/getdns/src/libgetdns.symbols | 190 + deps/getdns/getdns/src/list.c | 678 ++ deps/getdns/getdns/src/list.h | 77 + deps/getdns/getdns/src/mdns.c | 2119 +++++ deps/getdns/getdns/src/mdns.h | 119 + deps/getdns/getdns/src/mk-const-info.c.sh | 76 + deps/getdns/getdns/src/mk-symfiles.sh | 17 + .../getdns/src/openssl/keyraw-internal.c | 380 + .../getdns/src/openssl/keyraw-internal.h | 110 + .../src/openssl/pubkey-pinning-internal.c | 90 + deps/getdns/getdns/src/openssl/tls-internal.h | 92 + deps/getdns/getdns/src/openssl/tls.c | 1278 +++ deps/getdns/getdns/src/platform.c | 180 + deps/getdns/getdns/src/platform.h | 151 + deps/getdns/getdns/src/pubkey-pinning.c | 291 + deps/getdns/getdns/src/pubkey-pinning.h | 56 + deps/getdns/getdns/src/request-internal.c | 985 +++ deps/getdns/getdns/src/rr-dict.c | 1423 ++++ deps/getdns/getdns/src/rr-dict.h | 153 + deps/getdns/getdns/src/rr-iter.c | 609 ++ deps/getdns/getdns/src/rr-iter.h | 209 + deps/getdns/getdns/src/server.c | 1146 +++ deps/getdns/getdns/src/server.h | 40 + .../getdns/getdns/src/ssl_dane/.gitattributes | 6 + .../getdns/src/ssl_dane/Danessl/Danessl.xs | 543 ++ .../getdns/src/ssl_dane/Danessl/MANIFEST | 7 + .../getdns/src/ssl_dane/Danessl/Makefile.PL | 14 + .../getdns/getdns/src/ssl_dane/Danessl/README | 38 + .../src/ssl_dane/Danessl/lib/Danessl.pm | 201 + .../getdns/src/ssl_dane/Danessl/ppport.h | 7582 +++++++++++++++++ .../getdns/src/ssl_dane/Danessl/t/Danessl.t | 35 + deps/getdns/getdns/src/ssl_dane/README.md | 19 + deps/getdns/getdns/src/ssl_dane/connected.c | 238 + deps/getdns/getdns/src/ssl_dane/danessl.c | 1500 ++++ deps/getdns/getdns/src/ssl_dane/danessl.h | 47 + deps/getdns/getdns/src/ssl_dane/offline.c | 285 + .../getdns/src/ssl_dane/test-offline.sh | 241 + deps/getdns/getdns/src/stub.c | 2334 +++++ deps/getdns/getdns/src/stub.h | 47 + deps/getdns/getdns/src/sync.c | 269 + deps/getdns/getdns/src/tls.h | 465 + deps/getdns/getdns/src/tls/anchor-internal.c | 382 + .../getdns/src/tls/pubkey-pinning-internal.h | 42 + deps/getdns/getdns/src/tls/val_secalgo.c | 1894 ++++ .../getdns/src/tls/validator/val_nsec3.h | 1 + .../getdns/src/tls/validator/val_secalgo.h | 53 + deps/getdns/getdns/src/tools/Dockerfile | 42 + deps/getdns/getdns/src/tools/README.adoc | 263 + deps/getdns/getdns/src/tools/getdns_query.c | 1926 +++++ .../getdns/src/tools/getdns_server_mon.c | 1989 +++++ deps/getdns/getdns/src/types-internal.h | 455 + deps/getdns/getdns/src/ub_loop.c | 471 + deps/getdns/getdns/src/ub_loop.h | 79 + deps/getdns/getdns/src/util-internal.c | 1691 ++++ deps/getdns/getdns/src/util-internal.h | 223 + .../getdns/src/util/auxiliary/fptr_wlist.h | 1 + deps/getdns/getdns/src/util/auxiliary/log.h | 1 + .../getdns/src/util/auxiliary/sldns/keyraw.h | 1 + .../getdns/src/util/auxiliary/sldns/rrdef.h | 1 + .../getdns/src/util/auxiliary/sldns/sbuffer.h | 1 + .../util/auxiliary/util/data/packed_rrset.h | 1 + .../src/util/auxiliary/util/fptr_wlist.h | 42 + .../getdns/src/util/auxiliary/util/log.h | 60 + .../src/util/auxiliary/util/storage/lookup3.h | 1 + .../src/util/auxiliary/util/storage/lruhash.h | 1 + deps/getdns/getdns/src/util/import.sh | 14 + deps/getdns/getdns/src/util/locks.c | 265 + deps/getdns/getdns/src/util/locks.h | 64 + deps/getdns/getdns/src/util/lookup3.c | 1055 +++ deps/getdns/getdns/src/util/lookup3.h | 41 + deps/getdns/getdns/src/util/lruhash.c | 634 ++ deps/getdns/getdns/src/util/lruhash.h | 71 + .../getdns/src/util/orig-headers/locks.h | 316 + .../getdns/src/util/orig-headers/lookup3.h | 71 + .../getdns/src/util/orig-headers/lruhash.h | 446 + .../getdns/src/util/orig-headers/rbtree.h | 192 + .../src/util/orig-headers/val_secalgo.h | 107 + deps/getdns/getdns/src/util/rbtree.c | 628 ++ deps/getdns/getdns/src/util/rbtree.h | 50 + deps/getdns/getdns/src/util/val_secalgo.h | 54 + deps/getdns/getdns/src/version.c.in | 56 + deps/getdns/getdns/src/yxml/.gitattributes | 7 + deps/getdns/getdns/src/yxml/.gitignore | 4 + deps/getdns/getdns/src/yxml/COPYING | 20 + deps/getdns/getdns/src/yxml/bench/.gitignore | 5 + deps/getdns/getdns/src/yxml/bench/Makefile | 131 + deps/getdns/getdns/src/yxml/bench/bench.c | 123 + deps/getdns/getdns/src/yxml/bench/runbench.sh | 22 + deps/getdns/getdns/src/yxml/yxml-gen.pl | 119 + deps/getdns/getdns/src/yxml/yxml-states | 178 + deps/getdns/getdns/src/yxml/yxml.c | 1065 +++ deps/getdns/getdns/src/yxml/yxml.c.in | 318 + deps/getdns/getdns/src/yxml/yxml.h | 162 + deps/getdns/getdns/src/yxml/yxml.md | 428 + doc/guides/maintaining-getdns.md | 46 + node.gyp | 1 + node.gypi | 4 + tools/license-builder.sh | 1 + 201 files changed, 85265 insertions(+) create mode 100644 deps/getdns/configure_file.py create mode 100644 deps/getdns/getdns.gyp create mode 100644 deps/getdns/getdns/.gitignore create mode 100644 deps/getdns/getdns/CMakeLists.txt create mode 100644 deps/getdns/getdns/LICENSE create mode 100644 deps/getdns/getdns/cmake/include/cmakeconfig.h.in create mode 100644 deps/getdns/getdns/cmake/include/getdns_shared_version.rc.in create mode 100644 deps/getdns/getdns/cmake/modules/FindCheck.cmake create mode 100644 deps/getdns/getdns/cmake/modules/FindGnuTLS.cmake create mode 100644 deps/getdns/getdns/cmake/modules/FindLibev.cmake create mode 100644 deps/getdns/getdns/cmake/modules/FindLibevent2.cmake create mode 100644 deps/getdns/getdns/cmake/modules/FindLibidn2.cmake create mode 100644 deps/getdns/getdns/cmake/modules/FindLibunbound.cmake create mode 100644 deps/getdns/getdns/cmake/modules/FindLibuv.cmake create mode 100644 deps/getdns/getdns/cmake/modules/FindNettle.cmake create mode 100644 deps/getdns/getdns/cmake/modules/TargetSharedLibraryExports.cmake create mode 100644 deps/getdns/getdns/cmake/modules/TargetSharedLibraryVersion.cmake create mode 100644 deps/getdns/getdns/getdns.pc.in create mode 100644 deps/getdns/getdns/getdns_ext_event.pc.in create mode 100644 deps/getdns/getdns/src/Doxyfile.in create mode 100644 deps/getdns/getdns/src/anchor.c create mode 100644 deps/getdns/getdns/src/anchor.h create mode 100644 deps/getdns/getdns/src/compat/arc4_lock.c create mode 100644 deps/getdns/getdns/src/compat/arc4random.c create mode 100644 deps/getdns/getdns/src/compat/arc4random_uniform.c create mode 100644 deps/getdns/getdns/src/compat/chacha_private.h create mode 100644 deps/getdns/getdns/src/compat/explicit_bzero.c create mode 100644 deps/getdns/getdns/src/compat/getentropy_linux.c create mode 100644 deps/getdns/getdns/src/compat/getentropy_osx.c create mode 100644 deps/getdns/getdns/src/compat/getentropy_solaris.c create mode 100644 deps/getdns/getdns/src/compat/getentropy_win.c create mode 100644 deps/getdns/getdns/src/compat/gettimeofday.c create mode 100644 deps/getdns/getdns/src/compat/inet_ntop.c create mode 100644 deps/getdns/getdns/src/compat/inet_pton.c create mode 100644 deps/getdns/getdns/src/compat/mkstemp.c create mode 100644 deps/getdns/getdns/src/compat/sha512.c create mode 100644 deps/getdns/getdns/src/compat/strlcpy.c create mode 100644 deps/getdns/getdns/src/compat/strptime.c create mode 100644 deps/getdns/getdns/src/const-info.c create mode 100644 deps/getdns/getdns/src/const-info.h create mode 100644 deps/getdns/getdns/src/context.c create mode 100644 deps/getdns/getdns/src/context.h create mode 100644 deps/getdns/getdns/src/convert.c create mode 100644 deps/getdns/getdns/src/convert.h create mode 100644 deps/getdns/getdns/src/debug.h create mode 100644 deps/getdns/getdns/src/dict.c create mode 100644 deps/getdns/getdns/src/dict.h create mode 100644 deps/getdns/getdns/src/dnssec.c create mode 100644 deps/getdns/getdns/src/dnssec.h create mode 100644 deps/getdns/getdns/src/extension/default_eventloop.h create mode 100644 deps/getdns/getdns/src/extension/libev.c create mode 100644 deps/getdns/getdns/src/extension/libev.symbols create mode 100644 deps/getdns/getdns/src/extension/libevent.c create mode 100644 deps/getdns/getdns/src/extension/libevent.symbols create mode 100644 deps/getdns/getdns/src/extension/libuv.c create mode 100644 deps/getdns/getdns/src/extension/libuv.symbols create mode 100644 deps/getdns/getdns/src/extension/poll_eventloop.c create mode 100644 deps/getdns/getdns/src/extension/poll_eventloop.h create mode 100644 deps/getdns/getdns/src/extension/select_eventloop.c create mode 100644 deps/getdns/getdns/src/extension/select_eventloop.h create mode 100644 deps/getdns/getdns/src/general.c create mode 100644 deps/getdns/getdns/src/general.h create mode 100644 deps/getdns/getdns/src/getdns/getdns.h.in create mode 100644 deps/getdns/getdns/src/getdns/getdns_ext_libev.h create mode 100644 deps/getdns/getdns/src/getdns/getdns_ext_libevent.h create mode 100644 deps/getdns/getdns/src/getdns/getdns_ext_libuv.h create mode 100644 deps/getdns/getdns/src/getdns/getdns_extra.h.in create mode 100755 deps/getdns/getdns/src/gldns/compare.sh create mode 100644 deps/getdns/getdns/src/gldns/gbuffer.c create mode 100644 deps/getdns/getdns/src/gldns/gbuffer.h create mode 100755 deps/getdns/getdns/src/gldns/import.sh create mode 100644 deps/getdns/getdns/src/gldns/keyraw.c create mode 100644 deps/getdns/getdns/src/gldns/keyraw.h create mode 100644 deps/getdns/getdns/src/gldns/parse.c create mode 100644 deps/getdns/getdns/src/gldns/parse.h create mode 100644 deps/getdns/getdns/src/gldns/parseutil.c create mode 100644 deps/getdns/getdns/src/gldns/parseutil.h create mode 100644 deps/getdns/getdns/src/gldns/pkthdr.h create mode 100644 deps/getdns/getdns/src/gldns/rrdef.c create mode 100644 deps/getdns/getdns/src/gldns/rrdef.h create mode 100644 deps/getdns/getdns/src/gldns/str2wire.c create mode 100644 deps/getdns/getdns/src/gldns/str2wire.h create mode 100644 deps/getdns/getdns/src/gldns/wire2str.c create mode 100644 deps/getdns/getdns/src/gldns/wire2str.h create mode 100644 deps/getdns/getdns/src/gnutls/keyraw-internal.c create mode 100644 deps/getdns/getdns/src/gnutls/keyraw-internal.h create mode 100644 deps/getdns/getdns/src/gnutls/pubkey-pinning-internal.c create mode 100644 deps/getdns/getdns/src/gnutls/tls-internal.h create mode 100644 deps/getdns/getdns/src/gnutls/tls.c create mode 100644 deps/getdns/getdns/src/jsmn/.gitattributes create mode 100644 deps/getdns/getdns/src/jsmn/.travis.yml create mode 100644 deps/getdns/getdns/src/jsmn/LICENSE create mode 100644 deps/getdns/getdns/src/jsmn/README.md create mode 100644 deps/getdns/getdns/src/jsmn/example/jsondump.c create mode 100644 deps/getdns/getdns/src/jsmn/example/simple.c create mode 100644 deps/getdns/getdns/src/jsmn/jsmn.c create mode 100644 deps/getdns/getdns/src/jsmn/jsmn.h create mode 100644 deps/getdns/getdns/src/jsmn/library.json create mode 100644 deps/getdns/getdns/src/jsmn/test/test.h create mode 100644 deps/getdns/getdns/src/jsmn/test/tests.c create mode 100644 deps/getdns/getdns/src/jsmn/test/testutil.h create mode 100644 deps/getdns/getdns/src/libgetdns.symbols create mode 100644 deps/getdns/getdns/src/list.c create mode 100644 deps/getdns/getdns/src/list.h create mode 100644 deps/getdns/getdns/src/mdns.c create mode 100644 deps/getdns/getdns/src/mdns.h create mode 100755 deps/getdns/getdns/src/mk-const-info.c.sh create mode 100755 deps/getdns/getdns/src/mk-symfiles.sh create mode 100644 deps/getdns/getdns/src/openssl/keyraw-internal.c create mode 100644 deps/getdns/getdns/src/openssl/keyraw-internal.h create mode 100644 deps/getdns/getdns/src/openssl/pubkey-pinning-internal.c create mode 100644 deps/getdns/getdns/src/openssl/tls-internal.h create mode 100644 deps/getdns/getdns/src/openssl/tls.c create mode 100644 deps/getdns/getdns/src/platform.c create mode 100644 deps/getdns/getdns/src/platform.h create mode 100644 deps/getdns/getdns/src/pubkey-pinning.c create mode 100644 deps/getdns/getdns/src/pubkey-pinning.h create mode 100644 deps/getdns/getdns/src/request-internal.c create mode 100644 deps/getdns/getdns/src/rr-dict.c create mode 100644 deps/getdns/getdns/src/rr-dict.h create mode 100644 deps/getdns/getdns/src/rr-iter.c create mode 100644 deps/getdns/getdns/src/rr-iter.h create mode 100644 deps/getdns/getdns/src/server.c create mode 100644 deps/getdns/getdns/src/server.h create mode 100644 deps/getdns/getdns/src/ssl_dane/.gitattributes create mode 100644 deps/getdns/getdns/src/ssl_dane/Danessl/Danessl.xs create mode 100644 deps/getdns/getdns/src/ssl_dane/Danessl/MANIFEST create mode 100644 deps/getdns/getdns/src/ssl_dane/Danessl/Makefile.PL create mode 100644 deps/getdns/getdns/src/ssl_dane/Danessl/README create mode 100644 deps/getdns/getdns/src/ssl_dane/Danessl/lib/Danessl.pm create mode 100644 deps/getdns/getdns/src/ssl_dane/Danessl/ppport.h create mode 100644 deps/getdns/getdns/src/ssl_dane/Danessl/t/Danessl.t create mode 100644 deps/getdns/getdns/src/ssl_dane/README.md create mode 100644 deps/getdns/getdns/src/ssl_dane/connected.c create mode 100644 deps/getdns/getdns/src/ssl_dane/danessl.c create mode 100644 deps/getdns/getdns/src/ssl_dane/danessl.h create mode 100644 deps/getdns/getdns/src/ssl_dane/offline.c create mode 100755 deps/getdns/getdns/src/ssl_dane/test-offline.sh create mode 100644 deps/getdns/getdns/src/stub.c create mode 100644 deps/getdns/getdns/src/stub.h create mode 100644 deps/getdns/getdns/src/sync.c create mode 100644 deps/getdns/getdns/src/tls.h create mode 100644 deps/getdns/getdns/src/tls/anchor-internal.c create mode 100644 deps/getdns/getdns/src/tls/pubkey-pinning-internal.h create mode 100644 deps/getdns/getdns/src/tls/val_secalgo.c create mode 100644 deps/getdns/getdns/src/tls/validator/val_nsec3.h create mode 100644 deps/getdns/getdns/src/tls/validator/val_secalgo.h create mode 100644 deps/getdns/getdns/src/tools/Dockerfile create mode 100644 deps/getdns/getdns/src/tools/README.adoc create mode 100644 deps/getdns/getdns/src/tools/getdns_query.c create mode 100644 deps/getdns/getdns/src/tools/getdns_server_mon.c create mode 100644 deps/getdns/getdns/src/types-internal.h create mode 100644 deps/getdns/getdns/src/ub_loop.c create mode 100644 deps/getdns/getdns/src/ub_loop.h create mode 100644 deps/getdns/getdns/src/util-internal.c create mode 100644 deps/getdns/getdns/src/util-internal.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/fptr_wlist.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/log.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/sldns/keyraw.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/sldns/rrdef.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/sldns/sbuffer.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/util/data/packed_rrset.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/util/fptr_wlist.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/util/log.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/util/storage/lookup3.h create mode 100644 deps/getdns/getdns/src/util/auxiliary/util/storage/lruhash.h create mode 100755 deps/getdns/getdns/src/util/import.sh create mode 100644 deps/getdns/getdns/src/util/locks.c create mode 100644 deps/getdns/getdns/src/util/locks.h create mode 100644 deps/getdns/getdns/src/util/lookup3.c create mode 100644 deps/getdns/getdns/src/util/lookup3.h create mode 100644 deps/getdns/getdns/src/util/lruhash.c create mode 100644 deps/getdns/getdns/src/util/lruhash.h create mode 100644 deps/getdns/getdns/src/util/orig-headers/locks.h create mode 100644 deps/getdns/getdns/src/util/orig-headers/lookup3.h create mode 100644 deps/getdns/getdns/src/util/orig-headers/lruhash.h create mode 100644 deps/getdns/getdns/src/util/orig-headers/rbtree.h create mode 100644 deps/getdns/getdns/src/util/orig-headers/val_secalgo.h create mode 100644 deps/getdns/getdns/src/util/rbtree.c create mode 100644 deps/getdns/getdns/src/util/rbtree.h create mode 100644 deps/getdns/getdns/src/util/val_secalgo.h create mode 100644 deps/getdns/getdns/src/version.c.in create mode 100644 deps/getdns/getdns/src/yxml/.gitattributes create mode 100644 deps/getdns/getdns/src/yxml/.gitignore create mode 100644 deps/getdns/getdns/src/yxml/COPYING create mode 100644 deps/getdns/getdns/src/yxml/bench/.gitignore create mode 100644 deps/getdns/getdns/src/yxml/bench/Makefile create mode 100644 deps/getdns/getdns/src/yxml/bench/bench.c create mode 100755 deps/getdns/getdns/src/yxml/bench/runbench.sh create mode 100755 deps/getdns/getdns/src/yxml/yxml-gen.pl create mode 100644 deps/getdns/getdns/src/yxml/yxml-states create mode 100644 deps/getdns/getdns/src/yxml/yxml.c create mode 100644 deps/getdns/getdns/src/yxml/yxml.c.in create mode 100644 deps/getdns/getdns/src/yxml/yxml.h create mode 100644 deps/getdns/getdns/src/yxml/yxml.md create mode 100644 doc/guides/maintaining-getdns.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a0e26501434a4f..d8d5ac9e5d396c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -33,6 +33,7 @@ # net +/deps/getdns @nodejs/net /deps/cares @nodejs/net /doc/api/dns.md @nodejs/net /doc/api/dgram.md @nodejs/net diff --git a/configure.py b/configure.py index 65fcbc8f28267c..ef43aa156e6ae1 100755 --- a/configure.py +++ b/configure.py @@ -416,6 +416,27 @@ dest='shared_cares_libpath', help='a directory to search for the shared cares DLL') +shared_optgroup.add_argument('--shared-getdns', + action='store_true', + dest='shared_getdns', + help='link to a shared getdns DLL instead of static linking') + +shared_optgroup.add_argument('--shared-getdns-includes', + action='store', + dest='shared_getdns_includes', + help='directory containing getdns header files') + +shared_optgroup.add_argument('--shared-getdns-libname', + action='store', + dest='shared_getdns_libname', + default='getdns', + help='alternative lib name to link to [default: %default]') + +shared_optgroup.add_argument('--shared-getdns-libpath', + action='store', + dest='shared_getdns_libpath', + help='a directory to search for the shared getdns DLL') + parser.add_argument_group(shared_optgroup) parser.add_argument('--systemtap-includes', @@ -1884,6 +1905,7 @@ def make_bin_override(): configure_library('nghttp2', output, pkgname='libnghttp2') configure_library('nghttp3', output, pkgname='libnghttp3') configure_library('ngtcp2', output, pkgname='libngtcp2') +configure_library('getdns', output) configure_v8(output) configure_openssl(output) configure_intl(output) diff --git a/deps/getdns/configure_file.py b/deps/getdns/configure_file.py new file mode 100644 index 00000000000000..6ea207d495d1d9 --- /dev/null +++ b/deps/getdns/configure_file.py @@ -0,0 +1,216 @@ +import sys +import re + +index = sys.argv.index('--target'); +inputs = sys.argv[1:index] +outputs = sys.argv[index + 1:] +assert len(inputs) == len(outputs) + +IS_MAC = sys.platform.startswith('darwin') +IS_LINUX = sys.platform.startswith('linux') +IS_WINDOWS = sys.platform.startswith('win32') +IS_BSD = 'bsd' in sys.platform + +vars = { + 'prefix': '@prefix@', + 'PACKAGE': '@PACKAGE@', + 'PACKAGE_NAME': '@PACKAGE_NAME@', + 'PACKAGE_VERSION': '@PACKAGE_VERSION@', + 'PACKAGE_URL': '@PACKAGE_URL@', + 'PACKAGE_BUGREPORT': '@PACKAGE_BUGREPORT@', + 'PACKAGE_STRING': '@PACKAGE_STRING@', + 'PACKAGE_TARNAME': '@PACKAGE_TARNAME@', + 'GETDNS_COMPILATION_COMMENT': '', + 'GETDNS_VERSION': '1.6.0', + 'GETDNS_NUMERIC_VERSION': '0x01060000', + 'GETDNS_API_VERSION': 'December 2015', + 'API_VERSION': 'December 2015', + 'API_NUMERIC_VERSION': '0x07df0c00', + 'HAVE_ASSERT_H': True, + 'HAVE_INTTYPES_H': True, + 'HAVE_LIMITS_H': True, + 'HAVE_SYS_LIMITS_H': False, + 'HAVE_STDARG_H': True, + 'HAVE_STDINT_H': True, + 'HAVE_STDIO_H': True, + 'HAVE_STDLIB_H': True, + 'HAVE_STRING_H': True, + 'HAVE_TIME_H': True, + 'HAVE_UNISTD_H': not IS_WINDOWS, + 'HAVE_FCNTL_H': not IS_WINDOWS, + 'HAVE_SIGNAL_H': not IS_WINDOWS, + 'HAVE_SYS_POLL_H': not IS_WINDOWS, + 'HAVE_POLL_H': True, + 'HAVE_RESOURCE_H': False, + 'HAVE_SYS_TYPES_H': True, + 'HAVE_SYS_STAT_H': True, + 'HAVE_ENDIAN_H': True, + 'HAVE_NETDB_H': not IS_WINDOWS, + 'HAVE_ARPA_INET_H': not IS_WINDOWS, + 'HAVE_NETINET_IN_H': not IS_WINDOWS, + 'HAVE_NETINET_TCP_H': not IS_WINDOWS, + 'HAVE_SYS_SELECT_H': not IS_WINDOWS, + 'HAVE_SYS_SOCKET_H': not IS_WINDOWS, + 'HAVE_SYS_SYSCTL_H': not IS_WINDOWS, + 'HAVE_SYS_TIME_H': not IS_WINDOWS, + 'HAVE_SYS_WAIT_H': not IS_WINDOWS, + 'HAVE_WINDOWS_H': IS_WINDOWS, + 'HAVE_WINSOCK_H': IS_WINDOWS, + 'HAVE_WINSOCK2_H': IS_WINDOWS, + 'HAVE_WS2TCPIP_H': IS_WINDOWS, + 'GETDNS_ON_WINDOWS': IS_WINDOWS, + 'USE_WINSOCK': IS_WINDOWS, + 'HAVE_SSL': True, + 'USE_DANESSL': False, + 'HAVE_OPENSSL_SSL_H': True, + 'HAVE_OPENSSL_EVP_H': True, + 'HAVE_OPENSSL_ERR_H': True, + 'HAVE_OPENSSL_RAND_H': True, + 'HAVE_OPENSSL_CONF_H': True, + 'HAVE_OPENSSL_ENGINE_H': True, + 'HAVE_DSA_SIG_SET0': True, + 'HAVE_DSA_SET0_PQG': True, + 'HAVE_DSA_SET0_KEY': True, + 'HAVE_RSA_SET0_KEY': True, + 'HAVE_EVP_MD5': True, + 'HAVE_EVP_SHA1': True, + 'HAVE_EVP_SHA224': True, + 'HAVE_EVP_SHA256': True, + 'HAVE_EVP_SHA384': True, + 'HAVE_EVP_SHA512': True, + 'HAVE_EVP_DSS1': False, + 'HAVE_EVP_DIGESTVERIFY': True, + 'HAVE_EVP_MD_CTX_NEW': True, + 'HAVE_HMAC_CTX_NEW': True, + 'HAVE_NETTLE_GET_SECP_256R1': False, + 'HAVE_NETTLE_GET_SECP_384R1': False, + 'HAVE_TLS_CLIENT_METHOD': True, + 'HAVE_OPENSSL_VERSION_NUM': True, + 'HAVE_OPENSSL_VERSION': True, + 'HAVE_SSL_CTX_DANE_ENABLE': True, + 'HAVE_SSL_CTX_SET_CIPHERSUITS': True, + 'HAVE_SSL_SET_CIPHERSUITES': True, + 'HAVE_SSL_SET_CIPHERSUITS': True, + 'HAVE_OPENSSL_INIT_CRYPTO': True, + 'HAVE_SSL_DANE_ENABLE': True, + 'HAVE_SSL_CTX_SET_CIPHERSUITES': True, + 'HAVE_DECL_SSL_CTX_SET1_CURVES_LIST': True, + 'HAVE_DECL_SSL_SET1_CURVES_LIST': True, + 'HAVE_DECL_SSL_SET_MIN_PROTO_VERSION': True, + 'HAVE_X509_GET_NOTAFTER': True, + 'HAVE_X509_GET0_NOTAFTER': True, + 'HAVE_PTHREAD': not IS_WINDOWS, + 'HAVE_WINDOWS_THREADS': IS_WINDOWS, + 'RUNSTATEDIR': False, + 'TRUST_ANCHOR_FILE': '@PATH_TRUST_ANCHOR_FILE@', + 'PATH_TRUST_ANCHOR_FILE': '/usr/local/etc/unbound/getdns-root.key', + 'GETDNS_FN_RESOLVCONF': '@PATH_RESOLVCONF@', + 'PATH_RESOLVCONF': '/etc/resolv.conf', + 'GETDNS_FN_HOSTS': '@PATH_HOSTS@', + 'PATH_HOSTS': '/etc/hosts', + 'DNSSEC_ROADBLOCK_AVOIDANCE': True, + 'HAVE_MDNS_SUPPORT': False, + 'STUB_NATIVE_DNSSEC': True, + 'MAXIMUM_UPSTREAM_OPTION_SPACE': '3000', + 'EDNS_PADDING_OPCODE': '12', + 'MAX_CNAME_REFERRALS': '100', + 'DRAFT_RRTYPES': '1', + 'EDNS_COOKIES': True, + 'EDNS_COOKIE_OPCODE': '10', + 'EDNS_COOKIE_ROLLOVER_TIME': '(24*60*60)', + 'UDP_MAX_BACKOFF': '@MAX_UDP_BACKOFF@', + 'MAX_UDP_BACKOFF': '1000', + 'HAVE_DECL_GETENTROPY': True, + 'HAVE_DECL_INET_PTON': True, + 'HAVE_DECL_INET_NTOP': True, + 'HAVE_WIN_DECL_INET_PTON': False, + 'HAVE_WIN_DECL_INET_NTOP': False, + 'HAVE_DECL_MKSTEMP': not IS_WINDOWS, + 'HAVE_DECL_SIGEMPTYSET': True, + 'HAVE_DECL_SIGFILLSET': True, + 'HAVE_DECL_SIGADDSET': True, + 'HAVE_DECL_STRPTIME': not IS_WINDOWS, + 'HAVE_DECL_TCP_FASTOPEN': IS_LINUX, + 'HAVE_DECL_TCP_FASTOPEN_CONNECT': IS_LINUX, + 'HAVE_DECL_MSG_FASTOPEN': IS_LINUX, + 'HAVE_FCNTL': not IS_WINDOWS, + 'HAVE_GETTIMEOFDAY': not IS_WINDOWS, + 'HAVE_IOCTLSOCKET': False, + 'HAVE_SIGEMPTYSET': True, + 'HAVE_SIGFILLSET': True, + 'HAVE_SIGADDSET': True, + 'HAVE_STRPTIME': not IS_WINDOWS, + 'HAVE_SIGSET_T': True, + 'HAVE__SIGSET_T': False, + 'HAVE_BSD_STDLIB_H': IS_BSD, + 'HAVE_BSD_STRING_H': IS_BSD, + 'HAVE_DECL_STRLCPY': IS_BSD or IS_MAC, + 'HAVE_DECL_ARC4RANDOM': IS_BSD, + 'HAVE_DECL_ARC4RANDOM_UNIFORM': IS_BSD, + 'HAVE_BSD_DECL_STRLCPY': IS_BSD or IS_MAC, + 'HAVE_BSD_DECL_ARC4RANDOM': IS_BSD, + 'HAVE_BSD_DECL_ARC4RANDOM_UNIFORM': IS_BSD, + 'HAVE_STRLCPY': IS_BSD or IS_MAC, + 'HAVE_ARC4RANDOM': IS_BSD, + 'HAVE_ARC4RANDOM_UNIFORM': IS_BSD, + 'HAVE_LIBUNBOUND': False, + 'HAVE_UNBOUND_EVENT_H': False, + 'HAVE_UNBOUND_EVENT_API': False, + 'HAVE_UB_CTX_SET_STUB': True, + 'HAVE_LIBIDN': False, + 'HAVE_LIBIDN2': False, + 'HAVE_NETTLE': False, + 'HAVE_NETTLE_DSA_COMPAT_H': False, + 'HAVE_NETTLE_EDDSA_H': False, + 'HAVE_EVENT2_EVENT_H': False, + 'HAVE_EVENT_BASE_NEW': False, + 'HAVE_EVENT_BASE_FREE': False, + 'DEFAULT_EVENTLOOP': 'select_eventloop', + 'USE_POLL_DEFAULT_EVENTLOOP': False, + 'STRPTIME_WORKS': not IS_WINDOWS, + 'FD_SETSIZE': False, + 'REQ_DEBUG': False, + 'SCHED_DEBUG': False, + 'STUB_DEBUG': False, + 'DAEMON_DEBUG': False, + 'SEC_DEBUG': False, + 'SERVER_DEBUG': False, + 'ANCHOR_DEBUG': False, + 'KEEP_CONNECTIONS_OPEN_DEBUG': False, + 'USE_SHA1': True, + 'USE_SHA2': True, + 'USE_GOST': True, + 'USE_ECDSA': True, + 'USE_DSA': True, + 'USE_ED25519': True, + 'USE_ED448': True, + 'USE_OSX_TCP_FASTOPEN': IS_MAC, + 'HAVE_NEW_UV_TIMER_CB': True, + 'HAVE_TARGET_ENDIANNESS': True, + 'TARGET_IS_BIG_ENDIAN': sys.byteorder == 'big', + 'HAVE___FUNC__': False, +} + +def replace_cmakedefine(s): + if s.startswith('#cmakedefine'): + name = re.split('\s+', s)[1] + if vars[name] != False: + return re.sub('#cmakedefine', '#define', s) + return '' + return s + +def replace_cmakevar_match(match): + return vars[match.group(1)] + +def replace_cmakevar(s): + return re.sub(r'@(\w+?)@', replace_cmakevar_match, s) + +for i in range(len(inputs)): + with open(inputs[i]) as input_file: + input = input_file.read() + + input = '\n'.join(map(replace_cmakedefine, input.splitlines())) + input = replace_cmakevar(input) + + with open(outputs[i], 'w') as output_file: + output_file.write(input) diff --git a/deps/getdns/getdns.gyp b/deps/getdns/getdns.gyp new file mode 100644 index 00000000000000..bc0788243f2769 --- /dev/null +++ b/deps/getdns/getdns.gyp @@ -0,0 +1,149 @@ +{ + 'targets': [ + { + 'target_name': 'getdns', + 'type': 'static_library', + 'include_dirs': [ + 'getdns/src', + 'getdns/src/getdns', + 'getdns/src/util/auxiliary', + 'getdns/src/openssl', + 'getdns/src/tls', + 'getdns/src/yxml', + '<(SHARED_INTERMEDIATE_DIR)/getdns/src', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + 'getdns/src', + '<(SHARED_INTERMEDIATE_DIR)/getdns/src', + ], + }, + 'actions': [ + { + 'action_name': 'configure_file', + 'process_outputs_as_sources': 1, + 'inputs': [ + # Put the code first so it's a dependency and can be used for invocation. + 'configure_file.py', + 'getdns/cmake/include/cmakeconfig.h.in', + 'getdns/src/getdns/getdns.h.in', + 'getdns/src/getdns/getdns_extra.h.in', + 'getdns/src/version.c.in', + 'getdns/getdns.pc.in', + ], + 'outputs': [ + '<(SHARED_INTERMEDIATE_DIR)/getdns/src/config.h', + '<(SHARED_INTERMEDIATE_DIR)/getdns/src/getdns/getdns.h', + '<(SHARED_INTERMEDIATE_DIR)/getdns/src/getdns/getdns_extra.h', + '<(SHARED_INTERMEDIATE_DIR)/getdns/src/version.c', + '<(SHARED_INTERMEDIATE_DIR)/getdns/getdns.pc', + ], + 'action': [ + 'python', '<@(_inputs)', '--target', '<@(_outputs)', + ], + }, + ], + 'conditions': [ + ['node_shared_openssl=="false"', { + 'dependencies': [ + '../openssl/openssl.gyp:openssl' + ] + }], + ['node_shared_libuv=="false"', { + 'dependencies': [ + '../uv/uv.gyp:libuv' + ] + }], + [ 'OS=="linux"', { + 'defines': [ + '_GNU_SOURCE', + '_DEFAULT_SOURCE', + ], + 'sources': [ + 'getdns/src/compat/arc4random.c', + 'getdns/src/compat/explicit_bzero.c', + 'getdns/src/compat/arc4_lock.c', + 'getdns/src/compat/arc4random_uniform.c', + 'getdns/src/compat/strlcpy.c', + ], + }], + [ 'OS=="win"', { + 'sources': [ + 'getdns/src/compat/gettimeofday.c', + 'getdns/src/compat/arc4random.c', + 'getdns/src/compat/arc4_lock.c', + 'getdns/src/compat/arc4random_uniform.c', + 'getdns/src/compat/getentropy_win.c', + 'getdns/src/compat/strlcpy.c', + 'getdns/src/compat/mkstemp.c', + 'getdns/src/compat/strptime.c', + ], + }], + [ 'OS=="freebsd"', { + 'defines': [ + '_POSIX_C_SOURCE=200112L', + '_XOPEN_SOURCE=600', + ], + }], + [ 'OS=="solaris"', { + 'defines': [ + '__EXTENSIONS_', + ], + }], + [ 'OS in "mac ios"', { + 'defines': ['_DARWIN_C_SOURCE'], + }], + ], + 'sources': [ + 'getdns/src/anchor.c', + 'getdns/src/const-info.c', + 'getdns/src/convert.c', + 'getdns/src/context.c', + 'getdns/src/dict.c', + 'getdns/src/dnssec.c', + 'getdns/src/general.c', + 'getdns/src/list.c', + 'getdns/src/request-internal.c', + 'getdns/src/mdns.c', + 'getdns/src/platform.c', + 'getdns/src/pubkey-pinning.c', + 'getdns/src/rr-dict.c', + 'getdns/src/rr-iter.c', + 'getdns/src/server.c', + 'getdns/src/stub.c', + 'getdns/src/sync.c', + 'getdns/src/ub_loop.c', + 'getdns/src/util-internal.c', + + 'getdns/src/extension/select_eventloop.c', + 'getdns/src/extension/libuv.c', + + 'getdns/src/gldns/keyraw.c', + 'getdns/src/gldns/gbuffer.c', + 'getdns/src/gldns/wire2str.c', + 'getdns/src/gldns/parse.c', + 'getdns/src/gldns/parseutil.c', + 'getdns/src/gldns/rrdef.c', + 'getdns/src/gldns/str2wire.c', + + 'getdns/src/util/rbtree.c', + 'getdns/src/util/lruhash.c', + 'getdns/src/util/lookup3.c', + 'getdns/src/util/locks.c', + + 'getdns/src/jsmn/jsmn.c', + + 'getdns/src/yxml/yxml.c', + + 'getdns/src/tls/val_secalgo.c', + 'getdns/src/tls/anchor-internal.c', + + 'getdns/src/openssl/tls.c', + 'getdns/src/openssl/pubkey-pinning-internal.c', + 'getdns/src/openssl/keyraw-internal.c', + + '<(SHARED_INTERMEDIATE_DIR)/getdns/src/version.c', + ] + } + ] +} diff --git a/deps/getdns/getdns/.gitignore b/deps/getdns/getdns/.gitignore new file mode 100644 index 00000000000000..3fe390fc4936c3 --- /dev/null +++ b/deps/getdns/getdns/.gitignore @@ -0,0 +1,70 @@ +*~ +.DS_Store +build*/ +tests*/ +getdns*.tar.gz +*.o +*.so +.*.swp +.deps/ +.libs/ +Makefile +*.lo +*.la +*.dSYM/ +config.status +autom4te.cache +missing +libtool +config.guess +config.sub +install-sh +spec/example/example-all-functions +spec/example/example-reverse +spec/example/example-simple-answers +spec/example/example-synchronous +spec/example/example-tree +spec/example/example-reverse +src/doc/ +src/config.h +src/test/tests_dict +src/test/tests_list +src/test/tests_stub_async +src/test/tests_stub_sync +src/test/tests_json-pointers +src/test/tests_dnssec +src/test/tests_namespaces +src/test/check_getdns +src/test/check_getdns_event +src/test/check_getdns_uv +src/test/check_getdns_ev +src/test/scratchpad +src/test/scratchpad.c +src/tools/getdns_query +src/tools/getdns_server_mon +src/stubby +doc/*.3 +src/getdns/getdns.h +*.log +src/Doxyfile +src/getdns/getdns_extra.h +src/version.c +aclocal.m4 +configure +ltmain.sh +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 +src/config.h.in +getdns.pc +getdns_ext_event.pc +/src/test/tpkg/result.* +/src/test/tpkg/.done-* +/src/test/tpkg/.tpkg.var.master +/src/test/tpkg/scan-build-reports/ +/src/test/tpkg/install/ +/src/test/tpkg/build/ +/src/test/tpkg/build-stub-only/ +/src/test/tpkg/build-event-loops/ diff --git a/deps/getdns/getdns/CMakeLists.txt b/deps/getdns/getdns/CMakeLists.txt new file mode 100644 index 00000000000000..7d22d3cad290a5 --- /dev/null +++ b/deps/getdns/getdns/CMakeLists.txt @@ -0,0 +1,1157 @@ +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + +if (POLICY CMP0075) + cmake_policy(SET CMP0075 NEW) +endif () + +# The following must be set BEFORE doing project() or enable_language(). +if (NOT CMAKE_BUILD_TYPE) + message(STATUS "No build type defined; defaulting to 'Debug'") + set(CMAKE_BUILD_TYPE "Debug" CACHE STRING + "The type of build. Possible values are: Debug, Release, RelWithDebInfo and MinSizeRel.") +endif () + +set(PACKAGE "getdns") +set(PACKAGE_NAME "getdns") +set(PACKAGE_VERSION "1.6.0") +set(PACKAGE_BUGREPORT "team@getdnsapi.net") +set(PACKAGE_URL "https://getdnsapi.net") + +# Dont forget to put a dash in front of the release candidate!!! +# That is how it is done with semantic versioning! +set(RELEASE_CANDIDATE "") + +set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}${RELEASE_CANDIDATE}") +set(PACKAGE_TARNAME "${PACKAGE}-${PACKAGE_VERSION}${RELEASE_CANDIDATE}") + +set(GETDNS_VERSION "${PACKAGE_VERSION}${RELEASE_CANDIDATE}") +set(GETDNS_NUMERIC_VERSION 0x01060000) +set(API_VERSION "December 2015") +set(API_NUMERIC_VERSION 0x07df0c00) + + +# Library version +# --------------- +# current:revision:age +# (binary-api-number):(which-binary-api-version):(how-many-nrs-backwardscompat) +# if source code changes increment revision +# if any interfaces have been added/removed/changed since last update then +# increment current and set revision to 0 +# if any interfaces have been added since the last public release then increment age +# if any interfaces have been removed or changed since the last public release then +# set age to 0 +# +# getdns-0.1.4 had libversion 0:0:0 +# getdns-0.1.5 had libversion 1:0:0 +# getdns-0.1.6 had libversion 1:1:0 +# getdns-0.1.7 had libversion 1:2:1 (but should have had 2:0:1) +# getdns-0.1.8 had libversion 1:3:0 (but should have had 2:1:1) +# getdns-0.2.0 had libversion 2:2:1 +# getdns-0.3.0 had libversion 3:3:2 +# getdns-0.3.1 had libversion 3:4:2 +# getdns-0.3.2 had libversion 3:5:2 +# getdns-0.3.3 had libversion 3:6:2 +# getdns-0.5.0 had libversion 4:0:3 +# getdns-0.5.1 had libversion 4:1:3 (but should have been getdns-0.6.0) +# getdns-0.9.0 had libversion 5:0:4 +# getdns-1.0.0 had libversion 5:1:4 +# getdns-1.1.0 had libversion 6:0:0 +# getdns-1.1.1 had libversion 6:1:0 +# getdns-1.1.2 had libversion 7:0:1 +# getdns-1.1.3 had libversion 7:1:1 +# getdns-1.2.0 had libversion 8:0:2 +# getdns-1.2.1 had libversion 8:1:2 +# getdns-1.3.0 had libversion 9:0:3 +# getdns-1.4.0 had libversion 10:0:0 +# getdns-1.4.1 had libversion 10:1:0 +# getdns-1.4.2 had libversion 10:2:0 +# getdns-1.5.0 had libversion 11:0:1 +# getdns-1.5.1 had libversion 11:1:1 +# getdns-1.5.2 had libversion 11:2:1 +# getdns-1.6.0 has libversion 11:3:1 +set(GETDNS_VERSION_CURRENT 11) +set(GETDNS_VERSION_REVISION 3) +set(GETDNS_VERSION_AGE 1) + +project(getdns VERSION ${PACKAGE_VERSION} LANGUAGES C) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") + +include(CheckCSourceRuns) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckLibraryExists) +include(CheckSymbolExists) +include(CheckTypeSize) +include(CMakeDependentOption) +include(CTest) +include(GNUInstallDirs) +include(TestBigEndian) + +include(TargetSharedLibraryExports) +include(TargetSharedLibraryVersion) + +# Target Platform +if (WIN32 OR MINGW OR MSYS OR CYGWIN) + set(HOSTOS "windows") + set(GETDNS_ON_WINDOWS 1) + set(USE_WINSOCK 1) +elseif (APPLE) + set(HOSTOS "macos") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DARWIN_C_SOURCE") +elseif (UNIX) + set(HOSTOS "unix") + + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600") + endif () + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(LINUX 1) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE -D_DEFAULT_SOURCE") + elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Solaris") + set(SOLARIS 1) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS_") + endif () +endif () + +test_big_endian(TARGET_IS_BIG_ENDIAN) +set(HAVE_TARGET_ENDIANNESS 1) + +# Options. +option(ENABLE_SHARED "Build shared libraries." ON) +option(ENABLE_STATIC "Build static libraries." ON) +if ((NOT ENABLE_SHARED) AND (NOT ENABLE_STATIC)) + message(FATAL_ERROR "You must build either static or shared libraries.") +endif () + +option(ENABLE_DEBUG_ALL "Enable all debugging messages.") +cmake_dependent_option(ENABLE_DEBUG_REQ "Enable request debugging messages." OFF "NOT ENABLE_DEBUG_ALL" ON) +cmake_dependent_option(ENABLE_DEBUG_SCHED "Enable scheduling debugging messages." OFF "NOT ENABLE_DEBUG_ALL" ON) +cmake_dependent_option(ENABLE_DEBUG_STUB "Enable stub debugging messages." OFF "NOT ENABLE_DEBUG_ALL" ON) +cmake_dependent_option(ENABLE_DEBUG_DAEMON "Enable daemon debugging messages." OFF "NOT ENABLE_DEBUG_ALL" ON) +cmake_dependent_option(ENABLE_DEBUG_DNSSEC "Enable DNSSEC debugging messages." OFF "NOT ENABLE_DEBUG_ALL" ON) +cmake_dependent_option(ENABLE_DEBUG_SERVER "Enable server debugging messages." OFF "NOT ENABLE_DEBUG_ALL" ON) +cmake_dependent_option(ENABLE_DEBUG_ANCHOR "Enable anchor debugging messages." OFF "NOT ENABLE_DEBUG_ALL" ON) + +option(ENABLE_SHA1 "Enable SHA1 RRSIG support." ON) +option(ENABLE_SHA2 "Enable SHA256 and SHA512 RRSIG support." ON) +option(ENABLE_GOST "Enable GOST support." ON) +option(ENABLE_ECDSA "Enable ECDSA support." ON) +option(ENABLE_DSA "Enable DSA support." ON) +option(ENABLE_ED25519 "Enable ED25519 support." ON) +option(ENABLE_ED448 "Enable ED448 support." ON) + +option(ENABLE_DRAFT_MDNS_SUPPORT "Enable draft mdns client support.") +option(ENABLE_EDNS_COOKIES "Enable EDNS cookies." ON) +option(ENABLE_NATIVE_STUB_DNSSEC "Enable native stub DNSSEC support." ON) +option(ENABLE_POLL_EVENTLOOP "Enable default eventloop based on poll." ON) +if (WIN32) + option(ENABLE_STUB_ONLY "Restrict resolution modes to STUB." ON) +else() + option(ENABLE_STUB_ONLY "Restrict resolution modes to STUB." OFF) +endif() +option(ENABLE_TCP_FAST_OPEN "Enable use of TCP Fast Open." ON) +option(ENABLE_UNBOUND_EVENT_API "Enable usage of libunbound's event API." ON) + +option(BUILD_DOXYGEN "Build source documentation." OFF) +option(BUILD_EXAMPLES "Compile the example programs." OFF) +option(BUILD_GETDNS_QUERY "Compile and install the getdns_query tool." ON) +option(BUILD_GETDNS_SERVER_MON "Compile and install the getdns_server_mon tool." ON) +option(BUILD_STUBBY "Compile and install stubby, the (stub) resolver daemon." OFF) + +option(BUILD_LIBEV "Build libev support library if available." ON) +option(BUILD_LIBEVENT2 "Build libevent2 support library if available." ON) +option(BUILD_LIBUV "Build libuv support library available." ON) + +option(USE_LIBIDN2 "Use libidn2 if available." ON) +option(USE_GNUTLS "Use GnuTLS for TLS connections." OFF) + +# Above names chosen for user consistency. Now define substituted names. +set(REQ_DEBUG ${ENABLE_DEBUG_REQ}) +set(SCHED_DEBUG ${ENABLE_DEBUG_SCHED}) +set(STUB_DEBUG ${ENABLE_DEBUG_STUB}) +set(DAEMON_DEBUG ${ENABLE_DEBUG_DAEMON}) +set(SEC_DEBUG ${ENABLE_DEBUG_DNSSEC}) +set(SERVER_DEBUG ${ENABLE_DEBUG_SERVER}) +set(ANCHOR_DEBUG ${ENABLE_DEBUG_ANCHOR}) +set(EDNS_COOKIES ${ENABLE_EDNS_COOKIES}) + +set(USE_SHA1 ${ENABLE_SHA1}) +set(USE_SHA2 ${ENABLE_SHA2}) +set(USE_GOST ${ENABLE_GOST}) +set(USE_ECDSA ${ENABLE_ECDSA}) +set(USE_DSA ${ENABLE_DSA}) +set(USE_ED25519 ${ENABLE_ED25519}) +set(USE_ED448 ${ENABLE_ED448}) + +set(HAVE_MDNS_SUPPORT ${ENABLE_DRAFT_MDNS_SUPPORT}) +set(STUB_NATIVE_DNSSEC ${ENABLE_NATIVE_STUB_DNSSEC}) + +set(USE_LIBEV ${BUILD_LIBEV}) +set(USE_LIBEVENT2 ${BUILD_LIBEVENT2}) +set(USE_LIBUV ${BUILD_LIBUV}) + +option(ENABLE_DEBUG_KEEP_CONNECTIONS_OPEN "Disable connection idle timeout. Do not enable.") +mark_as_advanced(ENABLE_DEBUG_KEEP_CONNECTIONS_OPEN) +set(KEEP_CONNECTIONS_OPEN_DEBUG ${ENABLE_DEBUG_KEEP_CONNECTIONS_OPEN}) + +# Options variables. +string(TIMESTAMP timestamp "%Y-%m-%dT%H:%M:%SZ") +set(CURRENT_DATE "${timestamp}" CACHE STRING "Current date of the compilation, set to fixed date for reproducible builds.") +set(DNSSEC_ROADBLOCK_AVOIDANCE ON CACHE BOOL "Enable/disable DNSSEC roadblock avoidance.") +set(FD_SETSIZE "" CACHE STRING "Set maximum file descriptor number that can be used by select.") +set(MAX_UDP_BACKOFF 1000 CACHE STRING "Set the maximum number of messages that can be sent to other upstreams before the upstream which has previously timed out will be tried again.") +if (WIN32) + # BUG! Don't hardcode the Windows directory and drive. + set(hostsfile "C:/Windows/System32/Drivers/etc/hosts") +else () + set(hostsfile "/etc/hosts") +endif () +set(PATH_HOSTS "${hostsfile}" CACHE STRING "Set the static table lookup for hostnames path.") +set(PATH_RESOLVCONF "/etc/resolv.conf" CACHE STRING "Set the resolver configuration file path. Not used on Windows, where values are retrieved via GetNetworkParams().") +set(PATH_TRUST_ANCHOR_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/unbound/getdns-root.key" CACHE STRING "Default location of the trust anchor file.") + +# Ensure option variables in config.h that get values from the above are +# defined, and so will actually appear in config.h. +set(GETDNS_FN_HOSTS 1) +set(GETDNS_FN_RESOLVCONF 1) +set(TRUST_ANCHOR_FILE 1) +set(UDP_MAX_BACKOFF 1) + +# Options not exposed in autoconf. +set(DRAFT_RRTYPES 1) +set(EDNS_COOKIE_OPCODE 10) +set(EDNS_COOKIE_ROLLOVER_TIME "(24*60*60)") +set(EDNS_PADDING_OPCODE 12) +set(MAX_CNAME_REFERRALS 100) +set(MAXIMUM_UPSTREAM_OPTION_SPACE 3000) + +# Values derived from options. +set(GETDNS_COMPILATION_COMMENT "${PACKAGE_NAME} ${GETDNS_VERSION} configured on ${CURRENT_DATE} for the ${API_VERSION} version of the API") + +# Compiler flags +if (MSVC) + # The Visual Studio C compiler is C90 with some of C99 and C11. + # So full on warnings are not appropriate. + add_compile_options(/W2) +else () + add_compile_options(-Wall -Wextra -Wpedantic) +endif () + +# Windows. Uh-oh. +set(getdns_system_libs "") +set(static_lib_suffix "") +if (DEFINED GETDNS_ON_WINDOWS) + set(static_lib_suffix "_static") + list(APPEND getdns_system_libs + "ws2_32" + "crypt32" + "gdi32" + "iphlpapi" + "psapi" + "userenv" + ) +endif () + +# Check for include files +check_include_file(assert.h HAVE_ASSERT_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(limits.h HAVE_LIMITS_H) +check_include_file(sys/limits.h HAVE_SYS_LIMITS_H) +check_include_file(stdarg.h HAVE_STDARG_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(stdio.h HAVE_STDIO_H) +check_include_file(stdlib.h HAVE_STDLIB_H) +check_include_file(string.h HAVE_STRING_H) +check_include_file(strings.h HAVE_STRINGS_H) +check_include_file(time.h HAVE_TIME_H) +check_include_file(unistd.h HAVE_UNISTD_H) + +check_include_file(fcntl.h HAVE_FCNTL_H) + +check_include_file(signal.h HAVE_SIGNAL_H) +check_include_file(sys/poll.h HAVE_SYS_POLL_H) +check_include_file(poll.h HAVE_POLL_H) +check_include_file(resource.h HAVE_RESOURCE_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) + +check_include_file(endian.h HAVE_ENDIAN_H) +check_include_file(netdb.h HAVE_NETDB_H) +check_include_file(arpa/inet.h HAVE_ARPA_INET_H) +check_include_file(netinet/in.h HAVE_NETINET_IN_H) +check_include_file(sys/select.h HAVE_SYS_SELECT_H) +check_include_file(sys/socket.h HAVE_SYS_SOCKET_H) +check_include_file(sys/sysctl.h HAVE_SYS_SYSCTL_H) +check_include_file(sys/time.h HAVE_SYS_TIME_H) +check_include_file(sys/wait.h HAVE_SYS_WAIT_H) + +check_include_file(windows.h HAVE_WINDOWS_H) +check_include_file(winsock.h HAVE_WINSOCK_H) +check_include_file(winsock2.h HAVE_WINSOCK2_H) +check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H) + +# Check for include declarations +check_symbol_exists(getentropy unistd.h HAVE_DECL_GETENTROPY) +if (DEFINED GETDNS_ON_WINDOWS) + set(CMAKE_REQUIRED_LIBRARIES ${getdns_system_libs}) + check_symbol_exists(inet_pton ws2tcpip.h HAVE_DECL_INET_PTON) + check_symbol_exists(inet_ntop ws2tcpip.h HAVE_DECL_INET_NTOP) +else () + check_symbol_exists(inet_pton arpa/inet.h HAVE_DECL_INET_PTON) + check_symbol_exists(inet_ntop arpa/inet.h HAVE_DECL_INET_NTOP) +endif () +check_symbol_exists(mkstemp stdlib.h HAVE_DECL_MKSTEMP) +check_symbol_exists(sigemptyset signal.h HAVE_DECL_SIGEMPTYSET) +check_symbol_exists(sigfillset signal.h HAVE_DECL_SIGFILLSET) +check_symbol_exists(sigaddset signal.h HAVE_DECL_SIGADDSET) +check_symbol_exists(strptime time.h HAVE_DECL_STRPTIME) + +# Check for functions +check_function_exists(fcntl HAVE_FCNTL) +check_function_exists(getauxval HAVE_GETAUXVAL) +check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) +check_function_exists(ioctlsocket HAVE_IOCTLSOCKET) +check_function_exists(sigemptyset HAVE_SIGEMPTYSET) +check_function_exists(sigfillset HAVE_SIGFILLSET) +check_function_exists(sigaddset HAVE_SIGADDSET) +check_function_exists(strptime HAVE_STRPTIME) + +# Check for types +check_type_size(sigset_t SIGSET_T) +check_type_size(_sigset_t _SIGSET_T) + +# SSL library +find_package(OpenSSL "1.0.2" REQUIRED) + +set(HAVE_SSL 1) +set(tlsdir "openssl") + +set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +check_include_file(openssl/ssl.h HAVE_OPENSSL_SSL_H) +check_include_file(openssl/evp.h HAVE_OPENSSL_EVP_H) +check_include_file(openssl/err.h HAVE_OPENSSL_ERR_H) +check_include_file(openssl/rand.h HAVE_OPENSSL_RAND_H) +check_include_file(openssl/conf.h HAVE_OPENSSL_CONF_H) +check_include_file(openssl/engine.h HAVE_OPENSSL_ENGINE_H) + +set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) +check_function_exists(DSA_SIG_set0 HAVE_DSA_SIG_SET0) +check_function_exists(DSA_set0_pqg HAVE_DSA_SET0_PQG) +check_function_exists(DSA_set0_key HAVE_DSA_SET0_KEY) + +check_function_exists(RSA_set0_key HAVE_RSA_SET0_KEY) + +check_function_exists(EVP_md5 HAVE_EVP_MD5) +check_function_exists(EVP_sha1 HAVE_EVP_SHA1) +check_function_exists(EVP_sha224 HAVE_EVP_SHA224) +check_function_exists(EVP_sha256 HAVE_EVP_SHA256) +check_function_exists(EVP_sha384 HAVE_EVP_SHA384) +check_function_exists(EVP_sha512 HAVE_EVP_SHA512) + +check_function_exists(EVP_dss1 HAVE_EVP_DSS1) +check_function_exists(EVP_DigestVerify HAVE_EVP_DIGESTVERIFY) + +check_function_exists(EVP_MD_CTX_new HAVE_EVP_MD_CTX_NEW) + +check_function_exists(HMAC_CTX_new HAVE_HMAC_CTX_NEW) + +check_function_exists(OpenSSL_version_num HAVE_OPENSSL_VERSION_NUM) +check_function_exists(OpenSSL_version HAVE_OPENSSL_VERSION) + +check_function_exists(SSL_CTX_dane_enable HAVE_SSL_CTX_DANE_ENABLE) + +check_function_exists(SSL_CTX_set_ciphersuites HAVE_SSL_CTX_SET_CIPHERSUITES) +check_function_exists(SSL_set_ciphersuites HAVE_SSL_SET_CIPHERSUITES) + +check_function_exists(OPENSSL_init_crypto HAVE_OPENSSL_INIT_CRYPTO) + +check_symbol_exists(SSL_dane_enable "openssl/ssl.h" HAVE_SSL_DANE_ENABLE) +check_symbol_exists(SSL_CTX_set1_curves_list "openssl/ssl.h" HAVE_DECL_SSL_CTX_SET1_CURVES_LIST) +check_symbol_exists(SSL_set1_curves_list "openssl/ssl.h" HAVE_DECL_SSL_SET1_CURVES_LIST) +check_symbol_exists(SSL_set_min_proto_version "openssl/ssl.h" HAVE_DECL_SSL_SET_MIN_PROTO_VERSION) +check_symbol_exists(TLS_client_method "openssl/ssl.h" HAVE_TLS_CLIENT_METHOD) +check_symbol_exists(X509_get_notAfter "openssl/x509.h" HAVE_X509_GET_NOTAFTER) +check_symbol_exists(X509_get0_notAfter "openssl/x509.h" HAVE_X509_GET0_NOTAFTER) + +check_symbol_exists(NID_ED25519 "openssl/obj_mac.h" HAVE_SSL_ED25519) +check_symbol_exists(NID_ED448 "openssl/obj_mac.h" HAVE_SSL_ED448) + +# Threading library +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) + +if (CMAKE_USE_PTHREADS_INIT) + set(HAVE_PTHREAD 1) +elseif (CMAKE_USE_WIN32_THREADS_INIT) + set(HAVE_WINDOWS_THREADS 1) +else () + message(WARNING "Neither pthreads nor Windows threading available.") +endif () + +# Libidn2 +if (USE_LIBIDN2) + find_package(Libidn2 "2.0.0" REQUIRED) + if (Libidn2_FOUND) + set(HAVE_LIBIDN2 1) + else() + message(FATAL_ERROR "Libidn2 required but not found. Disable with USE_LIBIDN2 option.") + endif() +endif() + +# GnuTLS and Nettle. If using GnuTLS, we need the Nettle dev stuff to +# handle digital signature algorithms. GnuTLS uses Nettle internally. +if (USE_GNUTLS) + find_package(GnuTLS "3.5.0" REQUIRED) + find_package(Nettle "3.2" REQUIRED) + + set(tlsdir "gnutls") + set(HAVE_NETTLE 1) + + set(CMAKE_REQUIRED_INCLUDES ${NETTLE_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${NETTLE_LIBRARIES}) + check_include_file(nettle/dsa-compat.h HAVE_NETTLE_DSA_COMPAT_H) + check_include_file(nettle/eddsa.h HAVE_NETTLE_EDDSA_H) + + # API change in Nettle 3.4. + check_symbol_exists(nettle_get_secp_256r1 "nettle/ecc-curve.h" HAVE_NETTLE_GET_SECP_256R1) + check_symbol_exists(nettle_get_secp_384r1 "nettle/ecc-curve.h" HAVE_NETTLE_GET_SECP_384R1) +endif() + +# Sort out what signature algorithms can be used. +if (USE_ED25519) + if (USE_GNUTLS) + if (NOT HAVE_NETTLE_EDDSA_H) + message(WARNING "ED25519 enabled and Nettle does not support it. Disabled.") + unset(USE_ED25519) + endif () + elseif (NOT HAVE_SSL_ED25519) + message(WARNING "ED25519 enabled and OpenSSL does not support it. Disabled.") + unset(USE_ED25519) + endif () +endif () + +if (USE_ED448) + if (USE_GNUTLS) + message(WARNING "ED448 enabled and Nettle support not implemented. Disabled.") + unset(USE_ED448) + elseif (NOT HAVE_SSL_ED448) + message(WARNING "ED448 enabled and OpenSSL does not support it. Disabled.") + unset(USE_ED448) + endif () +endif () + +# Stuff that might be in a BSD library +check_symbol_exists(strlcpy string.h HAVE_DECL_STRLCPY) +check_symbol_exists(arc4random stdlib.h HAVE_DECL_ARC4RANDOM) +check_symbol_exists(arc4random_uniform stdlib.h HAVE_DECL_ARC4RANDOM_UNIFORM) + +check_function_exists(strlcpy HAVE_STRLCPY) +check_function_exists(arc4random HAVE_ARC4RANDOM) +check_function_exists(arc4random_uniform HAVE_ARC4RANDOM_UNIFORM) + +if (NOT + (HAVE_STRLCPY AND HAVE_DECL_STRLCPY AND + HAVE_ARC4RANDOM AND HAVE_DECL_ARC4RANDOM AND + HAVE_ARC4RANDOM_UNIFORM AND HAVE_DECL_ARC4RANDOM_UNIFORM)) + find_library(BSD_LIBRARY bsd) + if (BSD_LIBRARY) + unset(CMAKE_REQUIRED_LIBRARIES) + set(CMAKE_REQUIRED_LIBRARIES ${BSD_LIBRARY}) + mark_as_advanced(BSD_LIBRARY) + list(APPEND getdns_system_libs ${BSD_LIBRARY}) + + check_include_file(bsd/stdlib.h HAVE_BSD_STDLIB_H) + check_include_file(bsd/string.h HAVE_BSD_STRING_H) + + check_symbol_exists(strlcpy "bsd/string.h" HAVE_BSD_DECL_STRLCPY) + set(HAVE_DECL_STRLCPY ${HAVE_BSD_DECL_STRLCPY}) + check_symbol_exists(arc4random "bsd/stdlib.h" HAVE_BSD_DECL_ARC4RANDOM) + set(HAVE_DECL_ARC4RANDOM ${HAVE_BSD_DECL_ARC4RANDOM}) + check_symbol_exists(arc4random_uniform "bsd/stdlib.h" HAVE_BSD_DECL_ARC4RANDOM_UNIFORM) + set(HAVE_DECL_ARC4RANDOM_UNIFORM ${HAVE_BSD_DECL_ARC4RANDOM_UNIFORM}) + + check_function_exists(strlcpy HAVE_BSD_STRLCPY) + set(HAVE_STRLCPY ${HAVE_BSD_STRLCPY}) + check_function_exists(arc4random HAVE_BSD_ARC4RANDOM) + set(HAVE_ARC4RANDOM ${HAVE_BSD_ARC4RANDOM}) + check_function_exists(arc4random_uniform HAVE_BSD_ARC4RANDOM_UNIFORM) + set(HAVE_ARC4RANDOM_UNIFORM ${HAVE_BSD_ARC4RANDOM_UNIFORM}) + endif () +endif () +mark_as_advanced(BSD_LIBRARY) + +# If we're not stub only, we need libunbound. +if (NOT ENABLE_STUB_ONLY) + find_package(Libunbound "1.5.9" REQUIRED) + set(HAVE_LIBUNBOUND 1) + list(APPEND getdns_system_libs Libunbound::Libunbound) + + set(CMAKE_REQUIRED_INCLUDES ${LIBUNBOUND_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${LIBUNBOUND_LIBRARIES}) + check_include_file(unbound-event.h HAVE_UNBOUND_EVENT_H) + check_symbol_exists(ub_ctx_create_ub_event "unbound-event.h" HAVE_UNBOUND_EVENT_API) + check_symbol_exists(ub_ctx_set_stub "unbound-event.h" HAVE_UB_CTX_SET_STUB) +endif () + +# Event loop extension +set(DEFAULT_EVENTLOOP "select_eventloop") +if (ENABLE_POLL_EVENTLOOP) + if (HAVE_SYS_POLL_H) + set(TEST_CFLAG "-DHAVE_SYS_POLL_H=1") + endif () + try_compile(USE_POLL_DEFAULT_EVENTLOOP + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/tests/test_poll.c + COMPILE_DEFINITIONS "${TEST_CFLAG}" + ) + if (USE_POLL_DEFAULT_EVENTLOOP) + set(DEFAULT_EVENTLOOP "poll_eventloop") + endif () +endif () + +# Custom checks +set(STRPTIME_TEST_SOURCE "\n + #define _XOPEN_SOURCE 600\n + #include \n + int main(void) { struct tm tm; char *res;\n + res = strptime(\"2010-07-15T00:00:00+00:00\", \"%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t\", &tm);\n + if (!res) return 2;\n + res = strptime(\"20070207111842\", \"%Y%m%d%H%M%S\", &tm);\n + if (!res) return 1; return 0; }") + +if (HAVE_STRPTIME) + check_c_source_runs("${STRPTIME_TEST_SOURCE}" STRPTIME_WORKS) +endif () + +try_compile(HAVE___FUNC__ + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/tests/test___func__.c +) + +# TCP Fast Open. +if (NOT ENABLE_TCP_FAST_OPEN) + message(WARNING "TCP Fast Open disabled.") +else () + if (APPLE AND HAVE_SYS_SOCKET_H) + check_symbol_exists(CONNECT_RESUME_ON_READ_WRITE "sys/socket.h" USE_OSX_TCP_FASTOPEN) + if (NOT USE_OSX_TCP_FASTOPEN) + message(WARNING "TCP Fast Open not available, continuing without.") + endif () + else () + check_include_file(netinet/tcp.h HAVE_NETINET_TCP_H) + check_symbol_exists(TCP_FASTOPEN "sys/socket.h;netinet/tcp.h" HAVE_DECL_TCP_FASTOPEN) + check_symbol_exists(TCP_FASTOPEN_CONNECT "sys/socket.h;netinet/tcp.h" HAVE_DECL_TCP_FASTOPEN_CONNECT) + check_symbol_exists(MSG_FASTOPEN "sys/socket.h;netinet/tcp.h" HAVE_DECL_MSG_FASTOPEN) + if (NOT HAVE_DECL_TCP_FASTOPEN) + message(WARNING "TCP Fast Open not available, continuing without.") + endif () + endif () +endif () + +# Main library +add_library(getdns_objects OBJECT + src/anchor.c + src/const-info.c + src/convert.c + src/context.c + src/dict.c + src/dnssec.c + src/general.c + src/list.c + src/request-internal.c + src/mdns.c + src/platform.c + src/pubkey-pinning.c + src/rr-dict.c + src/rr-iter.c + src/server.c + src/stub.c + src/sync.c + src/ub_loop.c + src/util-internal.c + + src/extension/${DEFAULT_EVENTLOOP}.c + + src/gldns/keyraw.c + src/gldns/gbuffer.c + src/gldns/wire2str.c + src/gldns/parse.c + src/gldns/parseutil.c + src/gldns/rrdef.c + src/gldns/str2wire.c + + src/util/rbtree.c + src/util/lruhash.c + src/util/lookup3.c + src/util/locks.c + + src/jsmn/jsmn.c + + src/yxml/yxml.c + + src/tls/val_secalgo.c + src/tls/anchor-internal.c + + src/${tlsdir}/tls.c + src/${tlsdir}/pubkey-pinning-internal.c + src/${tlsdir}/keyraw-internal.c + + ${CMAKE_CURRENT_BINARY_DIR}/version.c + ) +if (NOT HAVE_GETTIMEOFDAY) + target_sources(getdns_objects PRIVATE src/compat/gettimeofday.c) +endif () +if (NOT HAVE_DECL_INET_PTON) + target_sources(getdns_objects PRIVATE src/compat/inet_pton.c) +endif () +if (NOT HAVE_DECL_INET_NTOP) + target_sources(getdns_objects PRIVATE src/compat/inet_ntop.c) +endif () +if (NOT HAVE_DECL_MKSTEMP) + target_sources(getdns_objects PRIVATE src/compat/mkstemp.c) +endif () +if (NOT HAVE_DECL_STRLCPY) + target_sources(getdns_objects PRIVATE src/compat/strlcpy.c) +endif () +if (NOT HAVE_DECL_ARC4RANDOM) + target_sources(getdns_objects PRIVATE + src/compat/arc4random.c + src/compat/explicit_bzero.c + src/compat/arc4_lock.c + ) + + if (NOT HAVE_DECL_GETENTROPY) + if (DEFINED GETDNS_ON_WINDOWS) + target_sources(getdns_objects PRIVATE src/compat/getentropy_win.c) + elseif (APPLE) + target_sources(getdns_objects PRIVATE src/compat/getentropy_osx.c) + elseif (DEFINED LINUX) + target_sources(getdns_objects PRIVATE src/compat/getentropy_linux.c) + endif () + endif () +endif () +if (NOT HAVE_DECL_ARC4RANDOM_UNIFORM) + target_sources(getdns_objects PRIVATE src/compat/arc4random_uniform.c) +endif () +if (NOT STRPTIME_WORKS) + target_sources(getdns_objects PRIVATE src/compat/strptime.c) +endif () +target_include_directories(getdns_objects + PUBLIC + src + + PRIVATE + src/util/auxiliary + src/${tlsdir} + src/tls + src/yxml + + ${CMAKE_CURRENT_BINARY_DIR} + + # Note - CMake 3.5 doesn't like target_link_libraries on objects, + # which would be preferred way to add an include dependency. + ${OPENSSL_INCLUDE_DIR} + ) +target_compile_definitions(getdns_objects PRIVATE JSMN_GETDNS YXML_GETDNS) +if (NOT HAVE_SSL_DANE_ENABLE) + target_sources(getdns_objects PRIVATE src/ssl_dane/danessl.c) + target_include_directories(getdns_objects PRIVATE src/ssl_dane) + set(USE_DANESSL 1) +endif () +if (Libidn_FOUND) + target_include_directories(getdns_objects PRIVATE ${LIBIDN_INCLUDE_DIR}) +endif () +if (Libidn2_FOUND) + target_include_directories(getdns_objects PRIVATE ${LIBIDN2_INCLUDE_DIR}) +endif () +if (Libunbound_FOUND) + target_include_directories(getdns_objects PRIVATE ${LIBUNBOUND_INCLUDE_DIR}) +endif () +if (GnuTLS_FOUND) + target_include_directories(getdns_objects PRIVATE ${GNUTLS_INCLUDE_DIR}) +endif () + +# Don't compile separate objects for shared and static libraries. +# Yes, -fPIC is slightly suboptimal for static libraries, but it looks +# to me that it's the behaviour the autoconf build follows. +set_property(TARGET getdns_objects PROPERTY POSITION_INDEPENDENT_CODE 1) +set_property(TARGET getdns_objects PROPERTY C_STANDARD 11) + +# Static library version of main library. +if (ENABLE_STATIC) + add_library(getdns STATIC $) + target_include_directories(getdns PUBLIC + "$" + ${CMAKE_CURRENT_BINARY_DIR} + ) + target_link_libraries(getdns + PUBLIC + OpenSSL::SSL + OpenSSL::Crypto + Threads::Threads + ${getdns_system_libs} + ) + if (Libunbound_FOUND) + target_link_libraries(getdns PUBLIC Libunbound::Libunbound) + endif () + if (Libidn_FOUND) + target_link_libraries(getdns PUBLIC Libidn::Libidn) + endif () + if (Libidn2_FOUND) + target_link_libraries(getdns PUBLIC Libidn2::Libidn2) + endif () + if (GnuTLS_FOUND) + target_link_libraries(getdns PUBLIC GnuTLS::GnuTLS GnuTLS::Dane) + endif () + if (Nettle_FOUND) + target_link_libraries(getdns PUBLIC Nettle::Nettle Nettle::Hogweed) + endif () + set_target_properties(getdns PROPERTIES OUTPUT_NAME getdns${static_lib_suffix}) +endif () + +# Shared library version of main library. +if (ENABLE_SHARED) + add_library(getdns_shared SHARED $) + target_include_directories(getdns_shared PUBLIC + "$" + ${CMAKE_CURRENT_BINARY_DIR} + ) + target_link_libraries(getdns_shared + PUBLIC + OpenSSL::SSL + OpenSSL::Crypto + Threads::Threads + ${getdns_system_libs} + ) + if (Libunbound_FOUND) + target_link_libraries(getdns_shared PUBLIC Libunbound::Libunbound) + endif () + if (Libidn_FOUND) + target_link_libraries(getdns_shared PUBLIC Libidn::Libidn) + endif () + if (Libidn2_FOUND) + target_link_libraries(getdns_shared PUBLIC Libidn2::Libidn2) + endif () + if (GnuTLS_FOUND) + target_link_libraries(getdns_shared PUBLIC GnuTLS::GnuTLS GnuTLS::Dane) + endif () + if (Nettle_FOUND) + target_link_libraries(getdns_shared PUBLIC Nettle::Nettle Nettle::Hogweed) + endif () + set_target_properties(getdns_shared PROPERTIES OUTPUT_NAME getdns) + target_shared_library_version(getdns_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE}) + + # Generate platform-specific link file with the export symbols. + file(STRINGS src/libgetdns.symbols symbols) + target_shared_library_exports(getdns_shared getdns "${symbols}") + + # If we're not building a static library, use this wherever we use + # the static library in tool and test builds. + if (NOT ENABLE_STATIC) + add_library(getdns ALIAS getdns_shared) + endif () +endif () + +# libev extension. +if (USE_LIBEV) + find_package(Libev) + if (Libev_FOUND) + # Copy module header to getdns include dir. + file(COPY src/getdns/getdns_ext_libev.h DESTINATION getdns) + + add_library(ev_objects OBJECT src/extension/libev.c) + target_include_directories(ev_objects + PRIVATE + src + ${CMAKE_CURRENT_BINARY_DIR} + ${LIBEV_INCLUDE_DIR} + ) + set_property(TARGET ev_objects PROPERTY POSITION_INDEPENDENT_CODE 1) + set_property(TARGET ev_objects PROPERTY C_STANDARD 11) + if (ENABLE_STATIC) + add_library(getdns_ex_ev STATIC $) + target_include_directories(getdns_ex_ev PRIVATE Libev::Libev) + target_link_libraries(getdns_ex_ev PUBLIC getdns Libev::Libev) + if (Libunbound_FOUND) + target_link_libraries(getdns_ex_ev PUBLIC Libunbound::Libunbound) + endif () + set_target_properties(getdns_ex_ev PROPERTIES OUTPUT_NAME getdns_ex_ev${static_lib_suffix}) + endif () + if (ENABLE_SHARED) + add_library(getdns_ex_ev_shared SHARED $) + target_include_directories(getdns_ex_ev_shared PRIVATE Libev::Libev) + target_link_libraries(getdns_ex_ev_shared PUBLIC getdns_shared Libev::Libev) + if (Libunbound_FOUND) + target_link_libraries(getdns_ex_ev_shared PUBLIC Libunbound::Libunbound) + endif () + set_target_properties(getdns_ex_ev_shared PROPERTIES OUTPUT_NAME getdns_ex_ev) + target_shared_library_version(getdns_ex_ev_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE}) + file(STRINGS src/extension/libev.symbols symbols) + target_shared_library_exports(getdns_ex_ev_shared getdns_ex_ev "${symbols}") + if (NOT ENABLE_STATIC) + add_library(getdns_ex_ev ALIAS getdns_ex_ev_shared) + endif () + endif () + else () + message(WARNING "Libev support library build requested, but libev not found. Disabled.") + unset(USE_LIBEV) + endif () +endif () + +# libevent2 extension. +if (USE_LIBEVENT2) + find_package(Libevent2) + if (Libevent2_FOUND) + # Given libevent2, set defines required by source. + set(HAVE_EVENT2_EVENT_H 1) + set(HAVE_EVENT_BASE_FREE 1) + set(HAVE_EVENT_BASE_NEW 1) + + # Copy module header to getdns include dir. + file(COPY src/getdns/getdns_ext_libevent.h DESTINATION getdns) + + add_library(event2_objects OBJECT src/extension/libevent.c) + target_include_directories(event2_objects + PRIVATE + src + ${CMAKE_CURRENT_BINARY_DIR} + ${LIBEVENT2_INCLUDE_DIR} + ) + set_property(TARGET event2_objects PROPERTY POSITION_INDEPENDENT_CODE 1) + set_property(TARGET event2_objects PROPERTY C_STANDARD 11) + if (ENABLE_STATIC) + add_library(getdns_ex_event STATIC $) + target_include_directories(getdns_ex_event PRIVATE Libevent2::Libevent_code) + target_link_libraries(getdns_ex_event PUBLIC getdns Libevent2::Libevent_core) + if (Libunbound_FOUND) + target_link_libraries(getdns_ex_event PUBLIC Libunbound::Libunbound) + endif () + set_target_properties(getdns_ex_event PROPERTIES OUTPUT_NAME getdns_ex_event${static_lib_suffix}) + endif () + if (ENABLE_SHARED) + add_library(getdns_ex_event_shared SHARED $) + target_include_directories(getdns_ex_event_shared PRIVATE Libevent2::Libevent_code) + target_link_libraries(getdns_ex_event_shared PUBLIC getdns_shared Libevent2::Libevent_core) + if (Libunbound_FOUND) + target_link_libraries(getdns_ex_event_shared PUBLIC Libunbound::Libunbound) + endif () + set_target_properties(getdns_ex_event_shared PROPERTIES OUTPUT_NAME getdns_ex_event) + target_shared_library_version(getdns_ex_event_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE}) + file(STRINGS src/extension/libevent.symbols symbols) + target_shared_library_exports(getdns_ex_event_shared getdns_ex_event "${symbols}") + if (NOT ENABLE_STATIC) + add_library(getdns_ex_event ALIAS getdns_ex_event_shared) + endif () + endif () + else () + message(WARNING "Libevent2 support library build requested, but libevent2 not found. Disabled.") + unset(USE_LIBEVENT2) + endif () +endif () + +# libuv extension. +if (USE_LIBUV) + find_package(Libuv) + if (Libuv_FOUND) + # Check for new-style callbacks. + try_compile(HAVE_NEW_UV_TIMER_CB + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/tests/test_uv_cb.c + ) + + # Copy module header to getdns include dir. + file(COPY src/getdns/getdns_ext_libuv.h DESTINATION getdns) + + add_library(uv_objects OBJECT src/extension/libuv.c) + target_include_directories(uv_objects + PRIVATE + src + ${CMAKE_CURRENT_BINARY_DIR} + ${LIBUV_INCLUDE_DIR} + ) + set_property(TARGET uv_objects PROPERTY POSITION_INDEPENDENT_CODE 1) + set_property(TARGET uv_objects PROPERTY C_STANDARD 11) + if (ENABLE_STATIC) + add_library(getdns_ex_uv STATIC $) + target_include_directories(getdns_ex_uv PRIVATE Libuv::Libuv) + target_link_libraries(getdns_ex_uv PUBLIC getdns Libuv::Libuv) + if (Libunbound_FOUND) + target_link_libraries(getdns_ex_uv PUBLIC Libunbound::Libunbound) + endif () + set_target_properties(getdns_ex_uv PROPERTIES OUTPUT_NAME getdns_ex_uv${static_lib_suffix}) + endif () + if (ENABLE_SHARED) + add_library(getdns_ex_uv_shared SHARED $) + target_include_directories(getdns_ex_uv_shared PRIVATE Libuv::Libuv) + target_link_libraries(getdns_ex_uv_shared PUBLIC getdns_shared Libuv::Libuv) + if (Libunbound_FOUND) + target_link_libraries(getdns_ex_uv_shared PUBLIC Libunbound::Libunbound) + endif () + set_target_properties(getdns_ex_uv_shared PROPERTIES OUTPUT_NAME getdns_ex_uv) + target_shared_library_version(getdns_ex_uv_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE}) + file(STRINGS src/extension/libuv.symbols symbols) + target_shared_library_exports(getdns_ex_uv_shared getdns_ex_uv "${symbols}") + if (NOT ENABLE_STATIC) + add_library(getdns_ex_uv ALIAS getdns_ex_uv_shared) + endif () + endif () + else () + message(WARNING "Libuv support library build requested, but libuv not found. Disabled.") + unset(USE_LIBUV) + endif () +endif () + +# The tools. +if (BUILD_GETDNS_QUERY) + add_executable(getdns_query src/tools/getdns_query.c) + if (NOT HAVE_GETTIMEOFDAY) + target_sources(getdns_query PRIVATE src/compat/gettimeofday.c) + endif () + target_link_libraries(getdns_query PRIVATE getdns) + if (Libunbound_FOUND) + target_link_libraries(getdns_query PUBLIC Libunbound::Libunbound) + endif () + set_property(TARGET getdns_query PROPERTY C_STANDARD 11) +endif () + +if (BUILD_GETDNS_SERVER_MON) + add_executable(getdns_server_mon src/tools/getdns_server_mon.c) + target_link_libraries(getdns_server_mon + PUBLIC + OpenSSL::SSL + OpenSSL::Crypto + PRIVATE + getdns + ) + if (Libunbound_FOUND) + target_link_libraries(getdns_server_mon PUBLIC Libunbound::Libunbound) + endif () + set_property(TARGET getdns_server_mon PROPERTY C_STANDARD 11) +endif () + +if (BUILD_TESTING) + if (WIN32) + message(WARNING "Test programs require libcheck and so do not build on Windows, skipping.") + else () + find_package(Check "0.9.6" REQUIRED) + set(GETDNS_TEST_SOURCE_FILES + src/test/check_getdns_common.c + src/test/check_getdns_context_set_timeout.c + src/test/check_getdns_transport.c + src/test/check_getdns_selectloop.c + src/test/check_getdns.c) + set(GETDNS_TEST_LINK_LIBS + getdns + Check::Check + Threads::Threads) + + add_executable(check_getdns ${GETDNS_TEST_SOURCE_FILES}) + target_link_libraries(check_getdns PRIVATE ${GETDNS_TEST_LINK_LIBS}) + add_test(NAME test_noeventloop COMMAND check_getdns) + set_property(TEST test_noeventloop PROPERTY + ENVIRONMENT "GETDNS_TEST_PORT=43210;CK_TIMEOUT_MULTIPLIER=2;CK_LOG_FILE_NAME=check_getdns.log" + ) + + if (USE_LIBEVENT2) + add_executable(check_getdns_event ${GETDNS_TEST_SOURCE_FILES}) + target_link_libraries(check_getdns_event PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ex_event) + add_test(NAME test_libevent COMMAND check_getdns_event) + set_property(TEST test_libevent PROPERTY + ENVIRONMENT "GETDNS_TEST_PORT=44321;CK_TIMEOUT_MULTIPLIER=2;CK_LOG_FILE_NAME=check_getdns_event.log" + ) + endif() + + if (USE_LIBEV) + add_executable(check_getdns_ev ${GETDNS_TEST_SOURCE_FILES}) + target_link_libraries(check_getdns_ev PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ex_ev) + add_test(NAME test_libev COMMAND check_getdns_ev) + set_property(TEST test_libev PROPERTY + ENVIRONMENT "GETDNS_TEST_PORT=45321;CK_TIMEOUT_MULTIPLIER=2;CK_LOG_FILE_NAME=check_getdns_ev.log" + ) + endif() + + if (USE_LIBUV) + add_executable(check_getdns_uv ${GETDNS_TEST_SOURCE_FILES}) + target_link_libraries(check_getdns_uv PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ex_uv) + add_test(NAME test_libuv COMMAND check_getdns_uv) + set_property(TEST test_libuv PROPERTY + ENVIRONMENT "GETDNS_TEST_PORT=46321;CK_TIMEOUT_MULTIPLIER=2;CK_LOG_FILE_NAME=check_getdns_uv.log" + ) + endif() + + add_executable(tests_dict + src/test/tests_dict.c + src/test/testmessages.c + ) + target_link_libraries(tests_dict PRIVATE getdns Check::Check) + + add_executable(tests_list + src/test/tests_list.c + src/test/testmessages.c + ) + target_link_libraries(tests_list PRIVATE getdns Check::Check) + + add_executable(tests_namespaces src/test/tests_namespaces.c) + target_link_libraries(tests_namespaces PRIVATE getdns Check::Check) + + add_executable(tests_stub_async + src/test/tests_stub_async.c + src/test/testmessages.c + ) + target_link_libraries(tests_stub_async PRIVATE getdns Check::Check) + + add_executable(tests_stub_sync src/test/tests_stub_sync.c) + target_link_libraries(tests_stub_sync PRIVATE getdns Check::Check) + endif() +endif () + +# Substitutions in files. +configure_file(cmake/include/cmakeconfig.h.in config.h) +configure_file(src/getdns/getdns.h.in getdns/getdns.h) +configure_file(src/getdns/getdns_extra.h.in getdns/getdns_extra.h) +configure_file(src/version.c.in version.c) + +set(version ${PACKAGE_VERSION}) +set(date ${API_VERSION}) +file(GLOB mans doc/*.3.in) +file(MAKE_DIRECTORY man3) +foreach (man ${mans}) + get_filename_component(out ${man} NAME_WE) + configure_file(${man} man3/${out}.3 @ONLY) + + # Look through the page and make copies of the page for all APIs + # defined in that page. Defined means listed in a line ".B " + # between lines ".SH NAME" and ".SH LIBRARY". Ignore terminating "," + # or spaces in .B line. + file(STRINGS ${man} manpage REGEX "^\\.(SH +NAME|SH +LIBRARY|B )") + set(in_list 0) + foreach (line ${manpage}) + if ("${line}" MATCHES "^\\.SH +NAME") + set(in_list 1) + elseif ("${line}" MATCHES "^\\.SH +LIBRARY") + set(in_list 0) + elseif (${in_list}) + string(REGEX REPLACE ".B +([^ ,]+).*" "\\1" alt "${line}") + configure_file(${man} man3/${alt}.3 @ONLY) + endif () + endforeach() +endforeach() + +set(prefix ${CMAKE_INSTALL_PREFIX}) +configure_file(getdns.pc.in getdns.pc @ONLY) + +# Installing. +if (ENABLE_STATIC) + install(TARGETS getdns LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + if (USE_LIBEV) + install(TARGETS getdns_ex_ev LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + endif () + if (USE_LIBEVENT2) + install(TARGETS getdns_ex_event LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + endif () + if (USE_LIBUV) + install(TARGETS getdns_ex_uv LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + endif () +endif () +if (ENABLE_SHARED) + install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + if (USE_LIBEV) + install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + endif () + if (USE_LIBEVENT2) + install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + endif () + if (USE_LIBUV) + install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + endif () +endif () +if (BUILD_GETDNS_QUERY) + install(TARGETS getdns_query RUNTIME DESTINATION bin) +endif () +if (BUILD_GETDNS_SERVER_MON) + install(TARGETS getdns_server_mon RUNTIME DESTINATION bin) +endif () + +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION include) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION share/man) + +set(docdir share/doc/getdns) +install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir}) +install(FILES spec/index.html DESTINATION ${docdir}/spec) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/getdns.pc DESTINATION lib/pkgconfig) + +install(CODE "message(\"\ +***\n\ +*** !!! IMPORTANT !!!!\n\ +***\n\ +*** From release 1.2.0, getdns comes with built-in DNSSEC\n\ +*** trust anchor management. External trust anchor management,\n\ +*** for example with unbound-anchor, is no longer necessary\n\ +*** and no longer recommended.\n\ +***\n\ +*** Previously installed trust anchors, in the default location -\n\ +***\n\ +*** /etc/unbound/getdns-root.key\n\ +***\n\ +*** - will be preferred and used for DNSSEC validation, however\n\ +*** getdns will fallback to trust-anchors obtained via built-in\n\ +*** trust anchor management when the anchors from the default\n\ +*** location fail to validate the root DNSKEY rrset.\n\ +***\n\ +*** To prevent expired DNSSEC trust anchors to be used for\n\ +*** validation, we strongly recommend removing the trust anchors\n\ +*** on the default location when there is no active external\n\ +*** trust anchor management keeping it up-to-date.\n\ +***\")") + +if (BUILD_STUBBY) + add_subdirectory(stubby) +endif () + +if (BUILD_EXAMPLES) + add_executable(example-all-functions spec/example/example-all-functions.c) + target_include_directories(example-all-functions PRIVATE spec/example) + target_link_libraries(example-all-functions PRIVATE getdns) + set_property(TARGET example-all-functions PROPERTY C_STANDARD 11) + + add_executable(example-synchronous spec/example/example-synchronous.c) + target_include_directories(example-synchronous PRIVATE spec/example) + target_link_libraries(example-synchronous PRIVATE getdns) + set_property(TARGET example-synchronous PROPERTY C_STANDARD 11) + + if (USE_LIBEVENT2) + add_executable(example-simple-answers spec/example/example-simple-answers.c) + target_include_directories(example-simple-answers PRIVATE spec/example) + target_link_libraries(example-simple-answers PRIVATE getdns getdns_ex_event) + set_property(TARGET example-simple-answers PROPERTY C_STANDARD 11) + + add_executable(example-tree spec/example/example-tree.c) + target_include_directories(example-tree PRIVATE spec/example) + target_link_libraries(example-tree PRIVATE getdns getdns_ex_event) + set_property(TARGET example-tree PROPERTY C_STANDARD 11) + + add_executable(example-reverse spec/example/example-reverse.c) + target_include_directories(example-reverse PRIVATE spec/example) + target_link_libraries(example-reverse PRIVATE getdns getdns_ex_event) + set_property(TARGET example-reverse PROPERTY C_STANDARD 11) + else () + message(WARNING "\ +Three examples from the specification need libevent. \ +libevent was not found or usable at compile time. \ +To compile and run all examples from the spec, make sure \ +libevent is available and usable during configuration.") + endif () +endif () + +if (BUILD_DOXYGEN) + find_package(Doxygen REQUIRED) + + set(srcdir ${CMAKE_CURRENT_SOURCE_DIR}/src) + configure_file(src/Doxyfile.in Doxyfile @ONLY) + add_custom_command(OUTPUT doc/html/index.html + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + MAIN_DEPENDENCY Doxyfile + COMMENT "Generating Doxygen docs.") + add_custom_target(doc ALL DEPENDS doc/html/index.html) +endif () diff --git a/deps/getdns/getdns/LICENSE b/deps/getdns/getdns/LICENSE new file mode 100644 index 00000000000000..996a8c79b19f74 --- /dev/null +++ b/deps/getdns/getdns/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2013, Verisign, Inc., NLnet Labs +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the names of the copyright holders nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/getdns/getdns/cmake/include/cmakeconfig.h.in b/deps/getdns/getdns/cmake/include/cmakeconfig.h.in new file mode 100644 index 00000000000000..834a23cf81ce25 --- /dev/null +++ b/deps/getdns/getdns/cmake/include/cmakeconfig.h.in @@ -0,0 +1,528 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#cmakedefine PACKAGE "@PACKAGE@" +#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@" +#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" +#cmakedefine PACKAGE_URL "@PACKAGE_URL@" +#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" + +#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@" +#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@" + +#cmakedefine HAVE_ASSERT_H 1 +#cmakedefine HAVE_INTTYPES_H 1 +#cmakedefine HAVE_LIMITS_H 1 +#cmakedefine HAVE_SYS_LIMITS_H 1 +#cmakedefine HAVE_STDARG_H 1 +#cmakedefine HAVE_STDINT_H 1 +#cmakedefine HAVE_STDIO_H 1 +#cmakedefine HAVE_STDLIB_H 1 +#cmakedefine HAVE_STRING_H 1 +#cmakedefine HAVE_TIME_H 1 +#cmakedefine HAVE_UNISTD_H 1 + +#cmakedefine HAVE_FCNTL_H 1 + +#cmakedefine HAVE_SIGNAL_H 1 +#cmakedefine HAVE_SYS_POLL_H 1 +#cmakedefine HAVE_POLL_H 1 +#cmakedefine HAVE_RESOURCE_H 1 +#cmakedefine HAVE_SYS_TYPES_H 1 +#cmakedefine HAVE_SYS_STAT_H 1 + +#cmakedefine HAVE_ENDIAN_H 1 +#cmakedefine HAVE_NETDB_H 1 +#cmakedefine HAVE_ARPA_INET_H 1 +#cmakedefine HAVE_NETINET_IN_H 1 +#cmakedefine HAVE_NETINET_TCP_H 1 +#cmakedefine HAVE_SYS_SELECT_H 1 +#cmakedefine HAVE_SYS_SOCKET_H 1 +#cmakedefine HAVE_SYS_SYSCTL_H 1 +#cmakedefine HAVE_SYS_TIME_H 1 +#cmakedefine HAVE_SYS_WAIT_H 1 + +#cmakedefine HAVE_WINDOWS_H 1 +#cmakedefine HAVE_WINSOCK_H 1 +#cmakedefine HAVE_WINSOCK2_H 1 +#cmakedefine HAVE_WS2TCPIP_H 1 +#cmakedefine GETDNS_ON_WINDOWS 1 +#cmakedefine USE_WINSOCK 1 + +#cmakedefine HAVE_SSL 1 +#cmakedefine USE_DANESSL 1 + +#cmakedefine HAVE_OPENSSL_SSL_H 1 +#cmakedefine HAVE_OPENSSL_EVP_H 1 +#cmakedefine HAVE_OPENSSL_ERR_H 1 +#cmakedefine HAVE_OPENSSL_RAND_H 1 +#cmakedefine HAVE_OPENSSL_CONF_H 1 +#cmakedefine HAVE_OPENSSL_ENGINE_H 1 + +#cmakedefine HAVE_DSA_SIG_SET0 1 +#cmakedefine HAVE_DSA_SET0_PQG 1 +#cmakedefine HAVE_DSA_SET0_KEY 1 + +#cmakedefine HAVE_RSA_SET0_KEY 1 + +#cmakedefine HAVE_EVP_MD5 1 +#cmakedefine HAVE_EVP_SHA1 1 +#cmakedefine HAVE_EVP_SHA224 1 +#cmakedefine HAVE_EVP_SHA256 1 +#cmakedefine HAVE_EVP_SHA384 1 +#cmakedefine HAVE_EVP_SHA512 1 + +#cmakedefine HAVE_EVP_DSS1 1 +#cmakedefine HAVE_EVP_DIGESTVERIFY 1 + +#cmakedefine HAVE_EVP_MD_CTX_NEW 1 + +#cmakedefine HAVE_HMAC_CTX_NEW 1 + +#cmakedefine HAVE_NETTLE_GET_SECP_256R1 1 +#cmakedefine HAVE_NETTLE_GET_SECP_384R1 1 + +#cmakedefine HAVE_TLS_CLIENT_METHOD 1 + +#cmakedefine HAVE_OPENSSL_VERSION_NUM 1 +#cmakedefine HAVE_OPENSSL_VERSION 1 + +#cmakedefine HAVE_SSL_CTX_DANE_ENABLE 1 +#cmakedefine HAVE_SSL_CTX_SET_CIPHERSUITS 1 +#cmakedefine HAVE_SSL_SET_CIPHERSUITS 1 + +#cmakedefine HAVE_OPENSSL_INIT_CRYPTO 1 + +#cmakedefine HAVE_SSL_DANE_ENABLE 1 +#cmakedefine HAVE_DECL_SSL_CTX_SET1_CURVES_LIST 1 +#cmakedefine HAVE_DECL_SSL_SET1_CURVES_LIST 1 +#cmakedefine HAVE_DECL_SSL_SET_MIN_PROTO_VERSION 1 +#cmakedefine HAVE_X509_GET_NOTAFTER 1 +#cmakedefine HAVE_X509_GET0_NOTAFTER 1 + +#cmakedefine HAVE_PTHREAD 1 +#cmakedefine HAVE_WINDOWS_THREADS 1 + +#cmakedefine RUNSTATEDIR "@RUNSTATEDIR@" +#cmakedefine TRUST_ANCHOR_FILE "@PATH_TRUST_ANCHOR_FILE@" +#cmakedefine GETDNS_FN_RESOLVCONF "@PATH_RESOLVCONF@" +#cmakedefine GETDNS_FN_HOSTS "@PATH_HOSTS@" + +#cmakedefine DNSSEC_ROADBLOCK_AVOIDANCE 1 +#cmakedefine HAVE_MDNS_SUPPORT 1 +#cmakedefine STUB_NATIVE_DNSSEC 1 +#cmakedefine MAXIMUM_UPSTREAM_OPTION_SPACE @MAXIMUM_UPSTREAM_OPTION_SPACE@ +#cmakedefine EDNS_PADDING_OPCODE @EDNS_PADDING_OPCODE@ +#cmakedefine MAX_CNAME_REFERRALS @MAX_CNAME_REFERRALS@ +#cmakedefine DRAFT_RRTYPES @DRAFT_RRTYPES@ +#cmakedefine EDNS_COOKIES 1 +#cmakedefine EDNS_COOKIE_OPCODE @EDNS_COOKIE_OPCODE@ +#cmakedefine EDNS_COOKIE_ROLLOVER_TIME @EDNS_COOKIE_ROLLOVER_TIME@ +#cmakedefine UDP_MAX_BACKOFF @MAX_UDP_BACKOFF@ + +#cmakedefine HAVE_DECL_GETENTROPY 1 +#cmakedefine HAVE_DECL_INET_PTON 1 +#cmakedefine HAVE_DECL_INET_NTOP 1 +#cmakedefine HAVE_WIN_DECL_INET_PTON 1 +#cmakedefine HAVE_WIN_DECL_INET_NTOP 1 +#cmakedefine HAVE_DECL_MKSTEMP 1 +#cmakedefine HAVE_DECL_SIGEMPTYSET 1 +#cmakedefine HAVE_DECL_SIGFILLSET 1 +#cmakedefine HAVE_DECL_SIGADDSET 1 +#cmakedefine HAVE_DECL_STRPTIME 1 + +#cmakedefine HAVE_DECL_TCP_FASTOPEN 1 +#cmakedefine HAVE_DECL_TCP_FASTOPEN_CONNECT 1 +#cmakedefine HAVE_DECL_MSG_FASTOPEN 1 + +#if defined(HAVE_DECL_INET_PTON) || defined(HAVE_WIN_DECL_INET_PTON) +#undef HAVE_DECL_INET_PTON +#define HAVE_DECL_INET_PTON 1 +#endif +#if defined(HAVE_DECL_INET_NTOP) || defined(HAVE_WIN_DECL_INET_NTOP) +#undef HAVE_DECL_INET_NTOP +#define HAVE_DECL_INET_NTOP 1 +#endif + +#cmakedefine HAVE_FCNTL 1 +#cmakedefine HAVE_GETTIMEOFDAY 1 +#cmakedefine HAVE_IOCTLSOCKET 1 +#cmakedefine HAVE_SIGEMPTYSET 1 +#cmakedefine HAVE_SIGFILLSET 1 +#cmakedefine HAVE_SIGADDSET 1 +#cmakedefine HAVE_STRPTIME 1 + +#cmakedefine HAVE_SIGSET_T 1 +#cmakedefine HAVE__SIGSET_T 1 + +#cmakedefine HAVE_BSD_STDLIB_H 1 +#cmakedefine HAVE_BSD_STRING_H 1 + +#cmakedefine HAVE_DECL_STRLCPY 1 +#cmakedefine HAVE_DECL_ARC4RANDOM 1 +#cmakedefine HAVE_DECL_ARC4RANDOM_UNIFORM 1 +#cmakedefine HAVE_BSD_DECL_STRLCPY 1 +#cmakedefine HAVE_BSD_DECL_ARC4RANDOM 1 +#cmakedefine HAVE_BSD_DECL_ARC4RANDOM_UNIFORM 1 + +#cmakedefine HAVE_STRLCPY 1 +#cmakedefine HAVE_ARC4RANDOM 1 +#cmakedefine HAVE_ARC4RANDOM_UNIFORM 1 + +#cmakedefine HAVE_LIBUNBOUND 1 +#cmakedefine HAVE_UNBOUND_EVENT_H 1 +#cmakedefine HAVE_UNBOUND_EVENT_API 1 +#cmakedefine HAVE_UB_CTX_SET_STUB 1 + +#cmakedefine HAVE_LIBIDN 1 +#cmakedefine HAVE_LIBIDN2 1 + +#cmakedefine HAVE_NETTLE 1 +#cmakedefine HAVE_NETTLE_DSA_COMPAT_H 1 +#cmakedefine HAVE_NETTLE_EDDSA_H 1 + +#cmakedefine HAVE_EVENT2_EVENT_H 1 +#cmakedefine HAVE_EVENT_BASE_NEW 1 +#cmakedefine HAVE_EVENT_BASE_FREE 1 + +#cmakedefine DEFAULT_EVENTLOOP "@DEFAULT_EVENTLOOP@" +#cmakedefine USE_POLL_DEFAULT_EVENTLOOP 1 + +#cmakedefine STRPTIME_WORKS 1 + +#cmakedefine FD_SETSIZE @FD_SETSIZE@ + +#cmakedefine REQ_DEBUG 1 +#cmakedefine SCHED_DEBUG 1 +#cmakedefine STUB_DEBUG 1 +#cmakedefine DAEMON_DEBUG 1 +#cmakedefine SEC_DEBUG 1 +#cmakedefine SERVER_DEBUG 1 +#cmakedefine ANCHOR_DEBUG 1 +#cmakedefine KEEP_CONNECTIONS_OPEN_DEBUG 1 + +#cmakedefine USE_SHA1 1 +#cmakedefine USE_SHA2 1 +#cmakedefine USE_GOST 1 +#cmakedefine USE_ECDSA 1 +#cmakedefine USE_DSA 1 +#cmakedefine USE_ED25519 1 +#cmakedefine USE_ED448 1 + +#cmakedefine USE_OSX_TCP_FASTOPEN 1 + +#cmakedefine HAVE_NEW_UV_TIMER_CB 1 + +#cmakedefine HAVE_TARGET_ENDIANNESS +#cmakedefine TARGET_IS_BIG_ENDIAN + +#cmakedefine HAVE___FUNC__ 1 + +#ifdef HAVE___FUNC__ +#define __FUNC__ __func__ +#else +#define __FUNC__ __FUNCTION__ +#endif + +#ifdef GETDNS_ON_WINDOWS + /* On windows it is allowed to increase the FD_SETSIZE + * (and nescessary to make our custom eventloop work) + * See: https://support.microsoft.com/en-us/kb/111855 + */ +# ifndef FD_SETSIZE +# define FD_SETSIZE 1024 +# endif + +/* the version of the windows API enabled */ +# ifndef WINVER +# define WINVER 0x0600 // 0x0502 +# endif +# ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0600 // 0x0502 +# endif +# ifdef HAVE_WS2TCPIP_H +# include +# endif + +# ifdef _MSC_VER +# if _MSC_VER >= 1800 +# define PRIsz "zu" +# else +# define PRIsz "Iu" +# endif +# include + typedef SSIZE_T ssize_t; +# else +# define PRIsz "Iu" +# endif + +# ifdef HAVE_WINSOCK2_H +# include +# endif + +/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */ +# ifdef HAVE_WINSOCK2_H +# define FD_SET_T (u_int) +# else +# define FD_SET_T +# endif + + /* Windows wants us to use _strdup instead of strdup */ +# ifndef strdup +# define strdup _strdup +# endif + +/* Windows doesn't have strcasecmp and strncasecmp. */ +# define strcasecmp _stricmp +# define strncasecmp _strnicmp +#else +# define PRIsz "zu" +#endif + +#ifdef HAVE_STDINT_H +#include +#endif + +#ifdef HAVE_STDIO_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_ASSERT_H +#include +#endif + +#ifdef HAVE_STRING_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if STDC_HEADERS +#include +#include +#endif + +#ifdef HAVE_BSD_STDLIB_H +#include +#endif + +#ifdef HAVE_BSD_STRING_H +#include +#endif + +#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY || !defined(strlcpy) +size_t strlcpy(char *dst, const char *src, size_t siz); +#else +#ifndef __BSD_VISIBLE +#define __BSD_VISIBLE 1 +#endif +#endif +#if !defined(HAVE_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM +uint32_t arc4random(void); +#endif +#if !defined(HAVE_ARC4RANDOM_UNIFORM) || !HAVE_DECL_ARC4RANDOM_UNIFORM +uint32_t arc4random_uniform(uint32_t upper_bound); +#endif +#ifndef HAVE_ARC4RANDOM +void explicit_bzero(void* buf, size_t len); +int getentropy(void* buf, size_t len); +void arc4random_buf(void* buf, size_t n); +void _ARC4_LOCK(void); +void _ARC4_UNLOCK(void); +#endif +#ifdef COMPAT_SHA512 +#ifndef SHA512_DIGEST_LENGTH +#define SHA512_BLOCK_LENGTH 128 +#define SHA512_DIGEST_LENGTH 64 +#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) +typedef struct _SHA512_CTX { + uint64_t state[8]; + uint64_t bitcount[2]; + uint8_t buffer[SHA512_BLOCK_LENGTH]; +} SHA512_CTX; +#endif /* SHA512_DIGEST_LENGTH */ +void SHA512_Init(SHA512_CTX*); +void SHA512_Update(SHA512_CTX*, void*, size_t); +void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*); +unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest); +#endif /* COMPAT_SHA512 */ + +#ifdef USE_WINSOCK +# ifndef _CUSTOM_VSNPRINTF +# define _CUSTOM_VSNPRINTF +static inline int _gldns_custom_vsnprintf(char *str, size_t size, const char *format, va_list ap) +{ int r = vsnprintf(str, size, format, ap); return r == -1 ? _vscprintf(format, ap) : r; } +# define vsnprintf _gldns_custom_vsnprintf +# endif +#endif + +#ifdef __cplusplus +} +#endif + +/** Use on-board gldns */ +#define USE_GLDNS 1 +#ifdef HAVE_SSL +# define GLDNS_BUILD_CONFIG_HAVE_SSL 1 +#endif + +#ifdef HAVE_STDARG_H +#include +#endif + +#include + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_SYS_SELECT_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_SYS_STAT_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_NETINET_TCP_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_SIGNAL_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_INTTYPES_H +#include +#endif + +#ifdef HAVE_LIMITS_H +#include +#endif + +#ifdef HAVE_SYS_LIMITS_H +#include +#endif + +#ifdef PATH_MAX +#define _GETDNS_PATH_MAX PATH_MAX +#else +#define _GETDNS_PATH_MAX 2048 +#endif + +#ifndef PRIu64 +#define PRIu64 "llu" +#endif + +#ifdef HAVE_ATTR_FORMAT +# define ATTR_FORMAT(archetype, string_index, first_to_check) \ + __attribute__ ((format (archetype, string_index, first_to_check))) +#else /* !HAVE_ATTR_FORMAT */ +# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ +#endif /* !HAVE_ATTR_FORMAT */ + +#if defined(DOXYGEN) +# define ATTR_UNUSED(x) x +#elif defined(__cplusplus) +# define ATTR_UNUSED(x) +#elif defined(HAVE_ATTR_UNUSED) +# define ATTR_UNUSED(x) x __attribute__((unused)) +#else /* !HAVE_ATTR_UNUSED */ +# define ATTR_UNUSED(x) x +#endif /* !HAVE_ATTR_UNUSED */ + +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS) +#define strptime unbound_strptime +struct tm; +char *strptime(const char *s, const char *format, struct tm *tm); +#endif + +#if !defined(HAVE_SIGSET_T) && defined(HAVE__SIGSET_T) +typedef _sigset_t sigset_t; +#endif +#if !defined(HAVE_SIGEMPTYSET) +# define sigemptyset(pset) (*(pset) = 0) +#endif +#if !defined(HAVE_SIGFILLSET) +# define sigfillset(pset) (*(pset) = (sigset_t)-1) +#endif +#if !defined(HAVE_SIGADDSET) +# define sigaddset(pset, num) (*(pset) |= (1L<<(num))) +#endif + +#ifdef HAVE_LIBUNBOUND +# include +# ifdef HAVE_UNBOUND_EVENT_H +# include +# else +# ifdef HAVE_UNBOUND_EVENT_API +# ifndef _UB_EVENT_PRIMITIVES +# define _UB_EVENT_PRIMITIVES +struct ub_event_base; +struct ub_ctx* ub_ctx_create_ub_event(struct ub_event_base* base); +typedef void (*ub_event_callback_t)(void*, int, void*, int, int, char*); +int ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype, + int rrclass, void* mydata, ub_event_callback_t callback, int* async_id); +# endif +# endif +# endif +#endif + +#ifndef HAVE_DECL_INET_PTON +int inet_pton(int af, const char* src, void* dst); +#endif + +#ifndef HAVE_DECL_INET_NTOP +const char *inet_ntop(int af, const void *src, char *dst, size_t size); +#endif + +#ifndef HAVE_DECL_MKSTEMP +int mkstemp(char *template); +#endif + +#ifndef HAVE_GETTIMEOFDAY +int gettimeofday(struct timeval* tv, void* tz); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_H */ diff --git a/deps/getdns/getdns/cmake/include/getdns_shared_version.rc.in b/deps/getdns/getdns/cmake/include/getdns_shared_version.rc.in new file mode 100644 index 00000000000000..d69a36d66e6d6c --- /dev/null +++ b/deps/getdns/getdns/cmake/include/getdns_shared_version.rc.in @@ -0,0 +1,19 @@ +1 VERSIONINFO + FILEVERSION @version_current@,@version_revision@,@version_age@,0 + PRODUCTVERSION @version_current@,@version_revision@,0,0 + FILEOS 4 + FILETYPE 2 + FILESUBTYPE 0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "getdns project\0" + VALUE "ProductName", "getdns\0" + VALUE "FileVersion", "@version_current@.@version_revision@\0" + VALUE "ProductVersion", "@version_current@.@version_revision@\0" + VALUE "LegalCopyright", "NLnet Labs, Sinodun, No Mountain Software. New BSD licence.\0" + END + END +END diff --git a/deps/getdns/getdns/cmake/modules/FindCheck.cmake b/deps/getdns/getdns/cmake/modules/FindCheck.cmake new file mode 100644 index 00000000000000..81872b8bd51e81 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindCheck.cmake @@ -0,0 +1,98 @@ +#[=======================================================================[.rst: +FindCheck +-------- + +Find the Check (Unit Testing Framework for C) library + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Check::Check`` + The Check library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``Check_FOUND`` + If false, do not try to use Check. +``CHECK_INCLUDE_DIR`` + where to find check.h, etc. +``CHECK_LIBRARIES`` + the libraries needed to use Check. +``CHECK_VERSION`` + the version of the Check library found + +#]=======================================================================] + +find_path(CHECK_INCLUDE_DIR check.h + HINTS + "${CHECK_DIR}" + "${CHECK_DIR}/include" + ) + +# Check for PIC and non-PIC libraries. If PIC present, use that +# in preference (as per Debian check.pc). +find_library(CHECK_LIBRARY NAMES check_pic libcheck_pic + HINTS + "${CHECK_DIR}" + "${CHECK_DIR}/lib" + ) + +if (NOT CHECK_LIBRARY) + find_library(CHECK_LIBRARY NAMES check libcheck + HINTS + "${CHECK_DIR}" + "${CHECK_DIR}/lib" + ) +endif () + +set(CHECK_LIBRARIES "") + +# Check may need the math, subunit and rt libraries on Unix +if (UNIX) + find_library(CHECK_MATH_LIBRARY m) + find_library(CHECK_RT_LIBRARY rt) + find_library(CHECK_SUBUNIT_LIBRARY subunit) + + if (CHECK_MATH_LIBRARY) + list(APPEND CHECK_LIBRARIES "${CHECK_MATH_LIBRARY}") + endif () + if (CHECK_RT_LIBRARY) + list(APPEND CHECK_LIBRARIES "${CHECK_RT_LIBRARY}") + endif () + if (CHECK_SUBUNIT_LIBRARY) + list(APPEND CHECK_LIBRARIES "${CHECK_SUBUNIT_LIBRARY}") + endif () +endif() + +if (CHECK_INCLUDE_DIR AND CHECK_LIBRARY) + if (NOT TARGET Check::Check) + add_library(Check::Check UNKNOWN IMPORTED) + set_target_properties(Check::Check PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CHECK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "${CHECK_LIBRARIES}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${CHECK_LIBRARY}" + ) + endif () + + if (NOT CHECK_VERSION AND CHECK_INCLUDE_DIR AND EXISTS "${CHECK_INCLUDE_DIR}/check.h") + file(STRINGS "${CHECK_INCLUDE_DIR}/check.h" CHECK_H REGEX "^#define CHECK_M[A-Z]+_VERSION") + string(REGEX REPLACE "^.*\(([0-9]+)\).*\(([0-9]+)\).*\(([0-9]+)\).*$" "\\1.\\2.\\3" CHECK_VERSION "${CHECK_H}") + endif () +endif() + +list(APPEND CHECK_LIBRARIES "${CHECK_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Check + REQUIRED_VARS CHECK_LIBRARIES CHECK_INCLUDE_DIR + VERSION_VAR CHECK_VERSION + ) + +mark_as_advanced(CHECK_INCLUDE_DIR CHECK_LIBRARIES CHECK_LIBRARY + CHECK_MATH_LIBRARY CHECK_RT_LIBRARY CHECK_SUBUNIT_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/FindGnuTLS.cmake b/deps/getdns/getdns/cmake/modules/FindGnuTLS.cmake new file mode 100644 index 00000000000000..961aa088ba8942 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindGnuTLS.cmake @@ -0,0 +1,85 @@ +#[=======================================================================[.rst: +FindGnuTLS +---------- + +Find the GnuTLS library. + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``GnuTLS::GnuTLS`` + The GnuTLS library, if found. +``GnuTLS::Dane`` + The GnuTLS DANE library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``GnuTLS_FOUND`` + If false, do not try to use GnuTLS. +``GNUTLS_INCLUDE_DIR`` + where to find GnuTLS headers. +``GNUTLS_LIBRARIES`` + the libraries needed to use GnuTLS. +``GNUTLS_VERSION`` + the version of the GnuTLS library found + +#]=======================================================================] + +find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h + HINTS + "${GNUTLS_DIR}" + "${GNUTLS_DIR}/include" +) + +find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls + HINTS + "${GNUTLS_DIR}" + "${GNUTLS_DIR}/lib" +) + +find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane + HINTS + "${GNUTLS_DIR}" + "${GNUTLS_DIR}/lib" +) + +set(GNUTLS_LIBRARIES "") + +if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY) + if (NOT TARGET GnuTLS::GnuTLS) + add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) + set_target_properties(GnuTLS::GnuTLS PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${GNUTLS_LIBRARY}" + ) + endif () + if (NOT TARGET GnuTLS::Dane) + add_library(GnuTLS::Dane UNKNOWN IMPORTED) + set_target_properties(GnuTLS::Dane PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}" + ) + endif () + + if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR) + file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ") + string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}") + endif () +endif() + +list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GnuTLS + REQUIRED_VARS GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR + VERSION_VAR GNUTLS_VERSION + ) + +mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARIES GNUTLS_LIBRARY GNUTLS_DANE_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/FindLibev.cmake b/deps/getdns/getdns/cmake/modules/FindLibev.cmake new file mode 100644 index 00000000000000..b84a7f47fae2a8 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindLibev.cmake @@ -0,0 +1,63 @@ +#[=======================================================================[.rst: +FindLibev +--------- + +Find the Libev library. + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Libev::Libev`` + The Libev library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``Libev_FOUND`` + If false, do not try to use Libev. +``LIBEV_INCLUDE_DIR`` + where to find libev headers. +``LIBEV_LIBRARIES`` + the libraries needed to use Libev. +``LIBEV_VERSION`` + the version of the Libev library found + +#]=======================================================================] + +find_path(LIBEV_INCLUDE_DIR ev.h + HINTS + "${LIBEV_DIR}" + "${LIBEV_DIR}/include" +) + +find_library(LIBEV_LIBRARY NAMES ev libev + HINTS + "${LIBEV_DIR}" + "${LIBEV_DIR}/lib" +) + +set(LIBEV_LIBRARIES "") + +if (LIBEV_INCLUDE_DIR AND LIBEV_LIBRARY) + if (NOT TARGET Libev::Libev) + add_library(Libev::Libev UNKNOWN IMPORTED) + set_target_properties(Libev::Libev PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIBEV_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${LIBEV_LIBRARY}" + ) + endif () +endif() + +list(APPEND LIBEV_LIBRARIES "${LIBEV_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libev + REQUIRED_VARS LIBEV_LIBRARIES LIBEV_INCLUDE_DIR + ) + +mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARIES LIBEV_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/FindLibevent2.cmake b/deps/getdns/getdns/cmake/modules/FindLibevent2.cmake new file mode 100644 index 00000000000000..9b9f2bb439eb33 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindLibevent2.cmake @@ -0,0 +1,69 @@ +#[=======================================================================[.rst: +FindLibevent2 +------------- + +Find the Libevent2 library. For now this finds the core library only. + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Libevent2::Libevent_core`` + The Libevent2 library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``Libevent2_FOUND`` + If false, do not try to use Libevent2. +``LIBEVENT2_INCLUDE_DIR`` + where to find libevent headers. +``LIBEVENT2_LIBRARIES`` + the libraries needed to use Libevent2. +``LIBEVENT2_VERSION`` + the version of the Libevent2 library found + +#]=======================================================================] + +find_path(LIBEVENT2_INCLUDE_DIR event2/event.h + HINTS + "${LIBEVENT2_DIR}" + "${LIBEVENT2_DIR}/include" +) + +find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core + HINTS + "${LIBEVENT2_DIR}" + "${LIBEVENT2_DIR}/lib" +) + +set(LIBEVENT2_LIBRARIES "") + +if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY) + if (NOT TARGET Libevent2::Libevent_core) + add_library(Libevent2::Libevent_core UNKNOWN IMPORTED) + set_target_properties(Libevent2::Libevent_core PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}" + ) + endif () + + if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h") + file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ") + string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}") + endif () +endif() + +list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libevent2 + REQUIRED_VARS LIBEVENT2_LIBRARIES LIBEVENT2_INCLUDE_DIR + VERSION_VAR LIBEVENT2_VERSION + ) + +mark_as_advanced(LIBEVENT2_INCLUDE_DIR LIBEVENT2_LIBRARIES LIBEVENT2_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/FindLibidn2.cmake b/deps/getdns/getdns/cmake/modules/FindLibidn2.cmake new file mode 100644 index 00000000000000..4ea374f5a6a4c6 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindLibidn2.cmake @@ -0,0 +1,69 @@ +#[=======================================================================[.rst: +FindLibidn2 +----------- + +Find the Libidn2 library + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Libidn2::Libidn2`` + The Libidn2 library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``Libidn2_FOUND`` + If false, do not try to use Libidn2. +``LIBIDN2_INCLUDE_DIR`` + where to find libidn2 headers. +``LIBIDN2_LIBRARIES`` + the libraries needed to use Libidn2. +``LIBIDN2_VERSION`` + the version of the Libidn2 library found + +#]=======================================================================] + +find_path(LIBIDN2_INCLUDE_DIR idn2.h + HINTS + "${LIBIDN2_DIR}" + "${LIBIDN2_DIR}/include" +) + +find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2 + HINTS + "${LIBIDN2_DIR}" + "${LIBIDN2_DIR}/lib" +) + +set(LIBIDN2_LIBRARIES "") + +if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) + if (NOT TARGET Libidn2::Libidn2) + add_library(Libidn2::Libidn2 UNKNOWN IMPORTED) + set_target_properties(Libidn2::Libidn2 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${LIBIDN2_LIBRARY}" + ) + endif () + + if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") + file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") + string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") + endif () +endif() + +list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libidn2 + REQUIRED_VARS LIBIDN2_LIBRARIES LIBIDN2_INCLUDE_DIR + VERSION_VAR LIBIDN2_VERSION + ) + +mark_as_advanced(LIBIDN2_INCLUDE_DIR LIBIDN2_LIBRARIES LIBIDN2_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/FindLibunbound.cmake b/deps/getdns/getdns/cmake/modules/FindLibunbound.cmake new file mode 100644 index 00000000000000..bdef88be5e3004 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindLibunbound.cmake @@ -0,0 +1,90 @@ +#[=======================================================================[.rst: +FindLibunbound +-------------- + +Find the Libunbound library + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Libunbound::Libunbound`` + The Libunbound library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``Libunbound_FOUND`` + If false, do not try to use Libunbound. +``LIBUNBOUND_INCLUDE_DIR`` + where to find libunbound headers. +``LIBUNBOUND_LIBRARIES`` + the libraries needed to use Libunbound. +``LIBUNBOUND_VERSION`` + the version of the Libunbound library found + +#]=======================================================================] + +find_path(LIBUNBOUND_INCLUDE_DIR unbound.h + HINTS + "${LIBUNBOUND_DIR}" + "${LIBUNBOUND_DIR}/include" +) + +find_library(LIBUNBOUND_LIBRARY NAMES unbound + HINTS + "${LIBUNBOUND_DIR}" + "${LIBUNBOUND_DIR}/lib" +) + +set(LIBUNBOUND_LIBRARIES "") + +if (UNIX) + find_package(Threads REQUIRED) + find_package(OpenSSL REQUIRED) + + list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") + list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}") +endif() + +if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY) + if (NOT TARGET Libunbound::Libunbound) + add_library(Libunbound::Libunbound UNKNOWN IMPORTED) + set_target_properties(Libunbound::Libunbound PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}" + ) + + if(UNIX AND TARGET Threads::Threads) + set_property(TARGET Libunbound::Libunbound APPEND PROPERTY + INTERFACE_LINK_LIBRARIES Threads::Threads) + endif () + if(UNIX AND TARGET OpenSSL::SSL) + set_property(TARGET Libunbound::Libunbound APPEND PROPERTY + INTERFACE_LINK_LIBRARIES OpenSSL::SSL) + endif () + if(UNIX AND TARGET OpenSSL::Crypto) + set_property(TARGET Libunbound::Libunbound APPEND PROPERTY + INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) + endif () + endif () + + if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h") + file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+") + string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}") + endif () +endif() + +list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libunbound + REQUIRED_VARS LIBUNBOUND_LIBRARIES LIBUNBOUND_INCLUDE_DIR + VERSION_VAR LIBUNBOUND_VERSION + ) + +mark_as_advanced(LIBUNBOUND_INCLUDE_DIR LIBUNBOUND_LIBRARIES LIBUNBOUND_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/FindLibuv.cmake b/deps/getdns/getdns/cmake/modules/FindLibuv.cmake new file mode 100644 index 00000000000000..749697aac20c47 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindLibuv.cmake @@ -0,0 +1,73 @@ +#[=======================================================================[.rst: +FindLibuv +--------- + +Find the Libuv library. + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Libuv::Libuv`` + The Libuv library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``Libuv_FOUND`` + If false, do not try to use Libuv. +``LIBUV_INCLUDE_DIR`` + where to find libuv headers. +``LIBUV_LIBRARIES`` + the libraries needed to use Libuv. +``LIBUV_VERSION`` + the version of the Libuv library found + +#]=======================================================================] + +find_path(LIBUV_INCLUDE_DIR uv.h + HINTS + "${LIBUV_DIR}" + "${LIBUV_DIR}/include" +) + +find_library(LIBUV_LIBRARY NAMES uv libuv + HINTS + "${LIBUV_DIR}" + "${LIBUV_DIR}/lib" +) + +set(LIBUV_LIBRARIES "") + +if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY) + if (NOT TARGET Libuv::Libuv) + add_library(Libuv::Libuv UNKNOWN IMPORTED) + set_target_properties(Libuv::Libuv PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${LIBUV_LIBRARY}" + ) + endif () + + if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR) + if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h") + file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") + elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") + file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") + endif () + string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}") + endif () +endif() + +list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libuv + REQUIRED_VARS LIBUV_LIBRARIES LIBUV_INCLUDE_DIR + VERSION_VAR LIBUV_VERSION + ) + +mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARIES LIBUV_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/FindNettle.cmake b/deps/getdns/getdns/cmake/modules/FindNettle.cmake new file mode 100644 index 00000000000000..3303b4b5a6976e --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/FindNettle.cmake @@ -0,0 +1,95 @@ +#[=======================================================================[.rst: +FindNettle +---------- + +Find the Nettle library. + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``Nettle::Nettle`` + The Nettle library, if found. +``Nettle::Hogweed`` + The Hogweed library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``Nettle_FOUND`` + If false, do not try to use Nettle. +``NETTLE_INCLUDE_DIR`` + where to find Nettle headers. +``NETTLE_LIBRARIES`` + the libraries needed to use Nettle. +``NETTLE_VERSION`` + the version of the Nettle library found + +#]=======================================================================] + +find_path(NETTLE_INCLUDE_DIR nettle/version.h + HINTS + "${NETTLE_DIR}" + "${NETTLE_DIR}/include" +) + +find_library(NETTLE_LIBRARY NAMES nettle libnettle + HINTS + "${NETTLE_DIR}" + "${NETTLE_DIR}/lib" +) + +find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed + HINTS + "${NETTLE_DIR}" + "${NETTLE_DIR}/lib" +) + +set(NETTLE_LIBRARIES "") + +# May need gmp library on Unix. +if (UNIX) + find_library(NETTLE_GMP_LIBRARY gmp) + + if (NETTLE_GMP_LIBRARY) + list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}") + endif () +endif () + +if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY) + if (NOT TARGET Nettle::Nettle) + add_library(Nettle::Nettle UNKNOWN IMPORTED) + set_target_properties(Nettle::Nettle PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${NETTLE_LIBRARY}" + ) + endif () + if (NOT TARGET Nettle::Hogweed) + add_library(Nettle::Hogweed UNKNOWN IMPORTED) + set_target_properties(Nettle::Hogweed PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${HOGWEED_LIBRARY}" + ) + endif () + + if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR) + file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ") + string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}") + endif () +endif() + +list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Nettle + REQUIRED_VARS NETTLE_LIBRARIES NETTLE_INCLUDE_DIR + VERSION_VAR NETTLE_VERSION + ) + +mark_as_advanced(NETTLE_INCLUDE_DIR NETTLE_LIBRARIES NETTLE_LIBRARY HOGWEED_LIBRARY) diff --git a/deps/getdns/getdns/cmake/modules/TargetSharedLibraryExports.cmake b/deps/getdns/getdns/cmake/modules/TargetSharedLibraryExports.cmake new file mode 100644 index 00000000000000..ab3f960edaf6e0 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/TargetSharedLibraryExports.cmake @@ -0,0 +1,27 @@ +# Export only named entry points from shared library. +function(target_shared_library_exports lib libname symbols) + if (WIN32) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def" "LIBRARY ${libname}\n EXPORTS\n") + foreach (symbol IN LISTS symbols) + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def" " ${symbol}\n") + endforeach () + target_sources(${lib} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def") + elseif (APPLE) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms" "") + foreach (symbol IN LISTS symbols) + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms" "_${symbol}\n") + endforeach () + target_sources(${lib} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms") + target_link_libraries(${lib} PRIVATE "-exported_symbols_list ${libname}.syms") + elseif (UNIX) + # Assume GNU ld. + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" "{ global:\n") + foreach (symbol IN LISTS symbols) + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" " ${symbol};\n") + endforeach () + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" "local:\n *;\n};\n") + target_link_libraries(${lib} PRIVATE "-Wl,--version-script=getdns.ver") + else () + message(WARNING "Unknown platform, ${lib} exports not set.") + endif () +endfunction () diff --git a/deps/getdns/getdns/cmake/modules/TargetSharedLibraryVersion.cmake b/deps/getdns/getdns/cmake/modules/TargetSharedLibraryVersion.cmake new file mode 100644 index 00000000000000..a8a5f1b7631362 --- /dev/null +++ b/deps/getdns/getdns/cmake/modules/TargetSharedLibraryVersion.cmake @@ -0,0 +1,25 @@ +# Add version to given shared library linkage. +function(target_shared_library_version lib version_current version_revision version_age) + if (APPLE) + # Follow libtool. Add one to major version, as version 0 doesn't work. + # But tag dynlib name with current-age. + math(EXPR major_version "${version_current}+1") + math(EXPR dynlib_version "${version_current}-${version_age}") + set_target_properties(${lib} PROPERTIES VERSION "${dynlib_version}") + target_link_libraries(${lib} PRIVATE "-compatibility_version ${major_version}") + target_link_libraries(${lib} PRIVATE "-current_version ${major_version}.${version_revision}") + elseif (UNIX OR MINGW OR MSYS OR CYGWIN) + # Assume GNU ld, and again follow libtool. Major version is current-age. + math(EXPR compat_version "${version_current}-${version_age}") + set_target_properties(${lib} PROPERTIES VERSION "${compat_version}.${version_age}.${version_revision}" SOVERSION "${compat_version}") + elseif (WIN32) + set(rc_template "${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/${lib}_version.rc.in") + if (EXISTS ${rc_template}) + configure_file(${rc_template} ${lib}.rc @ONLY) + target_sources(${lib} PRIVATE ${lib}.rc) + endif () + target_link_libraries(${lib} PRIVATE "-VERSION:${version_current}.${version_revision}") + else () + message(WARNING "Unknown platform, ${lib} will not be versioned.") + endif () +endfunction () diff --git a/deps/getdns/getdns/getdns.pc.in b/deps/getdns/getdns/getdns.pc.in new file mode 100644 index 00000000000000..604f800fa768c7 --- /dev/null +++ b/deps/getdns/getdns/getdns.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: getdns +Version: @GETDNS_VERSION@ +Description: A modern asynchronous DNS library + +Libs: -L${libdir} -lgetdns +Cflags: -I${includedir} diff --git a/deps/getdns/getdns/getdns_ext_event.pc.in b/deps/getdns/getdns/getdns_ext_event.pc.in new file mode 100644 index 00000000000000..fec7946a785ef6 --- /dev/null +++ b/deps/getdns/getdns/getdns_ext_event.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: getdns_ext_event +Version: @GETDNS_VERSION@ +Description: A modern asynchronous DNS library + +Libs: -L${libdir} -lgetdns_ext_event +Cflags: -I${includedir} diff --git a/deps/getdns/getdns/src/Doxyfile.in b/deps/getdns/getdns/src/Doxyfile.in new file mode 100644 index 00000000000000..b43e94483ce710 --- /dev/null +++ b/deps/getdns/getdns/src/Doxyfile.in @@ -0,0 +1,2430 @@ +# Doxyfile 1.8.11 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "getdns" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @PACKAGE_VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "An implementation of the getdns API - a modern asynchronous API for fetching DNS data" + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = YES + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = @srcdir@/getdns/ \ + getdns/getdns.h \ + getdns/getdns_extra.h \ + @srcdir@/../README.md + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, +# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = config.h + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = example/ + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = @srcdir@/../README.md + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /