summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/config')
-rw-r--r--src/lib/libssl/src/config79
1 files changed, 71 insertions, 8 deletions
diff --git a/src/lib/libssl/src/config b/src/lib/libssl/src/config
index 93e2317c3f..f57969bb44 100644
--- a/src/lib/libssl/src/config
+++ b/src/lib/libssl/src/config
@@ -27,6 +27,7 @@ RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
27SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown" 27SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
28VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown" 28VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
29 29
30
30# Now test for ISC and SCO, since it is has a braindamaged uname. 31# Now test for ISC and SCO, since it is has a braindamaged uname.
31# 32#
32# We need to work around FreeBSD 1.1.5.1 33# We need to work around FreeBSD 1.1.5.1
@@ -50,6 +51,8 @@ if [ "x$XREL" != "x" ]; then
50 4.2MP) 51 4.2MP)
51 if [ "x$VERSION" = "x2.1.1" ]; then 52 if [ "x$VERSION" = "x2.1.1" ]; then
52 echo "${MACHINE}-whatever-unixware211"; exit 0 53 echo "${MACHINE}-whatever-unixware211"; exit 0
54 elif [ "x$VERSION" = "x2.1.2" ]; then
55 echo "${MACHINE}-whatever-unixware212"; exit 0
53 else 56 else
54 echo "${MACHINE}-whatever-unixware2"; exit 0 57 echo "${MACHINE}-whatever-unixware2"; exit 0
55 fi 58 fi
@@ -57,6 +60,11 @@ if [ "x$XREL" != "x" ]; then
57 4.2) 60 4.2)
58 echo "whatever-whatever-unixware1"; exit 0 61 echo "whatever-whatever-unixware1"; exit 0
59 ;; 62 ;;
63 5)
64 if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
65 echo "${MACHINE}-sco-unixware7"; exit 0
66 fi
67 ;;
60 esac 68 esac
61 fi 69 fi
62fi 70fi
@@ -187,6 +195,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
187 echo "i860-intel-osf1"; exit 0 195 echo "i860-intel-osf1"; exit 0
188 ;; 196 ;;
189 197
198 Rhapsody:*)
199 echo "ppc-apple-rhapsody"; exit 0
200 ;;
201
190 SunOS:5.*) 202 SunOS:5.*)
191 echo "${MACHINE}-sun-solaris2"; exit 0 203 echo "${MACHINE}-sun-solaris2"; exit 0
192 ;; 204 ;;
@@ -311,7 +323,7 @@ else
311fi 323fi
312 324
313if [ "$SYSTEM" = "SunOS" ]; then 325if [ "$SYSTEM" = "SunOS" ]; then
314 # assume output is "blah-blah C x.x" 326 # check for WorkShop C, expected output is "cc: blah-blah C x.x"
315 CCVER=`(cc -V 2>&1) 2>/dev/null | \ 327 CCVER=`(cc -V 2>&1) 2>/dev/null | \
316 egrep -e '^cc: .* C [0-9]\.[0-9]' | \ 328 egrep -e '^cc: .* C [0-9]\.[0-9]' | \
317 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` 329 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
@@ -328,6 +340,19 @@ if [ "$SYSTEM" = "SunOS" ]; then
328 fi 340 fi
329fi 341fi
330 342
343if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
344 # check for Compaq C, expected output is "blah-blah C Vx.x"
345 CCCVER=`(ccc -V 2>&1) 2>/dev/null | \
346 egrep -e '.* C V[0-9]\.[0-9]' | \
347 sed 's/.* C V\([0-9]\)\.\([0-9]\).*/\1\2/'`
348 CCCVER=${CCCVER:-0}
349 if [ $CCCVER -gt 60 ]; then
350 CC=ccc # overrides gcc!!! well, ccc outperforms inoticeably
351 # only on hash routines and des, otherwise gcc (2.95)
352 # keeps along rather tight...
353 fi
354fi
355
331GCCVER=${GCCVER:-0} 356GCCVER=${GCCVER:-0}
332CCVER=${CCVER:-0} 357CCVER=${CCVER:-0}
333 358
@@ -340,9 +365,6 @@ echo Operating system: $GUESSOS
340# script above so we end up with values in vars but that would take 365# script above so we end up with values in vars but that would take
341# more time that I want to waste at the moment 366# more time that I want to waste at the moment
342case "$GUESSOS" in 367case "$GUESSOS" in
343 alpha-*-linux2) OUT="alpha-gcc" ;;
344 ppc-*-linux2) OUT="linux-ppc" ;;
345 mips-*-linux?) OUT="linux-mips" ;;
346 mips2-sgi-irix) 368 mips2-sgi-irix)
347 CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` 369 CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
348 CPU=${CPU:-0} 370 CPU=${CPU:-0}
@@ -369,6 +391,23 @@ case "$GUESSOS" in
369 options="$options -mips4" 391 options="$options -mips4"
370 OUT="irix-mips3-$CC" 392 OUT="irix-mips3-$CC"
371 ;; 393 ;;
394 alpha-*-linux2)
395 ISA=`awk '/cpu model/{print$4}' /proc/cpuinfo`
396 case ${ISA:-generic} in
397 *[67]) OUT="linux-alpha+bwx-$CC" ;;
398 *) OUT="linux-alpha-$CC" ;;
399 esac
400 if [ "$CC" = "gcc" ]; then
401 case ${ISA:-generic} in
402 EV5|EV45) options="$options -mcpu=ev5";;
403 EV56|PCA56) options="$options -mcpu=ev56";;
404 EV6|EV67|PCA57) options="$options -mcpu=ev6";;
405 esac
406 fi
407 ;;
408 mips-*-linux?) OUT="linux-mips" ;;
409 ppc-*-linux2) OUT="linux-ppc" ;;
410 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
372 sparc64-*-linux2) 411 sparc64-*-linux2)
373 #Before we can uncomment following lines we have to wait at least 412 #Before we can uncomment following lines we have to wait at least
374 #till 64-bit glibc for SPARC is operational:-( 413 #till 64-bit glibc for SPARC is operational:-(
@@ -413,17 +452,30 @@ case "$GUESSOS" in
413 *-*-openbsd) OUT="OpenBSD" ;; 452 *-*-openbsd) OUT="OpenBSD" ;;
414 *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;; 453 *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
415 *-*-osf) OUT="alpha-cc" ;; 454 *-*-osf) OUT="alpha-cc" ;;
416 *-*-unixware*) OUT="unixware-2.0" ;; 455 *-*-unixware7) OUT="unixware-7" ;;
456 *-*-UnixWare7) OUT="unixware-7" ;;
457 *-*-Unixware7) OUT="unixware-7" ;;
458 *-*-unixware[1-2]*) OUT="unixware-2.0" ;;
459 *-*-UnixWare[1-2]*) OUT="unixware-2.0" ;;
460 *-*-Unixware[1-2]*) OUT="unixware-2.0" ;;
417 BS2000-siemens-sysv4) OUT="BS2000-OSD" ;; 461 BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
418 RM*-siemens-sysv4) OUT="ReliantUNIX" ;; 462 RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
419 *-siemens-sysv4) OUT="SINIX" ;; 463 *-siemens-sysv4) OUT="SINIX" ;;
464 *-hpux1*) OUT="hpux-parisc-$CC"
465 options="$options -D_REENTRANT" ;;
466 *-hpux) OUT="hpux-parisc-$CC" ;;
420 # these are all covered by the catchall below 467 # these are all covered by the catchall below
421 # *-hpux*) OUT="hpux-$CC" ;;
422 # *-aix) OUT="aix-$CC" ;; 468 # *-aix) OUT="aix-$CC" ;;
423 # *-dgux) OUT="dgux" ;; 469 # *-dgux) OUT="dgux" ;;
424 *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;; 470 *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
425esac 471esac
426 472
473# See whether we can compile Atalla support
474if [ -f /usr/include/atasi.h ]
475then
476 options="$options -DATALLA"
477fi
478
427# gcc < 2.8 does not support -mcpu=ultrasparc 479# gcc < 2.8 does not support -mcpu=ultrasparc
428if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] 480if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
429then 481then
@@ -438,6 +490,17 @@ then
438 sleep 5 490 sleep 5
439 OUT=linux-sparcv8 491 OUT=linux-sparcv8
440fi 492fi
493# To start with $OUT is never i86pc-sun-solaris2. Secondly why
494# ban *all* assembler implementation if it can't stand only one,
495# SHA-0 implementation.
496#if [ "$OUT" = "i86pc-sun-solaris2" ]
497#then
498# ASM=`as -V /dev/null 2>&1`
499# case "$ASM" in
500# GNU*) ;;
501# *) options="$options no-asm" ; echo "WARNING: You need the GNU assembler to use OpenSSL assembler code." ; echo "Sun as is not supported on Solaris x86." ;;
502# esac
503#fi
441 504
442case "$GUESSOS" in 505case "$GUESSOS" in
443 i386-*) options="$options 386" ;; 506 i386-*) options="$options 386" ;;
@@ -484,14 +547,14 @@ fi
484# compiler for the platform ... in which case we add it on 547# compiler for the platform ... in which case we add it on
485# the end ... otherwise we leave it off 548# the end ... otherwise we leave it off
486 549
487$PERL ./Configure 2>&1 | grep "$OUT-$CC" > /dev/null 550$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null
488if [ $? = "0" ]; then 551if [ $? = "0" ]; then
489 OUT="$OUT-$CC" 552 OUT="$OUT-$CC"
490fi 553fi
491 554
492OUT="$PREFIX$OUT" 555OUT="$PREFIX$OUT"
493 556
494$PERL ./Configure 2>&1 | grep "$OUT" > /dev/null 557$PERL ./Configure LIST | grep "$OUT" > /dev/null
495if [ $? = "0" ]; then 558if [ $? = "0" ]; then
496 echo Configuring for $OUT 559 echo Configuring for $OUT
497 560