X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Configure;h=a87ab9989c7256ba70ed2a7724c7bc317920317e;hp=884893f1792017718b99b34e748fdaf2eb9cc036;hb=d9c88a3902bcd9513ca99dfd8383e054494d03b2;hpb=e5b4462f47776bd682dc1042abe6192ddf999654 diff --git a/Configure b/Configure index 884893f179..a87ab9989c 100755 --- a/Configure +++ b/Configure @@ -102,9 +102,9 @@ my %table=( "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown):::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", "debug-bodo", "gcc:-DBIO_PAIR_DEBUG -DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", -"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm", -"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm", -"debug-levitte-linux-elf","gcc:-DRL_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:::", +"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm", +"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm", +"debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:::", "dist", "cc:-O::(unknown):::::", # Basic configs that should work on any (32 and less bit) box @@ -270,7 +270,8 @@ my %table=( "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", "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::(unknown)::::", +"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -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:::", "NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:", @@ -287,6 +288,9 @@ my %table=( "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}::", +# UnixWare 7 +"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread:-lsocket -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::", + # IBM's AIX. "aix-cc", "cc:-O -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR:::", "aix-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR:::", @@ -410,7 +414,7 @@ $perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl") my $flags=""; my $depflags=""; -my $openssl_exclude_defines=""; +my $openssl_algorithm_defines=""; my $openssl_thread_defines=""; my $openssl_other_defines=""; my $libs=""; @@ -418,11 +422,12 @@ my $target=""; my $options=""; foreach (@ARGV) { + s /^-no-/no-/; # some people just can't read the instructions if (/^no-asm$/) { $no_asm=1; $flags .= "-DNO_ASM "; - $openssl_exclude_defines .= "#define NO_ASM\n"; + $openssl_other_defines .= "#define NO_ASM\n"; } elsif (/^no-threads$/) { $no_threads=1; } @@ -435,14 +440,14 @@ foreach (@ARGV) $algo =~ tr/[a-z]/[A-Z]/; $flags .= "-DNO_$algo "; $depflags .= "-DNO_$algo "; - $openssl_exclude_defines .= "#define NO_$algo\n"; + $openssl_algorithm_defines .= "#define NO_$algo\n"; if ($algo eq "DES") { push @skip, "mdc2"; $options .= " no-mdc2"; $flags .= "-DNO_MDC2 "; $depflags .= "-DNO_MDC2 "; - $openssl_exclude_defines .= "#define NO_MDC2\n"; + $openssl_algorithm_defines .= "#define NO_MDC2\n"; } } elsif (/^386$/) @@ -507,6 +512,14 @@ if ($target eq "TABLE") { exit 0; } +if ($target eq "LIST") { + foreach (sort keys %table) { + print; + print "\n"; + } + exit 0; +} + &usage if (!defined($table{$target})); my $IsWindows=scalar grep /^$target$/,@WinTargets; @@ -546,14 +559,14 @@ else { $thread_cflags="-DTHREADS $thread_cflag $cflags"; $thread_defines .= "#define THREADS\n"; - my $def; - foreach $def (split ' ',$thread_cflag) - { - if ($def =~ s/^-D//) - { - $thread_defines .= "#define $def\n"; - } - } +# my $def; +# foreach $def (split ' ',$thread_cflag) +# { +# if ($def =~ s/^-D// && $def !~ /^_/) +# { +# $thread_defines .= "#define $def\n"; +# } +# } } $lflags="$libs$lflags"if ($libs ne ""); @@ -727,10 +740,11 @@ print OUT "/* opensslconf.h */\n"; print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n"; print OUT "/* OpenSSL was configured with the following options: */\n"; -$openssl_exclude_defines =~ s/^\s*#\s*define\s+(.*)/# ifndef $1\n# define $1\n# endif/mg; +$openssl_algorithm_defines =~ s/^\s*#\s*define\s+(.*)/# ifndef $1\n# define $1\n# endif/mg; +$openssl_algorithm_defines = " /* no ciphers excluded */\n" if $openssl_algorithm_defines eq ""; $openssl_thread_defines =~ s/^\s*#\s*define\s+(.*)/# ifndef $1\n# define $1\n# endif/mg; $openssl_other_defines =~ s/^\s*#\s*define\s+(.*)/# ifndef $1\n# define $1\n# endif/mg; -print OUT "#ifdef OPENSSL_EXCLUDE_DEFINES\n$openssl_exclude_defines#endif\n"; +print OUT "#ifdef OPENSSL_ALGORITHM_DEFINES\n$openssl_algorithm_defines#endif\n"; print OUT "#ifdef OPENSSL_THREAD_DEFINES\n$openssl_thread_defines#endif\n"; print OUT "#ifdef OPENSSL_OTHER_DEFINES\n$openssl_other_defines#endif\n\n"; @@ -853,9 +867,6 @@ EOF print < to ; -see file INSTALL for hints on coping with compatibility problems. EOF print <<\EOF if (!$no_threads && !$threads); @@ -870,22 +881,33 @@ exit(0); sub usage { print STDERR $usage; - print STDERR "pick os/compiler from:"; + print STDERR "\npick os/compiler from:\n"; my $j=0; my $i; + my $k=0; foreach $i (sort keys %table) { next if $i =~ /^debug/; - print STDERR "\n" if ($j++ % 4) == 0; - printf(STDERR "%-18s ",$i); + $k += length($i) + 1; + if ($k > 78) + { + print STDERR "\n"; + $k=length($i); + } + print STDERR $i . " "; } foreach $i (sort keys %table) { next if $i !~ /^debug/; - print STDERR "\n" if ($j++ % 4) == 0; - printf(STDERR "%-18s ",$i); + $k += length($i) + 1; + if ($k > 78) + { + print STDERR "\n"; + $k=length($i); + } + print STDERR $i . " "; } - print STDERR "\n"; + print STDERR "\n\nNOTE: If in doubt, on Unix-ish systems use './config'.\n"; exit(1); }