# All of the following is disabled by default (RC5 was enabled before 0.9.8):
our %disabled = ( # "what" => "comment"
- "aria" => "default",
"asan" => "default",
"crypto-mdebug" => "default",
"crypto-mdebug-backtrace" => "default",
$config{openssl_thread_defines}=[];
$config{openssl_sys_defines}=[];
$config{openssl_other_defines}=[];
+my $ldflags="";
my $libs="";
my $target="";
$config{options}="";
{
read_config $1;
}
- elsif (/^-[lL](.*)$/ or /^-Wl,/)
+ elsif (/^-L(.*)$/)
+ {
+ $ldflags.=$_." ";
+ }
+ elsif (/^-l(.*)$/ or /^-Wl,/)
{
$libs.=$_." ";
}
$config{defines} = [];
$config{cflags} = "";
$config{cxxflags} = "";
+$config{lflags} = "";
$config{ex_libs} = "";
$config{shared_ldflag} = "";
}
$config{ex_libs}="$libs$config{ex_libs}" if ($libs ne "");
+$config{lflags}="$config{lflags}$ldflags" if ($ldflags ne "");
# If threads aren't disabled, check how possible they are
unless ($disabled{threads}) {
my %predefined = compiler_predefined($target{cc});
+# Check for makedepend capabilities.
if (!$disabled{makedepend}) {
- # We know that GNU C version 3 and up as well as all clang
- # versions support dependency generation
- if ($predefined{__GNUC__} >= 3) {
+ if ($config{target} =~ /^(VC|vms)-/) {
+ # For VC- and vms- targets, there's nothing more to do here. The
+ # functionality is hard coded in the corresponding build files for
+ # cl (Windows) and CC/DECC (VMS).
+ } elsif ($predefined{__GNUC__} >= 3) {
+ # We know that GNU C version 3 and up as well as all clang
+ # versions support dependency generation
$config{makedepprog} = "\$(CROSS_COMPILE)$target{cc}";
} else {
+ # In all other cases, we look for 'makedepend', and disable the
+ # capability if not found.
$config{makedepprog} = which('makedepend');
$disabled{makedepend} = "unavailable" unless $config{makedepprog};
}
$config{build_infos} = [ ];
+ my %ordinals = ();
foreach (@build_infos) {
my $sourced = catdir($srcdir, $_->[0]);
my $buildd = catdir($blddir, $_->[0]);
my @intermediates = ();
my @rawlines = ();
- my %ordinals = ();
my %sources = ();
my %shared_sources = ();
my %includes = ();
if @doubles;
}
- foreach (keys %ordinals) {
- my $dest = $_;
- my $ddest = cleanfile($buildd, $_, $blddir);
- if ($unified_info{rename}->{$ddest}) {
- $ddest = $unified_info{rename}->{$ddest};
- }
- foreach (@{$ordinals{$dest}}) {
- my %known_ordinals =
- (
- crypto =>
- cleanfile($sourced, catfile("util", "libcrypto.num"), $blddir),
- ssl =>
- cleanfile($sourced, catfile("util", "libssl.num"), $blddir)
- );
- my $o = $known_ordinals{$_};
- die "Ordinals for $ddest defined more than once\n"
- if $unified_info{ordinals}->{$ddest};
- $unified_info{ordinals}->{$ddest} = [ $_, $o ];
- }
- }
-
foreach (keys %sources) {
my $dest = $_;
my $ddest = cleanfile($buildd, $_, $blddir);
}
}
+ my $ordinals_text = join(', ', sort keys %ordinals);
+ warn <<"EOF" if $ordinals_text;
+
+WARNING: ORDINALS were specified for $ordinals_text
+They are ignored and should be replaced with a combination of GENERATE,
+DEPEND and SHARED_SOURCE.
+EOF
+
### Make unified_info a bit more efficient
# One level structures
foreach (("programs", "libraries", "engines", "scripts", "extra", "overrides")) {
#print "RANLIB =", $target{ranlib} eq '$(CROSS_COMPILE)ranlib' ?
# "$config{cross_compile_prefix}ranlib" :
# "$target{ranlib}", "\n";
+print "LDFLAGS =$config{lflags} $target{lflags}\n";
print "EX_LIBS =$target{ex_libs} $config{ex_libs}\n";
my %builders = (
%targets = read_eval_file($fname);
}
+ my %preexisting = ();
+ foreach (sort keys %targets) {
+ $preexisting{$_} = 1 if $table{$_};
+ }
+ die <<"EOF",
+The following config targets from $fname
+shadow pre-existing config targets with the same name:
+EOF
+ map { " $_\n" } sort keys %preexisting
+ if %preexisting;
+
# For each target, check that it's configured with a hash table.
foreach (keys %targets) {