Configure revision 76af83c9adb772f7b045c62cf8b411165bfaa5ef
"..\\bin\\tests\\system\\win32\\rpz.dsp", "..\\bin\\tests\\system\\win32\\rpz.mak", "..\\lib\\samples\\win32\\gai.dsp", "..\\lib\\samples\\win32\\gai.mak", "ISC_PLATFORM_HAVEATOMICSTORE", "ISC_PLATFORM_HAVEATOMICSTOREQ", "ISC_PLATFORM_HAVECMPXCHG", "ISC_PLATFORM_HAVEXADDQ", "ISC_PLATFORM_NEEDSTRCASESTR", "ISC_PLATFORM_USEBACKTRACE", my @
optionlist =
("help", "verbose", "legacy", "win32", "x64", "clean");
my @
usage =
("Usage: perl Configure help\n", " perl Configure options* win32|x64\n", " perl Configure clean\n");
"'Configure' configures BIND9 build files.\n\n", "\nGeneral Options and Commands:\n", " verbose (options) print messages\n", " help (command) print this help\n", " legacy (options) process only files for legacy build\n", " win32 (command) configure for Win32 platform\n", " x64 (command) configure for x64 platform\n", " clean (command) clean up generated files\n", " <none> (command) print a summary of the configuration\n", "\nOptional Features:\n", " enable-native-pkcs11 use native PKCS#11 for all crypto [default=no]\n", " enable-openssl-hash use OpenSSL for hash functions [default=yes]\n", " enable-isc-spnego use SPNEGO from lib/dns [default=yes]\n", " enable-filter-aaaa enable filtering of AAAA records [default=no]\n", " enable-fixed-rrset enable fixed rrset ordering [default=no]\n", " enable-developer enable developer build settings [default=no]\n", " enable-querytrace enable very verbose query trace [default=no]\n", " enable-rpz-nsip enable rpz-nsip rules [default=yes]\n", " enable-rpz-nsdname enable rpz-nsdname rules [default=yes]\n", "\nOptional Packages:\n", " with-tests build with test suite\n", " with-extra-tests build with extra test suite\n", " with-system-tests build with system test suite\n", " with-samples build with sample programs\n", " with-openssl[=PATH] build with OpenSSL yes|no|path\n", " with-pkcs11[=PATH] build with PKCS#11 support yes|no|provider-path\n", " with-ecdsa crypto ECDSA\n", " with-gost[=ENC] crypto GOST yes|no|raw|ans1\n", " with-aes crypto AES\n", " with-cc-alg choose the algorithm for cookies aes|sha1|sha256\n", " with-gssapi[=PATH] build with MIT KfW GSSAPI yes|no|path\n", " with-libxml2[=PATH] build with libxml2 library yes|no|path\n", " with-geoip[=PATH] build with GeoIP support yes|no|path\n", " with-python[=COMMAND] specify python interpreter python|command\n", " with-readline[=PATH] build with readline library support yes|no|path\n", " with-idn[=PATH] build with IDN kit support yes|no|path\n", " with-iconv[=PATH] path of the iconv DLL [default=same than idn]\n", " with-zlib[=PATH] build with zlib library yes|no|path\n", " with-vcredist[=PATH] visual C++ redistributable package yes|path\n", " with-tuning=OPTION tune for plaform size (large|default)\n", " with-cross-compile 32 / 64 bit build / host plaforms\n");
} elsif (/^with-(.*)=(.*)$/i) { } elsif (/^with-(.*)$/i) { # legacy default to win32 die "can't ask for both Win32 and x64 platforms\n"; $configdefp{"ISC_PLATFORM_BUSYWAITNOP"} = "__asm { rep nop }"; $configdefp{"ISC_PLATFORM_BUSYWAITNOP"} = "_mm_pause()"; # Standard configure variable # get the version information # append seen args to CONFIGARGS define # escape backslashes, spaces and double quotes $arg =~ s/([\\ "])/\\$1/g; if ($key =~ /^intrinsics$/i) { } elsif ($key =~ /^native-pkcs11$/i) { } elsif ($key =~ /^openssl-hash$/i) { } elsif ($val =~ /^no$/i) { } elsif ($key =~ /^isc-spnego$/i) { } elsif ($key =~ /^filter-aaaa$/i) { } elsif ($key =~ /^fixed-rrset$/i) { } elsif ($key =~ /^developer$/i) { } elsif ($key =~ /^querytrace$/i) { } elsif ($key =~ /^rpz-nsip$/i) { } elsif ($key =~ /^rpz-nsdname$/i) { # enable-developer expansion now if ($key =~ /^tests$/i) { } elsif ($key =~ /^extra-tests$/i) { } elsif ($key =~ /^system-tests$/i) { } elsif ($key =~ /^samples$/i) { } elsif ($key =~ /^openssl$/i) { } elsif ($val !~ /^yes$/i) { } elsif ($key =~ /^pkcs11$/i) { } elsif ($val !~ /^no$/i) { } elsif ($key =~ /^ecdsa$/i) { } elsif ($val =~ /^yes$/i) { } elsif ($key =~ /^gost$/i) { } elsif ($val =~ /^yes$/i) { } elsif ($key =~ /^aes$/i) { } elsif ($val =~ /^yes$/i) { } elsif ($key =~ /^cc-alg$/i) { } elsif ($key =~ /^gssapi$/i) { } elsif ($key =~ /^libxml2$/i) { } elsif ($val !~ /^yes$/i) { } elsif ($key =~ /^geoip$/i) { } elsif ($key =~ /^readline$/i) { } elsif ($key =~ /^idn$/i) { } elsif ($key =~ /^iconv$/i) { } elsif ($val !~ /^yes$/i) { } elsif ($key =~ /^zlib$/i) { } elsif ($key =~ /^python$/i) { } elsif ($key =~ /^vcredist$/i) { $unknown_value = "without-vcredist (vcredist is required)"; } elsif ($val !~ /^yes$/i) { } elsif ($key =~ /^cross-compile$/i) { } elsif ($key =~ /^tuning$/i) { if ($val =~ /^large$/i) { $unknown_value = "without-" . $key; $unknown_value = "with-" . $key; # resolve enable-openssl-hash if ($enable_openssl_hash eq "auto") { if ($use_openssl ne "no") { if ($enable_native_pkcs11 eq "yes") { $enable_openssl_hash="no"; $enable_openssl_hash="yes"; $enable_openssl_hash="no"; if ($want_help ne "no") { # clean up and exit if requested if ($want_clean eq "yes") { foreach $file (@filelist) { foreach $file (@projectlist) { if ($want_unknown ne "no") { # infer vcredist when not given push(@vcpaths, File::Spec->catfile( cwd(), "..", ".." )); printf("%d\n", _MSC_VER); die "can't get _MSC_VER value: $compret\n"; print "_MSC_VER == $msc_ver\n"; # gen single threaded for < VS 2005 $configvar{"COPTML"} = "/ML"; $configvar{"COPTMLD"} = "/MLD"; # /GX deprecated in VS 2005 $configvar{"COPTX"} = "/GX"; $configvar{"COPTX"} = "/EHsc"; $configvar{"COPTY"} = "/YX"; # backtrace for >= VS 2012 $configdefp{"ISC_PLATFORM_USEBACKTRACE"} = 1; # no version of MSVS supports strcasestr() yet $configdefp{"ISC_PLATFORM_NEEDSTRCASESTR"} = 1; # warn when cross compiling if ($cross_compile eq "yes") { if ($want_x64 eq "yes") { $configvar{"BUILD_PLATFORM"} = "Win32"; $configvar{"BUILD_MACHINE"} = "/machine:X86"; if ($want_win32 eq "yes") { $configvar{"BUILD_PLATFORM"} = "x64"; $configvar{"BUILD_MACHINE"} = "/machine:X64"; } elsif ($want_win32 eq "yes") { fprintf(stderr, "compiling for x64 when win32 was asked?!\n"); my $compret = `cl /nologo /MD cross.c`; print STDERR "can't check cross compile: $compret\n"; if ($enable_intrinsics eq "yes") { $configcond{"ATOMIC"} = 1; $configvar{"INTRINSIC"} = "true"; $configvar{"COPTI"} = "/Oi"; $configdefp{"ISC_PLATFORM_HAVEXADD"} = 1; if ($want_x64 eq "yes") { $configdefp{"ISC_PLATFORM_HAVEXADDQ"} = 1; $configdefp{"ISC_PLATFORM_HAVEATOMICSTOREQ"} = 1; $configdefp{"ISC_PLATFORM_HAVEATOMICSTORE"} = 1; $configdefp{"ISC_PLATFORM_HAVECMPXCHG"} = 1; $configvar{"INTRINSIC"} = "false"; if ($enable_native_pkcs11 eq "yes") { if ($use_openssl eq "auto") { if ($use_openssl ne "no") { print "native PKCS#11 support: force with-pkcs11\n"; print "native PKCS#11 support: no PKCS#11 provider defined?\n"; print "no ECDSA support in native PKCS#11\n"; print "enabled ECDSA support in native PKCS#11\n"; print "no GOST support in native PKCS#11\n"; print "enabled GOST support in native PKCS#11\n"; print "no AES support in native PKCS#11\n"; print "enabled AES support in native PKCS#11\n"; print "OpenSSL library is disabled\n"; print "checking for an OpenSSL built directory at sibling root\n"; # Make sure we have something die "can't find an OpenSSL at sibling root\n"; # Now see if we have a directory or just a file. # Make sure we are case insensitive # If we have one use it otherwise report the error die "can't find an OpenSSL built directory at sibling root\n"; # falls into (so no else) print "checking for OpenSSL built directory at \"$openssl_path\"\n"; # Check libraries are where we expect # OpenSSL >= 1.1 is easier at the exception of the DLL print "new (>= 1.1) OpenSSL version\n"; # We must get one file only die "can't find OpenSSL libcrypto-*.dll DLL\n"; die "find more than one OpenSSL libcrypto-*.dll DLL candidate\n"; print "OpenSSL DSA support is disabled\n"; print "checking whether linking with OpenSSL works\n"; die "Can't copy OpenSSL DLL to working directory: $ret\n"; die "OpenSSL test failed\n"; printf "checking OpenSSL library version\n"; printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n" "Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n"); die "OpenSSL version test failed\n"; # check EVP_sha256 / EVP_sha384 / EVP_sha512 printf "checking for EVP_sha256\n"; print "EVP_sha256 test failed: disabling EVP_sha256\n"; print "can't compile EVP_sha256 test: $compret\n"; print "disabling EVP_sha256\n"; printf "checking for EVP_sha384\n"; print "EVP_sha384 test failed: disabling EVP_sha384\n"; print "can't compile EVP_sha384 test: $compret\n"; print "disabling EVP_sha384\n"; printf "checking for EVP_sha512\n"; print "EVP_sha512 test failed: disabling EVP_sha512\n"; print "can't compile EVP_sha512 test: $compret\n"; print "disabling EVP_sha512\n"; print "checking for OpenSSL ECDSA support\n"; print "ECDSA test failed: disabling ECDSA\n"; print "can't compile ECDSA test: $compret\n"; print "disabling ECDSA\n"; print "checking for OpenSSL GOST support\n"; #if (OPENSSL_VERSION_NUMBER >= 0x10000000L) print "GOST test failed: disabling GOST\n"; print "can't compile GOST test: $compret\n"; print "disabling GOST\n"; print "checking for OpenSSL EVP AES support\n"; print "EVP AES test failed: disabling EVP AES\n"; print "can't compile EVP AES test: $compret\n"; print "disabling EVP AES\n"; print "checking for OpenSSL native AES support\n"; const unsigned char bufin[16]; print "native AES test failed: disabling AES\n"; print "can't compile native AES test: $compret\n"; die "No OpenSSL for hash functions\n"; print "gssapi library is disabled\n"; print "checking for gssapi directory at \"$gssapi_path\"\n"; die "can't find gssapi${bits}.lib library\n"; die "can't find krb5_${bits}.lib library\n"; die "can't find gssapi${bits}.lib library\n"; die "can't find krb5_${bits}.lib library\n"; die "can't happen: no choice between Win32 and x64\n"; die "can't find gssapi${bits}.dll DLL\n"; die "can't find krb5_${bits}.dll DLL\n"; die "can't find comerr${bits}.dll DLL\n"; die "can't find k5sprt${bits}.dll DLL\n"; die "can't find wshelp${bits}.dll DLL\n"; die "No GSSAPI for SPNEGO\n"; print "geoip library is disabled\n"; print "checking for geoip directory at \"$geoip_path\"\n"; print "checking for GeoIP support\n"; die "Can't copy GeoIP DLL to working directory: $ret\n"; die "GeoIP test failed\n"; print "checking for GeoIP Country IPv6 support\n"; die "GeoIP Country IPv6 test failed\n"; die "can't compile GeoIP Country IPv6 test: $compret\n"; print "checking for GeoIP City IPv6 support\n"; die "GeoIP City IPv6 test failed\n"; print "readline library is disabled\n"; # with-idn (including with-iconv) print "IDN kit is disabled\n"; print "checking for IDN kit directory at \"$idn_path\"\n"; print "libxml2 library is disabled\n"; print "checking for a libxml2 built directory at sibling root\n"; # Make sure we have something die "can't find a libxml2 at sibling root\n"; # Now see if we have a directory or just a file. # Make sure we are case insensitive # If we have one use it otherwise report the error die "can't find a libxml2 built directory at sibling root\n"; # falls into (so no else) print "checking for libxml2 built directory at \"$libxml2_path\"\n"; die "can't find Libxml2 DLL\n"; print "zlib library is disabled\n"; print "checking for zlib directory at \"$zlib_path\"\n"; print "python is disabled\n"; print "checking for python in path\n"; # tried to use the full path without success here print "checking for python module 'argparse'\n"; print "checking for python module 'ply'\n"; print "checking for python module 'win32api'\n"; "can't find python module 'win32api': $pythonret\n"; print "checking for python module 'win32con'\n"; "can't find python module 'win32con': $pythonret\n"; $configvar{"expanded_sysconfdir"} = "__prefix__\\etc"; if ($line =~ /^@([^@]+)\@$/) { $line = "/* #undef $1 */"; if ($line =~ /^@([^@]+)\@$/) { $line = "/* #undef $1 */"; # setup conf.sh with %configtest and %configvar while ($line =~ /@([^@]+)\@/) { } elsif ($1 ~~ @substvar) { open F, ">" . $confshfile || die $!; print "Setting up $confshfile\n"; open F, $icshfile . ".in" || die $!; while ($line =~ /@([^@]+)\@/) { if (defined($configvar{$1})) { $val = kw($configvar{$1}); open F, ">" . $icshfile || die $!; print "Setting up $icshfile\n"; # setup a file with %configcond stack and %config{var,defd,inc,lib,dll,test} open F, $filename . ".in" || die $!; foreach $line (@Linesin) { if ($line =~ /^\@IF (.*)$/) { if (defined($configcond{$cond})) { die "unknown condition \@IF $1 in $filename\n"; } elsif ($line =~ /^\@ELSE (.*)$/) { die "\@ELSE $1 mismatch in $filename\n"; if (defined($configcond{$cond})) { if (scalar(@conds) > 0) { } elsif ($line =~ /^\@END (.*)$/) { die "\@END $1 mismatch in $filename\n"; if (scalar(@passes) > 0) { while ($line =~ /@([^@ ]*)@/) { if (defined($configvar{$1})) { $val = kw($configvar{$1}); $def =~ s/([\\ "])/\\$1/g; $line = qq($pre/D "$def"$post); } elsif ($1 ~~ @substinc) { } elsif ($1 ~~ @substlib) { } elsif ($1 ~~ @substdll) { if (defined($configdll{$1})) { $val = kw($configdll{$1}); # setup a project with %configcond stack and %config{var,defd,inc,lib,dll} while ($line =~ /@([^@ ]*)@/) { } elsif ($1 ~~ @substdefd) { } elsif ($1 ~~ @substinc) { if (defined($configinc{$1})) { $val = kw($configinc{$1}); } elsif ($1 ~~ @substdll) { die "unknown control $& in $projectname\n"; open F, ">" . $projectname || die $!; print "Setting up $projectname\n"; foreach $line (@Linesout) { # List of directories with version files my @dirlist = ("isc", "dns", "isccc", "isccfg", "lwres", "bind9", "irs"); "bind9" => "LIBBIND9_EXPORTS", "dns" => "LIBDNS_EXPORTS", "irs" => "LIBIRS_EXPORTS", "isc" => "LIBISC_EXPORTS", "isccc" => "LIBISCCC_EXPORTS", "isccfg" => "LIBISCCFG_EXPORTS", "lwres" => "LIBLWRES_EXPORTS"); my @VersionNames = ("LIBINTERFACE", "LIBREVISION", "LIBAGE"); my $versionpath = "..\\$versionfile"; open M, "..\\lib\\dns\\mapapi" || die $!; ($name, $value) = split(/=/, $data); ($name) = split(/\s+/, $name); ($value) = split(/\s+/, $value); # Now set up the output version file my $ThisDate = scalar localtime(); open O, ">$versionpath" || * Copyright (C) 2001 Internet Systems Consortium, Inc. ("ISC") * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this print O "#define VERSION \"$Version\"\n"; print O "#define PRODUCT \"$Versions{'PRODUCT'}\"\n\n"; print O "#define DESCRIPTION \"$Versions{'DESCRIPTION'}\"\n\n"; print O "#define MAPAPI \"$Mapapi\"\n\n"; print O "#endif /* VERSIONS_H */\n"; # Now set up the output version file * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this print SOUT "#endif /* SRCID_H */\n"; open FOUT, ">InstallFlags" || die "cannot open InstallFlags: $!\n"; print FOUT "# Flags for BINDInstall\n"; print FOUT "runvcredist\n"; open LOUT, ">InstallFiles" || die "cannot open InstallFiles: $!\n"; print LOUT "# File list for BINDInstall\n"; print LOUT "${name}-BCFT\n"; print LOUT "InstallFlags-BNFT\n"; print LOUT "InstallFiles-BNFT\n"; #$configtest{"DNSTAP"} = "dnstap"; #$configtest{"FSTRM_CAPTURE"} = "fstrm_capture"; # no json-c library for WIN32 #$configtest{"JSONSTATS"} = 1; #$configtest{"NZD_TOOLS"} = "nzd"; # TODO check for pkcs11ssl and set PKCS11_TEST print "Configuration Status\n"; print "\t\t$name is true\n"; print "\t\t$name is false\n"; print "\tsubstitutions:\n"; print "add win32 or x64 to commit configuration to build files\n"; # --enable-developer partially supported # --enable-newstats (9.9/9.9sub only) # --enable-native-pkcs11 supported # --enable-openssl-version-check included without a way to disable it # --enable-openssl-hash supported # --enable-threads included without a way to disable it # --enable-backtrace backtrace included without a way to disable it # --enable-symtable incompatible with DLLs (or libtool) # --enable-ipv6 included without a way to disable it # --enable-atomic supported (renamed to intrinsic) # --enable-isc-spnego supported (part of GSSAPI) # --enable-fixed-rrset supported # --enable-querytrace supported # --disable-rpz-nsip supported # --disable-rpz-nsdname supported # --enable-filter-aaaa supported # --enable-full-report supported by verbose # --enable-dnstap not supported (requires libfstrm support on WIN32) # --enable-seccomp not supported (Linux specific) # --enable-afl not supported (not yet available on Visual Studio C++) # --with-python supported # --with-openssl supported # --with-pkcs11 supported # --with-cc-alg supported # --with-gssapi supported with MIT (K)erberos (f)or (W)indows # --with-libxml2 supported # --with-libjson not supported on WIN32 (package not available on WIN32) # --with-purify not supported (package available on WIN32 but for free?) # --with-gperftools-profiler not supported (package not available on WIN32) # --with-libtool not supported on WIN32 (never) # --with-locktype not supported on WIN32 (not yet available on WIN32) # --with-readline supported # --with-protobuf-c not supported (no reason to until libfstrm is ready) # --with-libfrtrm not supported (not yet available on WIN32) # --with-docbook-xsl not supported (?) # --with-idn[lib] supported # --with-[lib]iconv supported (part of IDN) # --with-atf not supported on WIN32 (package not available on WIN32) # --with-tuning supported # --with-dlopen included without a way to disable it # MSVC 14.0 _MSC_VER == 1900 (VS 2015) # MSVC 12.0 _MSC_VER == 1800 (VS 2013) # MSVC 11.0 _MSC_VER == 1700 (VS 2012) # MSVC 10.0 _MSC_VER == 1600 (VS 2010) # MSVC 9.0 _MSC_VER == 1500 (VS 2008) # MSVC 8.0 _MSC_VER == 1400 (VS 2005) # MSVC 7.1 _MSC_VER == 1310 (VS .NET 2003) # MSVC 7.0 _MSC_VER == 1300 (VS .NET (2002)) # MSVC 6.0 _MSC_VER == 1200 (VS 6.0 (1998)) # MSVC 5.0 _MSC_VER == 1100 (VS 97)