Configure revision 3b6e750bb70754e8c4c5309db1d203b4289929a1
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews# Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews# This script builds nmake and visual studio build files
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrewsrequire 5.000;
c2bb8559119f4437e82ed228385b1dbeb156196aBrian Wellington# files to configure
854d0238dbc2908490197984b3b9d558008a53dfMark Andrewsmy $platformfile = "..\\lib\\isc\\win32\\include\\isc\\platform.h";
854d0238dbc2908490197984b3b9d558008a53dfMark Andrewsmy $confshfile = "..\\bin\\tests\\system\\conf.sh";
6324997211a5e2d82528dcde98e8981190a35faeMichael Graffmy @filelist = ("..\\bin\\check\\win32\\checktool.dsp",
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson "..\\bin\\dnssec\\win32\\keyfromlabel.dsp",
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson "..\\bin\\dnssec\\win32\\keyfromlabel.mak",
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson "..\\bin\\pkcs11\\win32\\pk11destroy.dsp",
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews "..\\bin\\tests\\resolver\\win32\\t_resolver.dsp",
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews "..\\bin\\tests\\resolver\\win32\\t_resolver.mak",
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews "..\\bin\\tests\\sockaddr\\win32\\t_sockaddr.dsp",
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews "..\\bin\\tests\\sockaddr\\win32\\t_sockaddr.mak",
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff "..\\bin\\tests\\timers\\win32\\t_timers.mak",
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews "..\\bin\\tests\\system\\win32\\feature-test.dsp",
c363150ad598e7a8ce03efe2776b8e6950f0de7bBrian Wellington "..\\bin\\tests\\system\\win32\\feature-test.mak",
c363150ad598e7a8ce03efe2776b8e6950f0de7bBrian Wellington "..\\bin\\tests\\system\\win32\\gencheck.dsp",
c363150ad598e7a8ce03efe2776b8e6950f0de7bBrian Wellington "..\\bin\\tests\\system\\win32\\gencheck.mak",
f7b99290c31abeb20c55fc55391510450ce60423Mark Andrews "..\\bin\\tests\\system\\win32\\keycreate.dsp",
c2bb8559119f4437e82ed228385b1dbeb156196aBrian Wellington "..\\bin\\tests\\system\\win32\\keycreate.mak",
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews "..\\bin\\tests\\system\\win32\\keydelete.dsp",
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff "..\\bin\\tests\\system\\win32\\keydelete.mak",
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff "..\\bin\\tests\\system\\win32\\pipequeries.dsp",
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews "..\\bin\\tests\\system\\win32\\pipequeries.mak",
c363150ad598e7a8ce03efe2776b8e6950f0de7bBrian Wellington "..\\bin\\tests\\win32\\backtrace_test.dsp",
c363150ad598e7a8ce03efe2776b8e6950f0de7bBrian Wellington "..\\bin\\tests\\win32\\backtrace_test.mak",
# for config.h
my %configdefh;
# for platform.h
my %configdefp;
# for conf.sh
my %configtest;
my %configinc;
my %configlib;
my %configdll;
my %configvar;
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 =~ /^system-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;
last;
my $openssl_new = 0;
$openssl_new = 1;
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;
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;
@Lines = <F>;
close F;
close F;
# setup platform.h with %configdefp
my $line;
my @Lines;
@Lines = <F>;
close F;
close F;
# setup conf.sh with %configtest and %configvar
my $line;
my @Lines;
my $val;
@Lines = <F>;
close F;
if (defined($configvar{$1})) {
$val = kw($configvar{$1});
die "unknown control $& in $confshfile.win32\n";
# setup isc-config.sh with %configvar accepting undefined
my $def = $configdefd{$1};
if (defined($configinc{$1})) {
if (defined($configlib{$1})) {
$val = kw($configlib{$1});
close F;
my $line;
my @Linesin;
my @Linesout;
my $projectname = $_[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})) {
$val = kw($configdefd{$1});
if (defined($configdll{$1})) {
$val = kw($configdll{$1});
# make versions.h
my $versionfile = "versions.h";
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
if ($Versions{'PATCHVER'} ne "") {
if ($verbose) {
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 $name;
my $file;
# Notes: Unix configure.in options