Configure revision f03747965c663e5d21af52dd111460efea9e8dd7
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# Copyright (C) 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# Permission to use, copy, modify, and/or distribute this software for any
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# purpose with or without fee is hereby granted, provided that the above
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# copyright notice and this permission notice appear in all copies.
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# PERFORMANCE OF THIS SOFTWARE.
664e667e221a15fa5f456e73948c67710f43f1b4minfrin# This script builds nmake and visual studio build files
664e667e221a15fa5f456e73948c67710f43f1b4minfrinrequire 5.000;
403c4b12252c59673100b19905e3c1fcb53ac773minfrin# files to configure
403c4b12252c59673100b19905e3c1fcb53ac773minfrinmy $platformfile = "..\\lib\\isc\\win32\\include\\isc\\platform.h";
403c4b12252c59673100b19905e3c1fcb53ac773minfrinmy @filelist = ("..\\bin\\check\\win32\\checktool.dsp",
664e667e221a15fa5f456e73948c67710f43f1b4minfrinmy @projectlist = ("..\\bin\\check\\win32\\checkconf.vcxproj",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\confgen\\win32\\confgentool.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\confgen\\win32\\ddnsconfgen.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\confgen\\win32\\rndcconfgen.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\dnssec\\win32\\dnssectool.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\dnssec\\win32\\dsfromkey.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\dnssec\\win32\\importkey.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\dnssec\\win32\\keyfromlabel.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\nsupdate\\win32\\nsupdate.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\pkcs11\\win32\\pk11destroy.vcxproj.filters",
664e667e221a15fa5f456e73948c67710f43f1b4minfrin "..\\bin\\pkcs11\\win32\\pk11keygen.vcxproj.filters",
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh "..\\bin\\tools\\win32\\arpaname.vcxproj.filters",
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh "..\\bin\\tests\\atomic\\win32\\t_atomic.vcxproj.filters",
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd "..\\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 =~ /^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 $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;
foreach $file (sort {uc($b) cmp uc($a)} @dirlist) {
if (-f File::Spec->catfile($openssl_path,
$openssl_path = File::Spec->catdir($openssl_path, $file);
"opensslv.h")) {
if (!-f File::Spec->catfile($openssl_path, "out32dll", "libeay32.dll")) {
} elsif ($verbose) {
if ($verbose) {
open F, ">testossl.c" || die $!;
$compret = `cl /nologo /MD /I "$include" testossl.c "$library"`;
if (grep { -f and -x } ".\\testossl.exe") {
`.\\testossl.exe`;
if ($verbose) {
#include <stdio.h>
#include <openssl/opensslv.h>
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};
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";
if ($Versions{'PATCHVER'} != "") {
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;
my $name;
my $file;
# Notes: Unix configure.in options