Configure revision 095c47be5456c17087d7b39dfc97ebee65e0dfbb
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This Source Code Form is subject to the terms of the Mozilla Public
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# License, v. 2.0. If a copy of the MPL was not distributed with this
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# file, You can obtain one at http://mozilla.org/MPL/2.0/.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Configure
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This script builds nmake and visual studio build files
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinrequire 5.000;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# files to configure
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinmy $platformfile = "..\\lib\\isc\\win32\\include\\isc\\platform.h";
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinmy @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\confgen\\win32\\confgentool.vcxproj",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\confgen\\win32\\confgentool.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\confgen\\win32\\ddnsconfgen.vcxproj",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\confgen\\win32\\ddnsconfgen.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\confgen\\win32\\rndcconfgen.vcxproj",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\confgen\\win32\\rndcconfgen.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\dig\\win32\\dighost.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\dig\\win32\\nslookup.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\dnssec\\win32\\dnssectool.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\dnssec\\win32\\dsfromkey.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\dnssec\\win32\\importkey.vcxproj.filters",
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz "..\\bin\\dnssec\\win32\\keyfromlabel.vcxproj",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\dnssec\\win32\\keyfromlabel.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\atomic\\win32\\t_atomic.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\master\\win32\\t_master.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\hashes\\win32\\t_hashes.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\names\\win32\\t_names.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\resolver\\win32\\t_resolver.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\sockaddr\\win32\\t_sockaddr.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\tasks\\win32\\t_tasks.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\timers\\win32\\t_timers.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\win32\\backtrace_test.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\win32\\shutdown_test.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\tests\\win32\\shutdown_test.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "..\\bin\\win32\\BINDInstall\\BINDInstall.vcxproj.filters",
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# libraries
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# variables
my %configdefd;
my %configcond;
@usage,
my $unknown_value;
$verbose = 1;
$legacy_only = 1;
$unknown_value = $_;
my %Versions;
my $data;
my $name;
my $value;
my $version;
close V;
my $arg = $_[0];
my $key = $_[0];
my $val = $_[1];
if ($key =~ /^intrinsics$/i) {
if ($val =~ /^no$/i) {
} elsif ($key =~ /^native-pkcs11$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^openssl-hash$/i) {
if ($val =~ /^yes$/i) {
} elsif ($val =~ /^no$/i) {
} elsif ($key =~ /^isc-spnego$/i) {
if ($val =~ /^no$/i) {
} elsif ($key =~ /^filter-aaaa$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^fixed-rrset$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^developer$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^querytrace$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^rpz-nsip$/i) {
if ($val =~ /^no$/i) {
} elsif ($key =~ /^rpz-nsdname$/i) {
if ($val =~ /^no$/i) {
my $key = $_[0];
my $val = $_[1];
if ($key =~ /^tests$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^extra-tests$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^samples$/i) {
if ($val =~ /^yes$/i) {
} elsif ($key =~ /^openssl$/i) {
if ($val =~ /^no$/i) {
} elsif ($val !~ /^yes$/i) {
} elsif ($key =~ /^pkcs11$/i) {
if ($val =~ /^yes$/i) {
} elsif ($val !~ /^no$/i) {
$pkcs11_path = $val;
$pkcs11_path =~ s/\.dll$//i;
} elsif ($key =~ /^ecdsa$/i) {
if ($val =~ /^no$/i) {
} elsif ($val =~ /^yes$/i) {
} elsif ($key =~ /^gost$/i) {
if ($val =~ /^no$/i) {
} elsif ($val =~ /^yes$/i) {
} elsif ($key =~ /^aes$/i) {
if ($val =~ /^no$/i) {
} elsif ($val =~ /^yes$/i) {
} elsif ($key =~ /^cc-alg$/i) {
} elsif ($key =~ /^gssapi$/i) {
if ($val !~ /^no$/i) {
if ($val !~ /^yes$/i) {
$gssapi_path = $val;
} elsif ($key =~ /^libxml2$/i) {
if ($val =~ /^no$/i) {
} elsif ($val !~ /^yes$/i) {
} elsif ($key =~ /^geoip$/i) {
if ($val !~ /^no$/i) {
if ($val !~ /^yes$/i) {
$geoip_path = $val;
} elsif ($key =~ /^readline$/i) {
if ($val !~ /^no$/i) {
if ($val !~ /^yes$/i) {
} elsif ($key =~ /^idn$/i) {
if ($val !~ /^no$/i) {
if ($val !~ /^yes$/i) {
} elsif ($key =~ /^iconv$/i) {
if ($val =~ /^no$/i) {
if ($verbose) {
if ($verbose) {
my $rfile;
if (-f $vp) {
if ($verbose) {
my $msc_ver = 0;
#include <windows.h>
#include <stdio.h>
print STDERR "only the legacy (cf legacy\\win32-build.txt) will work\n";
open F, ">cross.c" || die $!;
#include <windows.h>
#include <stdio.h>
my $compret = `cl /nologo /MD cross.c`;
if (grep { -f and -x } ".\\cross.exe") {
my $cross = `.\\cross.exe`;
#include <windows.h>
#include <stdio.h>
if ($cross) {
print STDERR $cross;
my $file;
last;
close F;
#include <stdio.h>
#include <openssl/opensslv.h>
OPENSSL_VERSION_NUMBER >= 0x0090804fL)
close F;
close F;
close F;
close F;
close F;
ENGINE *e;
close F;
EVP_CIPHER *aes128, *aes192, *aes256;
close F;
AES_KEY k;
const unsigned char bufin[16];
unsigned char bufout[16];
close F;
close F;
my $gssapi_lib;
my $krb5_lib;
return GeoIP_open != 0;
close F;
#include <GeoIP.h>
int flag = 1;
close F;
#include <GeoIP.h>
#include <GeoIPCity.h>
int i = GEOIP_CITY_EDITION_REV0_V6;
int flag = 1;
close F;
my $file;
last;
print STDERR
print STDERR
# setup config.h with %configdefh
my $line;
my @Lines;
open F, $configfilein || die $!;
@Lines = <F>;
close F;
open F, $configfileout || die $!;
close F;
# setup platform.h with %configdefp
my $line;
my @Lines;
@Lines = <F>;
close F;
close F;
my $line;
my @Linesin;
my @Linesout;
my $filename = $_[0];
my $cond;
my @conds;
my $pass = 1;
my @passes;
my $val;
@Linesin = <F>;
close F;
$cond = $1;
$pass = 0;
$pass = 0;
$pass = 1;
$pass = 1;
if (defined($configdefd{$1})) {
my $def = $configdefd{$1};
push @Linesout, $line;
if ($verbose) {
foreach $line (@Linesout) {
my $line;
my $projectname = $_[0];
my $cond;
my $pass = 1;
my $val;
foreach $line (@Linesin) {
chomp $line;
if ($line =~ /^\@IF (.*)$/) {
if (defined($cond)) {
unshift(@conds, $cond);
unshift(@passes, $pass);
$cond = $1;
if (defined($configcond{$cond})) {
$pass = 0;
} elsif ($line =~ /^\@ELSE (.*)$/) {
if ($cond ne $1) {
if (defined($configcond{$cond})) {
$pass = 0;
$pass = 1;
} elsif ($line =~ /^\@END (.*)$/) {
if ($cond ne $1) {
$cond = shift(@conds);
$pass = shift(@passes);
$pass = 1;
if ($pass == 0) {
while ($line =~ /@([^@ ]*)@/) {
if (defined($configvar{$1})) {
$val = kw($configvar{$1});
if (defined($configlib{$1})) {
$val = kw($configlib{$1});
close F;
# make versions.h
my $Version;
my %ApiVersions;
my $Mapapi;
my $data;
my $name;
my $value;
close M;
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
my $dir;
my $apifile;
$name =~ s/\s+//;
$value =~ s/\s+//;
$ApiVersions{$name} = $value;
close A;
close O;
# make srcid.h
my $data;
my $name;
my $value;
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
my $name;
my $file;
# Notes: Unix configure.in options