Configure revision bce9696c7ac65792469b29ce0ad13564953b62ca
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# Copyright (C) 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# Permission to use, copy, modify, and/or distribute this software for any
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# purpose with or without fee is hereby granted, provided that the above
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# copyright notice and this permission notice appear in all copies.
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# PERFORMANCE OF THIS SOFTWARE.
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# This script builds nmake and visual studio build files
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsyncrequire 5.000;
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# files to configure
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsyncmy $platformfile = "..\\lib\\isc\\win32\\include\\isc\\platform.h";
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsyncmy @filelist = ("..\\bin\\check\\win32\\checktool.dsp",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsyncmy @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\check\\win32\\checkconf.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\check\\win32\\checktool.vcxproj.filters",
e361162aaa3f264085c651f9ea83f70d0ff3e431vboxsync "..\\bin\\check\\win32\\checkzone.vcxproj.filters",
e361162aaa3f264085c651f9ea83f70d0ff3e431vboxsync "..\\bin\\confgen\\win32\\confgentool.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\confgen\\win32\\ddnsconfgen.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\confgen\\win32\\rndcconfgen.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\dnssec\\win32\\dnssectool.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\dnssec\\win32\\dsfromkey.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\dnssec\\win32\\importkey.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\dnssec\\win32\\keyfromlabel.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\dnssec\\win32\\signzone.vcxproj.filters",
09ed5ee011f3a6cd9d4742216ad3bb7dbf855641vboxsync "..\\bin\\nsupdate\\win32\\nsupdate.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\pkcs11\\win32\\pk11destroy.vcxproj.filters",
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync "..\\bin\\pkcs11\\win32\\pk11keygen.vcxproj.filters",
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync "..\\bin\\pkcs11\\win32\\pk11list.vcxproj.filters",
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync "..\\bin\\pkcs11\\win32\\pk11tokens.vcxproj.filters",
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync "..\\bin\\tools\\win32\\genrandom.vcxproj.filters",
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync "..\\bin\\tools\\win32\\ischmacfixup.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\tools\\win32\\journalprint.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\tools\\win32\\nsec3hash.vcxproj.filters",
cb172d105a87f41489b1553fbd99ec97932609ffvboxsync "..\\bin\\tools\\win32\\rrchecker.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\tests\\atomic\\win32\\t_atomic.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\tests\\dst\\win32\\t_dst.vcxproj.filters",
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync "..\\bin\\tests\\master\\win32\\t_master.vcxproj.filters",
# 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