config (100928) | config (100936) |
---|---|
1#!/bin/sh 2# 3# OpenSSL config: determine the operating system and run ./Configure 4# 5# "config -h" for usage information. 6# 7# this is a merge of minarch and GuessOS from the Apache Group. 8# Originally written by Tim Hudson <tjh@cryptsoft.com>. --- 367 unchanged lines hidden (view full) --- 376EOF 377;; 378*) options=$options" $i" ;; 379esac 380done 381 382# figure out if gcc is available and if so we use it otherwise 383# we fallback to whatever cc does on the system | 1#!/bin/sh 2# 3# OpenSSL config: determine the operating system and run ./Configure 4# 5# "config -h" for usage information. 6# 7# this is a merge of minarch and GuessOS from the Apache Group. 8# Originally written by Tim Hudson <tjh@cryptsoft.com>. --- 367 unchanged lines hidden (view full) --- 376EOF 377;; 378*) options=$options" $i" ;; 379esac 380done 381 382# figure out if gcc is available and if so we use it otherwise 383# we fallback to whatever cc does on the system |
384GCCVER=`(gcc --version) 2>/dev/null` | 384GCCVER=`(gcc -dumpversion) 2>/dev/null` |
385if [ "$GCCVER" != "" ]; then 386 CC=gcc | 385if [ "$GCCVER" != "" ]; then 386 CC=gcc |
387 # then strip off whatever prefix Cygnus prepends the number with... 388 GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'` | 387 # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion 388 # does give us what we want though, so we use that. We just just the 389 # major and minor version numbers. |
389 # peak single digit before and after first dot, e.g. 2.95.1 gives 29 390 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` 391else 392 CC=cc 393fi | 390 # peak single digit before and after first dot, e.g. 2.95.1 gives 29 391 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` 392else 393 CC=cc 394fi |
394 | 395if [ "$SYSTEM" = "HP-UX" ];then 396 # By default gcc is a ILP32 compiler (with long long == 64). 397 GCC_BITS="32" 398 if [ $GCCVER -ge 30 ]; then 399 # PA64 support only came in with gcc 3.0.x. 400 # We look for the preprocessor symbol __LP64__ indicating 401 # 64bit bit long and pointer. sizeof(int) == 32 on HPUX64. 402 if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then 403 GCC_BITS="64" 404 fi 405 fi 406fi |
395if [ "$SYSTEM" = "SunOS" ]; then 396 # check for WorkShop C, expected output is "cc: blah-blah C x.x" 397 CCVER=`(cc -V 2>&1) 2>/dev/null | \ 398 egrep -e '^cc: .* C [0-9]\.[0-9]' | \ 399 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` 400 CCVER=${CCVER:-0} 401 if [ $CCVER -gt 40 ]; then 402 CC=cc # overrides gcc!!! --- 89 unchanged lines hidden (view full) --- 492 printf ("linux-%sel\n", argv[1]); 493#endif 494 return 0; 495} 496EOF 497 ${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}` 498 rm dummy dummy.c 499 ;; | 407if [ "$SYSTEM" = "SunOS" ]; then 408 # check for WorkShop C, expected output is "cc: blah-blah C x.x" 409 CCVER=`(cc -V 2>&1) 2>/dev/null | \ 410 egrep -e '^cc: .* C [0-9]\.[0-9]' | \ 411 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` 412 CCVER=${CCVER:-0} 413 if [ $CCVER -gt 40 ]; then 414 CC=cc # overrides gcc!!! --- 89 unchanged lines hidden (view full) --- 504 printf ("linux-%sel\n", argv[1]); 505#endif 506 return 0; 507} 508EOF 509 ${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}` 510 rm dummy dummy.c 511 ;; |
512 ppc64-*-linux2) 513 #Use the standard target for PPC architecture until we create a 514 #special one for the 64bit architecture. 515 OUT="linux-ppc" ;; |
|
500 ppc-*-linux2) OUT="linux-ppc" ;; 501 m68k-*-linux*) OUT="linux-m68k" ;; 502 ia64-*-linux?) OUT="linux-ia64" ;; 503 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; 504 ppc-apple-darwin) OUT="darwin-ppc-cc" ;; 505 sparc64-*-linux2) 506 #Before we can uncomment following lines we have to wait at least 507 #till 64-bit glibc for SPARC is operational:-( --- 76 unchanged lines hidden (view full) --- 584 *-*-unixware21*) OUT="unixware-2.1" ;; 585 *-*-UnixWare20*) OUT="unixware-2.0" ;; 586 *-*-UnixWare21*) OUT="unixware-2.1" ;; 587 *-*-Unixware20*) OUT="unixware-2.0" ;; 588 *-*-Unixware21*) OUT="unixware-2.1" ;; 589 BS2000-siemens-sysv4) OUT="BS2000-OSD" ;; 590 RM*-siemens-sysv4) OUT="ReliantUNIX" ;; 591 *-siemens-sysv4) OUT="SINIX" ;; | 516 ppc-*-linux2) OUT="linux-ppc" ;; 517 m68k-*-linux*) OUT="linux-m68k" ;; 518 ia64-*-linux?) OUT="linux-ia64" ;; 519 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; 520 ppc-apple-darwin) OUT="darwin-ppc-cc" ;; 521 sparc64-*-linux2) 522 #Before we can uncomment following lines we have to wait at least 523 #till 64-bit glibc for SPARC is operational:-( --- 76 unchanged lines hidden (view full) --- 600 *-*-unixware21*) OUT="unixware-2.1" ;; 601 *-*-UnixWare20*) OUT="unixware-2.0" ;; 602 *-*-UnixWare21*) OUT="unixware-2.1" ;; 603 *-*-Unixware20*) OUT="unixware-2.0" ;; 604 *-*-Unixware21*) OUT="unixware-2.1" ;; 605 BS2000-siemens-sysv4) OUT="BS2000-OSD" ;; 606 RM*-siemens-sysv4) OUT="ReliantUNIX" ;; 607 *-siemens-sysv4) OUT="SINIX" ;; |
592 *-hpux1*) OUT="hpux-parisc-$CC" 593 options="$options -D_REENTRANT" ;; | 608 *-hpux1*) 609 if [ $CC = "gcc" ]; 610 then 611 if [ $GCC_BITS = "64" ]; then 612 OUT="hpux64-parisc-gcc" 613 else 614 OUT="hpux-parisc-gcc" 615 fi 616 else 617 OUT="hpux-parisc-$CC" 618 fi 619 options="$options -D_REENTRANT" ;; |
594 *-hpux) OUT="hpux-parisc-$CC" ;; 595 # these are all covered by the catchall below 596 # *-aix) OUT="aix-$CC" ;; 597 # *-dgux) OUT="dgux" ;; 598 mips-sony-newsos4) OUT="newsos4-gcc" ;; 599 *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;; 600 *-*-cygwin) OUT="Cygwin" ;; 601 t3e-cray-unicosmk) OUT="cray-t3e" ;; --- 90 unchanged lines hidden --- | 620 *-hpux) OUT="hpux-parisc-$CC" ;; 621 # these are all covered by the catchall below 622 # *-aix) OUT="aix-$CC" ;; 623 # *-dgux) OUT="dgux" ;; 624 mips-sony-newsos4) OUT="newsos4-gcc" ;; 625 *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;; 626 *-*-cygwin) OUT="Cygwin" ;; 627 t3e-cray-unicosmk) OUT="cray-t3e" ;; --- 90 unchanged lines hidden --- |