Configuration for linux on ARM (contributed by Jeremy Norris
[openssl.git] / Configure
index 112a48836d7a8ca797a980697f5d273d7e4ab034..8ba23128fc40fe2dc30b571aebfa3b3717490f1b 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -272,9 +272,11 @@ my %table=(
 # bn86-elf.o file file since it is hand tweaked assembler.
 "linux-elf",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 "debug-linux-elf","gcc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
+"debug-linux-elf-noefence","gcc:-DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 "linux-aout",  "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 "linux-mips",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
 "linux-ppc",    "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
+"linux-m68k",   "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
 "linux-ia64",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::SIXTY_FOUR_BIT_LONG::",
 "NetBSD-sparc",        "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
 "NetBSD-m68",  "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
@@ -288,6 +290,9 @@ my %table=(
 # NCR MP-RAS UNIX ver 02.03.01
 "ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
 
+# Linux on ARM
+"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::dlfcn",
+
 # UnixWare 2.0
 "unixware-2.0","cc:-O -DFILIO_H::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
 "unixware-2.0-pentium","cc:-O -DFILIO_H -Kpentium -Kthread::(unknown):-lsocket -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
@@ -554,21 +559,27 @@ $cflags="$flags$cflags" if ($flags ne "");
 # has support compiled in for them. Currently each method is enabled
 # by a define "DSO_<name>" ... we translate the "dso_scheme" config
 # string entry into using the following logic;
+my $dso_cflags;
 if (!$no_dso && $dso_scheme ne "")
        {
        $dso_scheme =~ tr/[a-z]/[A-Z]/;
        if ($dso_scheme eq "DLFCN")
                {
-               $cflags = "-DDSO_DLFCN -DHAVE_DLFCN_H $cflags";
+               $dso_cflags = "-DDSO_DLFCN -DHAVE_DLFCN_H";
+               $openssl_other_defines .= "#define DSO_DLFCN\n";
+               $openssl_other_defines .= "#define HAVE_DLFCN_H\n";
                }
        elsif ($dso_scheme eq "DLFCN_NO_H")
                {
-               $cflags = "-DDSO_DLFCN $cflags";
+               $dso_cflags = "-DDSO_DLFCN";
+               $openssl_other_defines .= "#define DSO_DLFCN\n";
                }
        else
                {
-               $cflags = "-DDSO_$dso_scheme $cflags";
+               $dso_cflags = "-DDSO_$dso_scheme";
+               $openssl_other_defines .= "#define DSO_$dso_scheme\n";
                }
+       $cflags = "$dso_cflags $cflags";
        }
 
 my $thread_cflags;
@@ -883,12 +894,13 @@ EOF
        ### (system 'make depend') == 0 or exit $? if $depflags ne "";
        # Run "make depend" manually if you want to be able to delete
        # the source code files of ciphers you left out.
-       &dofile("tools/c_rehash",$openssldir,'^DIR=',   'DIR=%s',);
        if ( $perl =~ m@^/@) {
+           &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
            &dofile("apps/der_chop",$perl,'^#!/', '#!%s');
            &dofile("apps/CA.pl",$perl,'^#!/', '#!%s');
        } else {
            # No path for Perl known ...
+           &dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
            &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
            &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
        }