Use File::Path::mkpath rather than File::Path::make_path
[openssl.git] / Configure
index 06eca504b59b8c35d4ae17141e284e2210a9bdad..9954858f8cee4a516b3e51fd732d998f3b943e6d 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -10,8 +10,8 @@
 require 5.000;
 use strict;
 use File::Basename;
-use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs catpath splitpath/;
-use File::Path qw/make_path/;
+use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
+use File::Path qw/mkpath/;
 use Cwd qw/:DEFAULT realpath/;
 
 # see INSTALL for instructions.
@@ -175,8 +175,7 @@ die "erroneous version information in opensslv.h: ",
 
 # Collect target configurations
 
-my ($vol, $dir, $dummy) = splitpath($0);
-my $pattern = catpath($vol, catdir($dir, "Configurations"), "*.conf");
+my $pattern = catfile(dirname($0), "Configurations", "*.conf");
 foreach (sort glob($pattern) ) {
     &read_config($_);
 }
@@ -228,6 +227,7 @@ my @dtls = qw(dtls1 dtls1_2);
 my @disablables = (
     "aes",
     "asm",
+    "async",
     "bf",
     "camellia",
     "capieng",
@@ -251,6 +251,7 @@ my @disablables = (
     "ecdh",
     "ecdsa",
     "ec_nistp_64_gcc_128",
+    "egd",
     "engine",
     "err",                     # Really???
     "heartbeats",
@@ -597,11 +598,11 @@ foreach (@argvcopy)
                        }
                elsif (/^--with-zlib-lib=(.*)$/)
                        {
-                       $withargs{"zlib-lib"}=$1;
+                       $withargs{zlib_lib}=$1;
                        }
                elsif (/^--with-zlib-include=(.*)$/)
                        {
-                       $withargs{"zlib-include"}="-I$1";
+                       $withargs{zlib_include}="-I$1";
                        }
                elsif (/^--with-fipslibdir=(.*)$/)
                        {
@@ -741,7 +742,7 @@ foreach (sort (keys %disabled))
                my ($ALGO, $algo);
                ($ALGO = $algo = $_) =~ tr/[\-a-z]/[_A-Z]/;
 
-               if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/)
+               if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/ || /^async$/)
                        {
                        push @{$config{openssl_other_defines}}, "OPENSSL_NO_$ALGO";
                        print " OPENSSL_NO_$ALGO";
@@ -819,7 +820,8 @@ $config{openssldir} = catdir($config{prefix}, $config{openssldir})
 # Allow environment CC to override compiler...
 $target{cc} = $ENV{CC} || $target{cc};
 
-# For cflags, lflags and ex_libs, add the debug_ or release_ attributes
+# For cflags, lflags, plib_lflags and ex_libs, add the debug_ or release_
+# attributes.
 # Do it in such a way that no spurious space is appended (hence the grep).
 $config{cflags} = join(" ",
                       grep { $_ ne "" } ($target{cflags},
@@ -827,6 +829,9 @@ $config{cflags} = join(" ",
 $config{lflags} = join(" ",
                       grep { $_ ne "" } ($target{lflags},
                                          $target{$build_prefix."lflags"}));
+$config{plib_lflags} = join(" ",
+                           grep { $_  ne "" } ($target{plib_lflags},
+                                               $target{$build_prefix."plib_lflags"}));
 $config{ex_libs} = join(" ",
                        grep { $_  ne "" } ($target{ex_libs},
                                            $target{$build_prefix."ex_libs"}));
@@ -938,9 +943,9 @@ if ($zlib)
        $config{cflags} = "-DZLIB $config{cflags}";
        if (defined($disabled{"zlib-dynamic"}))
                {
-               if (defined($withargs{"zlib-lib"}))
+               if (defined($withargs{zlib_lib}))
                        {
-                       $config{ex_libs} .= " -L" . $withargs{"zlib-lib"} . " -lz";
+                       $config{ex_libs} .= " -L" . $withargs{zlib_lib} . " -lz";
                        }
                else
                        {
@@ -1167,7 +1172,7 @@ if ($target{build_scheme}->[0] eq "unified") {
         my $dir = shift;
 
         # Required, because realpath only works properly with existing dirs
-        make_path($dir);
+        mkpath($dir);
 
         my $res = realpath($dir);
         return $res;
@@ -1211,7 +1216,7 @@ if ($target{build_scheme}->[0] eq "unified") {
         my $sourced = catdir($srcdir, $_->[0]);
         my $buildd = catdir($blddir, $_->[0]);
 
-        make_path($buildd);
+        mkpath($buildd);
 
         my $f = $_->[1];
         # The basic things we're trying to build
@@ -1652,7 +1657,8 @@ EOF
 print "IsMK1MF       =", ($target{build_scheme}->[0] eq "mk1mf" ? "yes" : "no"), "\n";
 print "CC            =$target{cc}\n";
 print "CFLAG         =$config{cflags}\n";
-print "LFLAGS        =$config{lflags}\n";
+print "LFLAG         =$config{lflags}\n";
+print "PLIB_LFLAG    =$config{plib_lflags}\n";
 print "EX_LIBS       =$config{ex_libs}\n";
 print "CPUID_OBJ     =$target{cpuid_obj}\n";
 print "BN_ASM        =$target{bn_obj}\n";
@@ -1682,11 +1688,11 @@ print "THIRTY_TWO_BIT mode\n" if $config{b32};
 print "BN_LLONG mode\n" if $config{bn_ll};
 print "RC4 uses $config{rc4_int}\n" if $config{rc4_int} != $def_int;
 
-make_path(catdir($blddir, "include/openssl"));
+mkpath(catdir($blddir, "include/openssl"));
 run_dofile(catfile($blddir, "include/openssl/opensslconf.h"),
            catfile($srcdir, "include/openssl/opensslconf.h.in"));
 
-make_path(catdir($blddir, "crypto/include/internal"));
+mkpath(catdir($blddir, "crypto/include/internal"));
 foreach my $alg ( 'bn' ) {
     run_dofile(catfile($blddir, "crypto/include/internal/${alg}_conf.h"),
                catfile($srcdir, "crypto/include/internal/${alg}_conf.h.in"));
@@ -2115,10 +2121,13 @@ sub print_table_entry
        "unistd",
        "ld",
        "lflags",
+       "plib_lflags",
        "ex_libs",
        "debug_lflags",
+       "debug_plib_lflags",
        "debug_ex_libs",
        "release_lflags",
+       "release_plib_lflags",
        "release_ex_libs",
        "bn_ops",
        "cpuid_obj",