Configure revision dbb012765c735ee0d82dedb116cdc7cf18957814
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Copyright (C) 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# Permission to use, copy, modify, and/or distribute this software for any
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# purpose with or without fee is hereby granted, provided that the above
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# copyright notice and this permission notice appear in all copies.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# PERFORMANCE OF THIS SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# This script builds nmake and visual studio build files
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncrequire 5.000;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync# files to configure
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncmy $platformfile = "..\\lib\\isc\\win32\\include\\isc\\platform.h";
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncmy @filelist = ("..\\bin\\check\\win32\\checktool.dsp",
# for config.h
my %configdefh;
# for platform.h
my %configdefp;
my %configinc;
my %configlib;
my %configdll;
my %configvar;
my %configdefd;
my %configcond;
@usage,
my $unknown_value;
$verbose = 1;
$legacy_only = 1;
$unknown_value = $_;
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 ($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 =~ /^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 =~ /^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 =~ /^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;
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
# 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 %Versions;
my $Version;
my %ApiVersions;
my $Mapapi;
my $data;
my $name;
my $value;
close V;
close M;
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;
my $name;
my $file;
# Notes: Unix configure.in options