head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.24
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.22
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.20
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.18
	pgoyette-compat-base:1.2
	perseant-stdc-iso10646:1.2.0.16
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.14
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	bouyer-socketcan:1.2.0.12
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	pgoyette-localcount-20161104:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.10
	pgoyette-localcount-base:1.2
	netbsd-5-2-3-RELEASE:1.1.1.16
	netbsd-5-1-5-RELEASE:1.1.1.16
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.2
	tls-earlyentropy:1.2.0.6
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-5-2-2-RELEASE:1.1.1.16
	netbsd-5-1-4-RELEASE:1.1.1.16
	netbsd-5-2-1-RELEASE:1.1.1.16
	netbsd-5-1-3-RELEASE:1.1.1.16
	agc-symver:1.2.0.8
	agc-symver-base:1.2
	tls-maxphys-base:1.2
	yamt-pagecache-base8:1.2
	netbsd-5-2:1.1.1.16.0.2
	yamt-pagecache-base7:1.2
	netbsd-5-2-RELEASE:1.1.1.16
	netbsd-5-2-RC1:1.1.1.16
	yamt-pagecache-base6:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-5-1-2-RELEASE:1.1.1.16
	netbsd-5-1-1-RELEASE:1.1.1.16
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.4
	yamt-pagecache-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.2
	bouyer-quota2-base:1.2
	matt-nb5-mips64-premerge-20101231:1.1.1.16
	matt-nb5-pq3:1.1.1.16.0.14
	matt-nb5-pq3-base:1.1.1.16
	netbsd-5-1:1.1.1.16.0.12
	netbsd-5-1-RELEASE:1.1.1.16
	netbsd-5-1-RC4:1.1.1.16
	matt-nb5-mips64-k15:1.1.1.16
	netbsd-5-1-RC3:1.1.1.16
	netbsd-5-1-RC2:1.1.1.16
	netbsd-5-1-RC1:1.1.1.16
	netbsd-5-0-2-RELEASE:1.1.1.16
	matt-nb5-mips64-premerge-20091211:1.1.1.16
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.1.1.16
	matt-nb4-mips64-k7-u2a-k9b:1.1.1.16
	matt-nb5-mips64-u1-k1-k5:1.1.1.16
	matt-nb5-mips64:1.1.1.16.0.10
	netbsd-5-0-1-RELEASE:1.1.1.16
	jym-xensuspend-nbase:1.1.1.16
	netbsd-5-0:1.1.1.16.0.8
	netbsd-5-0-RELEASE:1.1.1.16
	netbsd-5-0-RC4:1.1.1.16
	netbsd-5-0-RC3:1.1.1.16
	netbsd-5-0-RC2:1.1.1.16
	jym-xensuspend:1.1.1.16.0.6
	jym-xensuspend-base:1.1.1.16
	netbsd-5-0-RC1:1.1.1.16
	netbsd-5:1.1.1.16.0.4
	netbsd-5-base:1.1.1.16
	matt-mips64-base2:1.1.1.16
	matt-mips64:1.1.1.15.0.14
	netbsd-4-0-1-RELEASE:1.1.1.14.2.1
	wrstuden-revivesa-base-3:1.1.1.16
	wrstuden-revivesa-base-2:1.1.1.16
	wrstuden-fixsa-newbase:1.1.1.14.2.1
	wrstuden-revivesa-base-1:1.1.1.16
	yamt-pf42-base4:1.1.1.16
	yamt-pf42-base3:1.1.1.16
	hpcarm-cleanup-nbase:1.1.1.16
	yamt-pf42-baseX:1.1.1.15
	yamt-pf42-base2:1.1.1.16
	OPENSSL_SNAP_20080509:1.1.1.16
	wrstuden-revivesa:1.1.1.15.0.12
	wrstuden-revivesa-base:1.1.1.16
	yamt-pf42:1.1.1.15.0.10
	yamt-pf42-base:1.1.1.15
	keiichi-mipv6:1.1.1.15.0.8
	keiichi-mipv6-base:1.1.1.15
	matt-armv6-nbase:1.1.1.15
	matt-armv6-prevmlocking:1.1.1.15
	wrstuden-fixsa-base-1:1.1.1.14.2.1
	netbsd-4-0:1.1.1.14.2.1.0.2
	netbsd-4-0-RELEASE:1.1.1.14.2.1
	cube-autoconf:1.1.1.15.0.6
	cube-autoconf-base:1.1.1.15
	netbsd-4-0-RC5:1.1.1.14.2.1
	netbsd-4-0-RC4:1.1.1.14.2.1
	netbsd-4-0-RC3:1.1.1.14.2.1
	netbsd-4-0-RC2:1.1.1.14.2.1
	netbsd-4-0-RC1:1.1.1.14.2.1
	matt-armv6:1.1.1.15.0.4
	matt-armv6-base:1.1.1.15
	matt-mips64-base:1.1.1.15
	hpcarm-cleanup:1.1.1.15.0.2
	hpcarm-cleanup-base:1.1.1.15
	netbsd-3-1-1-RELEASE:1.1.1.9
	netbsd-3-0-3-RELEASE:1.1.1.9
	wrstuden-fixsa:1.1.1.14.0.4
	wrstuden-fixsa-base:1.1.1.14.2.1
	openssl_0_9_8e:1.1.1.15
	abandoned-netbsd-4-base:1.1.1.13
	abandoned-netbsd-4:1.1.1.13.0.2
	openssl_0_9_8d:1.1.1.14
	netbsd-3-1:1.1.1.9.0.12
	netbsd-3-1-RELEASE:1.1.1.9
	netbsd-3-0-2-RELEASE:1.1.1.9
	netbsd-3-1-RC4:1.1.1.9
	netbsd-3-1-RC3:1.1.1.9
	netbsd-3-1-RC2:1.1.1.9
	netbsd-3-1-RC1:1.1.1.9
	netbsd-4:1.1.1.14.0.2
	netbsd-4-base:1.1.1.14
	netbsd-3-0-1-RELEASE:1.1.1.9
	openssl_0_9_8b:1.1.1.13
	netbsd-3-0:1.1.1.9.0.10
	netbsd-3-0-RELEASE:1.1.1.9
	netbsd-3-0-RC6:1.1.1.9
	netbsd-3-0-RC5:1.1.1.9
	netbsd-3-0-RC4:1.1.1.9
	openssl_0_9_8a:1.1.1.12
	netbsd-3-0-RC3:1.1.1.9
	netbsd-3-0-RC2:1.1.1.9
	netbsd-3-0-RC1:1.1.1.9
	netbsd-2-0-3-RELEASE:1.1.1.9
	netbsd-2-1:1.1.1.9.0.8
	netbsd-2-1-RELEASE:1.1.1.9
	netbsd-2-1-RC6:1.1.1.9
	netbsd-2-1-RC5:1.1.1.9
	netbsd-2-1-RC4:1.1.1.9
	netbsd-2-1-RC3:1.1.1.9
	netbsd-2-1-RC2:1.1.1.9
	netbsd-2-1-RC1:1.1.1.9
	openssl_0_9_7g:1.1.1.11
	openssl_0_9_7f:1.1.1.10
	netbsd-2-0-2-RELEASE:1.1.1.9
	netbsd-3:1.1.1.9.0.6
	netbsd-3-base:1.1.1.9
	netbsd-2-0-1-RELEASE:1.1.1.9
	netbsd-2:1.1.1.9.0.4
	netbsd-2-base:1.1.1.9
	netbsd-2-0-RELEASE:1.1.1.9
	netbsd-2-0-RC5:1.1.1.9
	netbsd-2-0-RC4:1.1.1.9
	netbsd-2-0-RC3:1.1.1.9
	netbsd-2-0-RC2:1.1.1.9
	netbsd-2-0-RC1:1.1.1.9
	netbsd-2-0:1.1.1.9.0.2
	netbsd-2-0-base:1.1.1.9
	openssl_0_9_7d:1.1.1.9
	netbsd-1-6-PATCH002-RELEASE:1.1.1.3.2.3
	netbsd-1-6-PATCH002:1.1.1.3.2.3
	netbsd-1-6-PATCH002-RC4:1.1.1.3.2.3
	netbsd-1-6-PATCH002-RC3:1.1.1.3.2.3
	netbsd-1-6-PATCH002-RC2:1.1.1.3.2.3
	openssl_0_9_7c:1.1.1.8
	netbsd-1-6-PATCH002-RC1:1.1.1.3.2.3
	openssl_0_9_7b:1.1.1.8
	netbsd-1-6-PATCH001:1.1.1.3.2.3
	netbsd-1-6-PATCH001-RELEASE:1.1.1.3.2.3
	netbsd-1-6-PATCH001-RC3:1.1.1.3.2.3
	netbsd-1-6-PATCH001-RC2:1.1.1.3.2.3
	netbsd-1-6-PATCH001-RC1:1.1.1.3.2.3
	fvdl_fs64_base:1.1.1.7
	netbsd-1-6-RELEASE:1.1.1.3.2.3
	netbsd-1-6-RC3:1.1.1.3.2.3
	netbsd-1-6-RC2:1.1.1.3.2.3
	netbsd-1-6-RC1:1.1.1.3.2.3
	openssl_0_9_6g:1.1.1.7
	openssl_0_9_6f:1.1.1.6
	openssl_0_9_6e:1.1.1.5
	openssl_0_9_6d:1.1.1.4
	netbsd-1-6:1.1.1.3.0.2
	netbsd-1-6-base:1.1.1.3
	netbsd-1-5-PATCH003:1.1.1.1.2.1
	netbsd-1-5-PATCH002:1.1.1.1.2.1
	openssl_0_9_6b:1.1.1.3
	netbsd-1-5-PATCH001:1.1.1.1.2.1
	openssl_0_9_6a:1.1.1.3
	netbsd-1-5-RELEASE:1.1.1.1.2.1
	netbsd-1-5-BETA2:1.1.1.1.2.1
	netbsd-1-5-BETA:1.1.1.1.2.1
	netbsd-1-5-ALPHA2:1.1.1.1.2.1
	mrg-post-merge-openssl_0_9_5a:1.1.1.2
	openssl_0_9_5a:1.1.1.2
	minoura-xpg4dl:1.1.1.1.0.4
	minoura-xpg4dl-base:1.1.1.1
	netbsd-1-5:1.1.1.1.0.2
	netbsd-1-5-base:1.1.1.1
	openssl_0_9_4-netbsd-cryptosrc-intl:1.1.1.1
	OPENSSL:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2009.07.20.22.55.48;	author christos;	state dead;
branches;
next	1.1;

1.1
date	2000.06.14.22.44.19;	author thorpej;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.06.14.22.44.19;	author thorpej;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.4.1;
next	1.1.1.2;

1.1.1.2
date	2000.07.16.05.03.56;	author mrg;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2001.04.12.03.06.04;	author itojun;	state Exp;
branches
	1.1.1.3.2.1;
next	1.1.1.4;

1.1.1.4
date	2002.06.09.15.21.32;	author itojun;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2002.07.30.23.57.46;	author itojun;	state Exp;
branches;
next	1.1.1.6;

1.1.1.6
date	2002.08.08.23.14.54;	author itojun;	state Exp;
branches;
next	1.1.1.7;

1.1.1.7
date	2002.08.09.15.45.08;	author itojun;	state Exp;
branches;
next	1.1.1.8;

1.1.1.8
date	2003.07.24.08.25.41;	author itojun;	state Exp;
branches;
next	1.1.1.9;

1.1.1.9
date	2004.03.20.04.22.04;	author groo;	state Exp;
branches;
next	1.1.1.10;

1.1.1.10
date	2005.03.25.19.05.52;	author christos;	state Exp;
branches;
next	1.1.1.11;

1.1.1.11
date	2005.04.23.19.10.57;	author christos;	state Exp;
branches;
next	1.1.1.12;

1.1.1.12
date	2005.11.25.03.02.57;	author christos;	state Exp;
branches;
next	1.1.1.13;

1.1.1.13
date	2006.06.03.01.39.49;	author christos;	state Exp;
branches;
next	1.1.1.14;

1.1.1.14
date	2006.11.13.21.16.04;	author christos;	state Exp;
branches
	1.1.1.14.2.1
	1.1.1.14.4.1;
next	1.1.1.15;

1.1.1.15
date	2007.03.06.21.12.00;	author mjf;	state Exp;
branches
	1.1.1.15.10.1
	1.1.1.15.12.1;
next	1.1.1.16;

1.1.1.16
date	2008.05.09.21.34.05;	author christos;	state Exp;
branches;
next	;

1.1.1.1.2.1
date	2000.07.17.05.57.48;	author mrg;	state Exp;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2002.08.29.16.53.00;	author he;	state Exp;
branches;
next	;

1.1.1.1.4.1
date	2000.06.14.22.44.19;	author thorpej;	state dead;
branches;
next	1.1.1.1.4.2;

1.1.1.1.4.2
date	2000.06.14.22.44.20;	author thorpej;	state Exp;
branches;
next	;

1.1.1.3.2.1
date	2002.08.02.11.59.27;	author lukem;	state Exp;
branches;
next	1.1.1.3.2.2;

1.1.1.3.2.2
date	2002.08.09.23.33.56;	author lukem;	state Exp;
branches;
next	1.1.1.3.2.3;

1.1.1.3.2.3
date	2002.08.09.23.48.03;	author lukem;	state Exp;
branches;
next	;

1.1.1.14.2.1
date	2007.08.25.17.52.23;	author liamjfoy;	state Exp;
branches;
next	;

1.1.1.14.4.1
date	2007.09.03.06.51.30;	author wrstuden;	state Exp;
branches;
next	;

1.1.1.15.10.1
date	2008.05.18.12.28.49;	author yamt;	state Exp;
branches;
next	;

1.1.1.15.12.1
date	2008.06.23.04.26.47;	author wrstuden;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Don't lets this linger around forever. Causes hidden bugs.
@
text
@#!/bin/sh
#
# OpenSSL config: determine the operating system and run ./Configure
#
# "config -h" for usage information.
#
#          this is a merge of minarch and GuessOS from the Apache Group.
#          Originally written by Tim Hudson <tjh@@cryptsoft.com>.

# Original Apache Group comments on GuessOS

# Simple OS/Platform guesser. Similar to config.guess but
# much, much smaller. Since it was developed for use with
# Apache, it follows under Apache's regular licensing
# with one specific addition: Any changes or additions
# to this script should be Emailed to the Apache
# group (apache@@apache.org) in general and to
# Jim Jagielski (jim@@jaguNET.com) in specific.
#
# Be as similar to the output of config.guess/config.sub
# as possible.

# First get uname entries that we use below

MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
SYSTEM=`(uname -s) 2>/dev/null`  || SYSTEM="unknown"
VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"

# Now test for ISC and SCO, since it is has a braindamaged uname.
#
# We need to work around FreeBSD 1.1.5.1 
(
XREL=`uname -X 2>/dev/null | grep "^Release" | awk '{print $3}'`
if [ "x$XREL" != "x" ]; then
    if [ -f /etc/kconfig ]; then
	case "$XREL" in
	    4.0|4.1)
		    echo "${MACHINE}-whatever-isc4"; exit 0
		;;
	esac
    else
	case "$XREL" in
	    3.2v4.2)
		echo "whatever-whatever-sco3"; exit 0
		;;
	    3.2v5.0*)
		echo "whatever-whatever-sco5"; exit 0
		;;
	    4.2MP)
		if [ "x$VERSION" = "x2.1.1" ]; then
		    echo "${MACHINE}-whatever-unixware211"; exit 0
		else
		    echo "${MACHINE}-whatever-unixware2"; exit 0
		fi
		;;
	    4.2)
		echo "whatever-whatever-unixware1"; exit 0
		;;
	esac
    fi
fi
# Now we simply scan though... In most cases, the SYSTEM info is enough
#
case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
    A/UX:*)
	echo "m68k-apple-aux3"; exit 0
	;;

    AIX:*)
	echo "${MACHINE}-ibm-aix"; exit 0
	;;

    dgux:*)
	echo "${MACHINE}-dg-dgux"; exit 0
	;;

    HI-UX:*)
	echo "${MACHINE}-hi-hiux"; exit 0
	;;

    HP-UX:*)
	HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	case "$HPUXVER" in
	    11.*)
		echo "${MACHINE}-hp-hpux11"; exit 0
		;;
	    10.*)
		echo "${MACHINE}-hp-hpux10"; exit 0
		;;
	    *)
		echo "${MACHINE}-hp-hpux"; exit 0
		;;
	esac
	;;

    IRIX:5.*)
	echo "mips2-sgi-irix"; exit 0
	;;

    IRIX:6.*)
	echo "mips3-sgi-irix"; exit 0
	;;

    IRIX64:*)
	echo "mips4-sgi-irix64"; exit 0
	;;

    Linux:[2-9].*)
	echo "${MACHINE}-whatever-linux2"; exit 0
	;;

    Linux:1.*)
	echo "${MACHINE}-whatever-linux1"; exit 0
	;;

    LynxOS:*)
	echo "${MACHINE}-lynx-lynxos"; exit 0
	;;

    BSD/OS:4.*)  # BSD/OS always says 386
	echo "i486-whatever-bsdi4"; exit 0
	;;

    BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*)
        case `/sbin/sysctl -n hw.model` in
	    Pentium*)
                echo "i586-whatever-bsdi"; exit 0
                ;;
            *)
                echo "i386-whatever-bsdi"; exit 0
                ;;
            esac;
	;;

    BSD/386:*|BSD/OS:*)
	echo "${MACHINE}-whatever-bsdi"; exit 0
	;;

    FreeBSD:*)
        VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
        MACH=`sysctl -n hw.model`
        ARCH='whatever'
        case ${MACH} in
           *386*       ) MACH="i386"     ;;
           *486*       ) MACH="i486"     ;;
           Pentium\ II*) MACH="i686"     ;;
           Pentium*    ) MACH="i586"     ;;
           Alpha*      ) MACH="alpha"    ;;
           *           ) MACH="$MACHINE" ;;
        esac
        case ${MACH} in
           i[0-9]86 ) ARCH="pc" ;;
        esac
        echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
        ;;

    NetBSD:*:*:*386*)
        echo "`sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whateve\r-netbsd"; exit 0
	;;

    NetBSD:*)
	echo "${MACHINE}-whatever-netbsd"; exit 0
	;;

    OpenBSD:*)
	echo "${MACHINE}-whatever-openbsd"; exit 0
	;;

    OSF1:*:*:*alpha*)
	echo "${MACHINE}-dec-osf"; exit 0
	;;

    QNX:*)
	case "$VERSION" in
	    423)
		echo "${MACHINE}-qssl-qnx32"
		;;
	    *)
		echo "${MACHINE}-qssl-qnx"
		;;
	esac
	exit 0
	;;

    Paragon*:*:*:*)
	echo "i860-intel-osf1"; exit 0
	;;

    SunOS:5.*)
	echo "${MACHINE}-sun-solaris2"; exit 0
	;;

    SunOS:*)
	echo "${MACHINE}-sun-sunos4"; exit 0
	;;

    UNIX_System_V:4.*:*)
	echo "${MACHINE}-whatever-sysv4"; exit 0
	;;

    *:4*:R4*:m88k)
	echo "${MACHINE}-whatever-sysv4"; exit 0
	;;

    DYNIX/ptx:4*:*)
	echo "${MACHINE}-whatever-sysv4"; exit 0
	;;

    *:4.0:3.0:3[34]?? | *:4.0:3.0:3[34]??,*)
	echo "i486-ncr-sysv4"; exit 0
	;;

    ULTRIX:*)
	echo "${MACHINE}-unknown-ultrix"; exit 0
	;;

    SINIX*|ReliantUNIX*)
	echo "${MACHINE}-siemens-sysv4"; exit 0
	;;

    POSIX-BC*)
	echo "${MACHINE}-siemens-sysv4"; exit 0   # Here, $MACHINE == "BS2000"
	;;

    machten:*)
       echo "${MACHINE}-tenon-${SYSTEM}"; exit 0;
       ;;

    library:*)
	echo "${MACHINE}-ncr-sysv4"; exit 0
	;;

    ConvexOS:*:11.0:*)
	echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
	;;

esac

#
# Ugg. These are all we can determine by what we know about
# the output of uname. Be more creative:
#

# Do the Apollo stuff first. Here, we just simply assume
# that the existance of the /usr/apollo directory is proof
# enough
if [ -d /usr/apollo ]; then
    echo "whatever-apollo-whatever"
    exit 0
fi

# Now NeXT
ISNEXT=`hostinfo 2>/dev/null`
case "$ISNEXT" in
    *'NeXT Mach 3.3'*)
	echo "whatever-next-nextstep3.3"; exit 0
	;;
    *NeXT*)
	echo "whatever-next-nextstep"; exit 0
	;;
esac

# At this point we gone through all the one's
# we know of: Punt

echo "${MACHINE}-whatever-${SYSTEM}" 
exit 0
) 2>/dev/null | (

# ---------------------------------------------------------------------------
# this is where the translation occurs into SSLeay terms
# ---------------------------------------------------------------------------

PREFIX=""
SUFFIX=""
TEST="false"

# pick up any command line args to config
for i
do
case "$i" in 
-d*) PREFIX="debug-";;
-t*) TEST="true";;
-h*) TEST="true"; cat <<EOF
Usage: config [options]
 -d	Add a debug- prefix to machine choice.
 -t	Test mode, do not run the Configure perl script.
 -h	This help.

Any other text will be passed to the Configure perl script.
See INSTALL for instructions.

EOF
;;
*) options=$options" $i" ;;
esac
done

# figure out if gcc is available and if so we use it otherwise
# we fallback to whatever cc does on the system
GCCVER=`(gcc --version) 2>/dev/null`
if [ "$GCCVER" != "" ]; then
  CC=gcc
  # then strip off whatever prefix Cygnus prepends the number with...
  GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'`
  # peak single digit before and after first dot, e.g. 2.95.1 gives 29
  GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
else
  CC=cc
fi

if [ "$SYSTEM" = "SunOS" ]; then
  # assume output is "blah-blah C x.x"
  CCVER=`(cc -V 2>&1) 2>/dev/null | \
  	egrep -e '^cc: .* C [0-9]\.[0-9]' | \
	sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
  CCVER=${CCVER:-0}
  if [ $CCVER -gt 40 ]; then
    CC=cc	# overrides gcc!!!
    if [ $CCVER -eq 50 ]; then
      echo "WARNING! Detected WorkShop C 5.0. Do make sure you have"
      echo "         patch #107357-01 or later applied."
      sleep 5
    fi
  elif [ "$CC" = "cc" -a $CCVER -gt 0 ]; then
    CC=sc3
  fi
fi

GCCVER=${GCCVER:-0}
CCVER=${CCVER:-0}

# read the output of the embedded GuessOS 
read GUESSOS

echo Operating system: $GUESSOS

# now map the output into SSLeay terms ... really should hack into the
# script above so we end up with values in vars but that would take
# more time that I want to waste at the moment
case "$GUESSOS" in
  alpha-*-linux2) OUT="alpha-gcc" ;;
  ppc-*-linux2) OUT="linux-ppc" ;;
  mips-*-linux?) OUT="linux-mips" ;;
  mips2-sgi-irix)
	CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
	CPU=${CPU:-0}
	if [ $CPU -ge 4000 ]; then
		options="$options -mips2"
	fi
	OUT="irix-$CC"
	;;
  mips3-sgi-irix)
	CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
	CPU=${CPU:-0}
	if [ $CPU -ge 5000 ]; then
		options="$options -mips4"
	else
		options="$options -mips3"
	fi
	OUT="irix-mips3-$CC"
	;;
  mips4-sgi-irix64)
	echo "WARNING! If you wish to build 64-bit library, then you have to"
	echo "         invoke './Configre irix64-mips4-$CC' *manually*."
	echo "         Type Ctrl-C if you don't want to continue."
	read waste < /dev/tty
	options="$options -mips4"
	OUT="irix-mips3-$CC"
	;;
  sparc64-*-linux2)
	#Before we can uncomment following lines we have to wait at least
	#till 64-bit glibc for SPARC is operational:-(
	#echo "WARNING! If you wish to build 64-bit library, then you have to"
	#echo "         invoke './Configure linux64-sparcv9' *manually*."
	#echo "         Type Ctrl-C if you don't want to continue."
	#read waste < /dev/tty
	OUT="linux-sparcv9" ;;
  sparc-*-linux2)
	KARCH=`awk '/type/{print$3}' /proc/cpuinfo`
	case ${KARCH:-sun4} in
	sun4u*)	OUT="linux-sparcv9" ;;
	sun4m)	OUT="linux-sparcv8" ;;
	sun4d)	OUT="linux-sparcv8" ;;
	*)	OUT="linux-sparcv7" ;;
	esac ;;
  *-*-linux2) OUT="linux-elf" ;;
  *-*-linux1) OUT="linux-aout" ;;
  sun4u*-sun-solaris2)
	ISA64=`(isalist) 2>/dev/null | grep sparcv9`
	if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then
		echo "WARNING! If you wish to build 64-bit library, then you have to"
		echo "         invoke './Configure solaris64-sparcv9-cc' *manually*."
		echo "         Type Ctrl-C if you don't want to continue."
		read waste < /dev/tty
	fi
	OUT="solaris-sparcv9-$CC" ;;
  sun4m-sun-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4d-sun-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4*-sun-solaris2)	OUT="solaris-sparcv7-$CC" ;;
  *86*-sun-solaris2) OUT="solaris-x86-$CC" ;;
  *-*-sunos4) OUT="sunos-$CC" ;;
  alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
  *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
  *-freebsd[1-2]*) OUT="FreeBSD" ;;
  *86*-*-netbsd) OUT="NetBSD-x86" ;;
  sun3*-*-netbsd) OUT="NetBSD-m68" ;;
  *-*-netbsd) OUT="NetBSD-sparc" ;;
  *86*-*-openbsd) OUT="OpenBSD-x86" ;;
  alpha*-*-openbsd) OUT="OpenBSD-alpha" ;;
  pmax*-*-openbsd) OUT="OpenBSD-mips" ;;
  *-*-openbsd) OUT="OpenBSD" ;;
  *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
  *-*-osf) OUT="alpha-cc" ;;
  *-*-unixware*) OUT="unixware-2.0" ;;
  BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
  RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
  *-siemens-sysv4) OUT="SINIX" ;;
  # these are all covered by the catchall below
  # *-hpux*) OUT="hpux-$CC" ;;
  # *-aix) OUT="aix-$CC" ;;
  # *-dgux) OUT="dgux" ;;
  *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
esac

# gcc < 2.8 does not support -mcpu=ultrasparc
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
then
  echo "WARNING! Do consider upgrading to gcc-2.8 or later."
  sleep 5
  OUT=solaris-sparcv9-gcc27
fi
if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
then
  echo "WARNING! Falling down to 'linux-sparcv8'."
  echo "         Upgrade to gcc-2.8 or later."
  sleep 5
  OUT=linux-sparcv8
fi

case "$GUESSOS" in
  i386-*) options="$options 386" ;;
esac

for i in bf cast des dh dsa hmac md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
do
  if [ ! -d crypto/$i ]
  then
    options="$options no-$i"
  fi
done

if [ -z "$OUT" ]; then
  OUT="$CC"
fi

if [ ".$PERL" = . ] ; then
	for i in . `echo $PATH | sed 's/:/ /g'`; do
		if [ -f "$i/perl5" ] ; then
			PERL="$i/perl5"
			break;
		fi;
	done
fi

if [ ".$PERL" = . ] ; then
	for i in . `echo $PATH | sed 's/:/ /g'`; do
		if [ -f "$i/perl" ] ; then
			if "$i/perl" -e 'exit($]<5.0)'; then
				PERL="$i/perl"
				break;
			fi;
		fi;
	done
fi

if [ ".$PERL" = . ] ; then
	echo "You need Perl 5."
	exit 1
fi

# run Configure to check to see if we need to specify the 
# compiler for the platform ... in which case we add it on
# the end ... otherwise we leave it off

$PERL ./Configure 2>&1 | grep "$OUT-$CC" > /dev/null
if [ $? = "0" ]; then
  OUT="$OUT-$CC"
fi

OUT="$PREFIX$OUT"

$PERL ./Configure 2>&1 | grep "$OUT" > /dev/null
if [ $? = "0" ]; then
  echo Configuring for $OUT

  if [ "$TEST" = "true" ]; then
    echo $PERL ./Configure $OUT $options
  else
    $PERL ./Configure $OUT $options
  fi
else
  echo "This system ($OUT) is not supported. See file INSTALL for details."
fi
)
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import OpenSSL 0.9.4 from netbsd-cryptosrc-intl.
@
text
@@


1.1.1.1.4.1
log
@file config was added on branch minoura-xpg4dl on 2000-06-14 22:44:20 +0000
@
text
@d1 506
@


1.1.1.1.4.2
log
@Import OpenSSL 0.9.4 from netbsd-cryptosrc-intl.
@
text
@a0 506
#!/bin/sh
#
# OpenSSL config: determine the operating system and run ./Configure
#
# "config -h" for usage information.
#
#          this is a merge of minarch and GuessOS from the Apache Group.
#          Originally written by Tim Hudson <tjh@@cryptsoft.com>.

# Original Apache Group comments on GuessOS

# Simple OS/Platform guesser. Similar to config.guess but
# much, much smaller. Since it was developed for use with
# Apache, it follows under Apache's regular licensing
# with one specific addition: Any changes or additions
# to this script should be Emailed to the Apache
# group (apache@@apache.org) in general and to
# Jim Jagielski (jim@@jaguNET.com) in specific.
#
# Be as similar to the output of config.guess/config.sub
# as possible.

# First get uname entries that we use below

MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
SYSTEM=`(uname -s) 2>/dev/null`  || SYSTEM="unknown"
VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"

# Now test for ISC and SCO, since it is has a braindamaged uname.
#
# We need to work around FreeBSD 1.1.5.1 
(
XREL=`uname -X 2>/dev/null | grep "^Release" | awk '{print $3}'`
if [ "x$XREL" != "x" ]; then
    if [ -f /etc/kconfig ]; then
	case "$XREL" in
	    4.0|4.1)
		    echo "${MACHINE}-whatever-isc4"; exit 0
		;;
	esac
    else
	case "$XREL" in
	    3.2v4.2)
		echo "whatever-whatever-sco3"; exit 0
		;;
	    3.2v5.0*)
		echo "whatever-whatever-sco5"; exit 0
		;;
	    4.2MP)
		if [ "x$VERSION" = "x2.1.1" ]; then
		    echo "${MACHINE}-whatever-unixware211"; exit 0
		else
		    echo "${MACHINE}-whatever-unixware2"; exit 0
		fi
		;;
	    4.2)
		echo "whatever-whatever-unixware1"; exit 0
		;;
	esac
    fi
fi
# Now we simply scan though... In most cases, the SYSTEM info is enough
#
case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
    A/UX:*)
	echo "m68k-apple-aux3"; exit 0
	;;

    AIX:*)
	echo "${MACHINE}-ibm-aix"; exit 0
	;;

    dgux:*)
	echo "${MACHINE}-dg-dgux"; exit 0
	;;

    HI-UX:*)
	echo "${MACHINE}-hi-hiux"; exit 0
	;;

    HP-UX:*)
	HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	case "$HPUXVER" in
	    11.*)
		echo "${MACHINE}-hp-hpux11"; exit 0
		;;
	    10.*)
		echo "${MACHINE}-hp-hpux10"; exit 0
		;;
	    *)
		echo "${MACHINE}-hp-hpux"; exit 0
		;;
	esac
	;;

    IRIX:5.*)
	echo "mips2-sgi-irix"; exit 0
	;;

    IRIX:6.*)
	echo "mips3-sgi-irix"; exit 0
	;;

    IRIX64:*)
	echo "mips4-sgi-irix64"; exit 0
	;;

    Linux:[2-9].*)
	echo "${MACHINE}-whatever-linux2"; exit 0
	;;

    Linux:1.*)
	echo "${MACHINE}-whatever-linux1"; exit 0
	;;

    LynxOS:*)
	echo "${MACHINE}-lynx-lynxos"; exit 0
	;;

    BSD/OS:4.*)  # BSD/OS always says 386
	echo "i486-whatever-bsdi4"; exit 0
	;;

    BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*)
        case `/sbin/sysctl -n hw.model` in
	    Pentium*)
                echo "i586-whatever-bsdi"; exit 0
                ;;
            *)
                echo "i386-whatever-bsdi"; exit 0
                ;;
            esac;
	;;

    BSD/386:*|BSD/OS:*)
	echo "${MACHINE}-whatever-bsdi"; exit 0
	;;

    FreeBSD:*)
        VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
        MACH=`sysctl -n hw.model`
        ARCH='whatever'
        case ${MACH} in
           *386*       ) MACH="i386"     ;;
           *486*       ) MACH="i486"     ;;
           Pentium\ II*) MACH="i686"     ;;
           Pentium*    ) MACH="i586"     ;;
           Alpha*      ) MACH="alpha"    ;;
           *           ) MACH="$MACHINE" ;;
        esac
        case ${MACH} in
           i[0-9]86 ) ARCH="pc" ;;
        esac
        echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
        ;;

    NetBSD:*:*:*386*)
        echo "`sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whateve\r-netbsd"; exit 0
	;;

    NetBSD:*)
	echo "${MACHINE}-whatever-netbsd"; exit 0
	;;

    OpenBSD:*)
	echo "${MACHINE}-whatever-openbsd"; exit 0
	;;

    OSF1:*:*:*alpha*)
	echo "${MACHINE}-dec-osf"; exit 0
	;;

    QNX:*)
	case "$VERSION" in
	    423)
		echo "${MACHINE}-qssl-qnx32"
		;;
	    *)
		echo "${MACHINE}-qssl-qnx"
		;;
	esac
	exit 0
	;;

    Paragon*:*:*:*)
	echo "i860-intel-osf1"; exit 0
	;;

    SunOS:5.*)
	echo "${MACHINE}-sun-solaris2"; exit 0
	;;

    SunOS:*)
	echo "${MACHINE}-sun-sunos4"; exit 0
	;;

    UNIX_System_V:4.*:*)
	echo "${MACHINE}-whatever-sysv4"; exit 0
	;;

    *:4*:R4*:m88k)
	echo "${MACHINE}-whatever-sysv4"; exit 0
	;;

    DYNIX/ptx:4*:*)
	echo "${MACHINE}-whatever-sysv4"; exit 0
	;;

    *:4.0:3.0:3[34]?? | *:4.0:3.0:3[34]??,*)
	echo "i486-ncr-sysv4"; exit 0
	;;

    ULTRIX:*)
	echo "${MACHINE}-unknown-ultrix"; exit 0
	;;

    SINIX*|ReliantUNIX*)
	echo "${MACHINE}-siemens-sysv4"; exit 0
	;;

    POSIX-BC*)
	echo "${MACHINE}-siemens-sysv4"; exit 0   # Here, $MACHINE == "BS2000"
	;;

    machten:*)
       echo "${MACHINE}-tenon-${SYSTEM}"; exit 0;
       ;;

    library:*)
	echo "${MACHINE}-ncr-sysv4"; exit 0
	;;

    ConvexOS:*:11.0:*)
	echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
	;;

esac

#
# Ugg. These are all we can determine by what we know about
# the output of uname. Be more creative:
#

# Do the Apollo stuff first. Here, we just simply assume
# that the existance of the /usr/apollo directory is proof
# enough
if [ -d /usr/apollo ]; then
    echo "whatever-apollo-whatever"
    exit 0
fi

# Now NeXT
ISNEXT=`hostinfo 2>/dev/null`
case "$ISNEXT" in
    *'NeXT Mach 3.3'*)
	echo "whatever-next-nextstep3.3"; exit 0
	;;
    *NeXT*)
	echo "whatever-next-nextstep"; exit 0
	;;
esac

# At this point we gone through all the one's
# we know of: Punt

echo "${MACHINE}-whatever-${SYSTEM}" 
exit 0
) 2>/dev/null | (

# ---------------------------------------------------------------------------
# this is where the translation occurs into SSLeay terms
# ---------------------------------------------------------------------------

PREFIX=""
SUFFIX=""
TEST="false"

# pick up any command line args to config
for i
do
case "$i" in 
-d*) PREFIX="debug-";;
-t*) TEST="true";;
-h*) TEST="true"; cat <<EOF
Usage: config [options]
 -d	Add a debug- prefix to machine choice.
 -t	Test mode, do not run the Configure perl script.
 -h	This help.

Any other text will be passed to the Configure perl script.
See INSTALL for instructions.

EOF
;;
*) options=$options" $i" ;;
esac
done

# figure out if gcc is available and if so we use it otherwise
# we fallback to whatever cc does on the system
GCCVER=`(gcc --version) 2>/dev/null`
if [ "$GCCVER" != "" ]; then
  CC=gcc
  # then strip off whatever prefix Cygnus prepends the number with...
  GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'`
  # peak single digit before and after first dot, e.g. 2.95.1 gives 29
  GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
else
  CC=cc
fi

if [ "$SYSTEM" = "SunOS" ]; then
  # assume output is "blah-blah C x.x"
  CCVER=`(cc -V 2>&1) 2>/dev/null | \
  	egrep -e '^cc: .* C [0-9]\.[0-9]' | \
	sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
  CCVER=${CCVER:-0}
  if [ $CCVER -gt 40 ]; then
    CC=cc	# overrides gcc!!!
    if [ $CCVER -eq 50 ]; then
      echo "WARNING! Detected WorkShop C 5.0. Do make sure you have"
      echo "         patch #107357-01 or later applied."
      sleep 5
    fi
  elif [ "$CC" = "cc" -a $CCVER -gt 0 ]; then
    CC=sc3
  fi
fi

GCCVER=${GCCVER:-0}
CCVER=${CCVER:-0}

# read the output of the embedded GuessOS 
read GUESSOS

echo Operating system: $GUESSOS

# now map the output into SSLeay terms ... really should hack into the
# script above so we end up with values in vars but that would take
# more time that I want to waste at the moment
case "$GUESSOS" in
  alpha-*-linux2) OUT="alpha-gcc" ;;
  ppc-*-linux2) OUT="linux-ppc" ;;
  mips-*-linux?) OUT="linux-mips" ;;
  mips2-sgi-irix)
	CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
	CPU=${CPU:-0}
	if [ $CPU -ge 4000 ]; then
		options="$options -mips2"
	fi
	OUT="irix-$CC"
	;;
  mips3-sgi-irix)
	CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
	CPU=${CPU:-0}
	if [ $CPU -ge 5000 ]; then
		options="$options -mips4"
	else
		options="$options -mips3"
	fi
	OUT="irix-mips3-$CC"
	;;
  mips4-sgi-irix64)
	echo "WARNING! If you wish to build 64-bit library, then you have to"
	echo "         invoke './Configre irix64-mips4-$CC' *manually*."
	echo "         Type Ctrl-C if you don't want to continue."
	read waste < /dev/tty
	options="$options -mips4"
	OUT="irix-mips3-$CC"
	;;
  sparc64-*-linux2)
	#Before we can uncomment following lines we have to wait at least
	#till 64-bit glibc for SPARC is operational:-(
	#echo "WARNING! If you wish to build 64-bit library, then you have to"
	#echo "         invoke './Configure linux64-sparcv9' *manually*."
	#echo "         Type Ctrl-C if you don't want to continue."
	#read waste < /dev/tty
	OUT="linux-sparcv9" ;;
  sparc-*-linux2)
	KARCH=`awk '/type/{print$3}' /proc/cpuinfo`
	case ${KARCH:-sun4} in
	sun4u*)	OUT="linux-sparcv9" ;;
	sun4m)	OUT="linux-sparcv8" ;;
	sun4d)	OUT="linux-sparcv8" ;;
	*)	OUT="linux-sparcv7" ;;
	esac ;;
  *-*-linux2) OUT="linux-elf" ;;
  *-*-linux1) OUT="linux-aout" ;;
  sun4u*-sun-solaris2)
	ISA64=`(isalist) 2>/dev/null | grep sparcv9`
	if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then
		echo "WARNING! If you wish to build 64-bit library, then you have to"
		echo "         invoke './Configure solaris64-sparcv9-cc' *manually*."
		echo "         Type Ctrl-C if you don't want to continue."
		read waste < /dev/tty
	fi
	OUT="solaris-sparcv9-$CC" ;;
  sun4m-sun-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4d-sun-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4*-sun-solaris2)	OUT="solaris-sparcv7-$CC" ;;
  *86*-sun-solaris2) OUT="solaris-x86-$CC" ;;
  *-*-sunos4) OUT="sunos-$CC" ;;
  alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
  *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
  *-freebsd[1-2]*) OUT="FreeBSD" ;;
  *86*-*-netbsd) OUT="NetBSD-x86" ;;
  sun3*-*-netbsd) OUT="NetBSD-m68" ;;
  *-*-netbsd) OUT="NetBSD-sparc" ;;
  *86*-*-openbsd) OUT="OpenBSD-x86" ;;
  alpha*-*-openbsd) OUT="OpenBSD-alpha" ;;
  pmax*-*-openbsd) OUT="OpenBSD-mips" ;;
  *-*-openbsd) OUT="OpenBSD" ;;
  *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
  *-*-osf) OUT="alpha-cc" ;;
  *-*-unixware*) OUT="unixware-2.0" ;;
  BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
  RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
  *-siemens-sysv4) OUT="SINIX" ;;
  # these are all covered by the catchall below
  # *-hpux*) OUT="hpux-$CC" ;;
  # *-aix) OUT="aix-$CC" ;;
  # *-dgux) OUT="dgux" ;;
  *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
esac

# gcc < 2.8 does not support -mcpu=ultrasparc
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
then
  echo "WARNING! Do consider upgrading to gcc-2.8 or later."
  sleep 5
  OUT=solaris-sparcv9-gcc27
fi
if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
then
  echo "WARNING! Falling down to 'linux-sparcv8'."
  echo "         Upgrade to gcc-2.8 or later."
  sleep 5
  OUT=linux-sparcv8
fi

case "$GUESSOS" in
  i386-*) options="$options 386" ;;
esac

for i in bf cast des dh dsa hmac md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
do
  if [ ! -d crypto/$i ]
  then
    options="$options no-$i"
  fi
done

if [ -z "$OUT" ]; then
  OUT="$CC"
fi

if [ ".$PERL" = . ] ; then
	for i in . `echo $PATH | sed 's/:/ /g'`; do
		if [ -f "$i/perl5" ] ; then
			PERL="$i/perl5"
			break;
		fi;
	done
fi

if [ ".$PERL" = . ] ; then
	for i in . `echo $PATH | sed 's/:/ /g'`; do
		if [ -f "$i/perl" ] ; then
			if "$i/perl" -e 'exit($]<5.0)'; then
				PERL="$i/perl"
				break;
			fi;
		fi;
	done
fi

if [ ".$PERL" = . ] ; then
	echo "You need Perl 5."
	exit 1
fi

# run Configure to check to see if we need to specify the 
# compiler for the platform ... in which case we add it on
# the end ... otherwise we leave it off

$PERL ./Configure 2>&1 | grep "$OUT-$CC" > /dev/null
if [ $? = "0" ]; then
  OUT="$OUT-$CC"
fi

OUT="$PREFIX$OUT"

$PERL ./Configure 2>&1 | grep "$OUT" > /dev/null
if [ $? = "0" ]; then
  echo Configuring for $OUT

  if [ "$TEST" = "true" ]; then
    echo $PERL ./Configure $OUT $options
  else
    $PERL ./Configure $OUT $options
  fi
else
  echo "This system ($OUT) is not supported. See file INSTALL for details."
fi
)
@


1.1.1.1.2.1
log
@pull up openssl 0.9.5a (requested by thorpej)
@
text
@a29 1

a52 2
		elif [ "x$VERSION" = "x2.1.2" ]; then
		    echo "${MACHINE}-whatever-unixware212"; exit 0
a59 5
	    5)
		if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
		    echo "${MACHINE}-sco-unixware7"; exit 0
		fi
		;;
a189 4
    Rhapsody:*)
	echo "ppc-apple-rhapsody"; exit 0
	;;

a282 2
# shared library support (behnke@@trustcenter.de)
-shared) SHARED=true;;
d314 1
a314 1
  # check for WorkShop C, expected output is "cc: blah-blah C x.x"
a330 13
if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
  # check for Compaq C, expected output is "blah-blah C Vx.x"
  CCCVER=`(ccc -V 2>&1) 2>/dev/null | \
	egrep -e '.* C V[0-9]\.[0-9]' | \
	sed 's/.* C V\([0-9]\)\.\([0-9]\).*/\1\2/'`
  CCCVER=${CCCVER:-0}
  if [ $CCCVER -gt 60 ]; then
    CC=ccc	# overrides gcc!!! well, ccc outperforms inoticeably
		# only on hash routines and des, otherwise gcc (2.95)
		# keeps along rather tight...
  fi
fi

d343 3
a371 18
  alpha-*-linux2)
        ISA=`awk '/cpu model/{print$4}' /proc/cpuinfo`
	case ${ISA:-generic} in
	*[67])	OUT="linux-alpha+bwx-$CC" ;;
	*)	OUT="linux-alpha-$CC" ;;
	esac
	if [ "$CC" = "gcc" ]; then
	    case ${ISA:-generic} in
	    EV5|EV45)		options="$options -mcpu=ev5";;
	    EV56|PCA56)		options="$options -mcpu=ev56";;
	    EV6|EV67|PCA57)	options="$options -mcpu=ev6";;
	    esac
	fi
	;;
  mips-*-linux?) OUT="linux-mips" ;;
  ppc-*-linux2) OUT="linux-ppc" ;;
  ia64-*-linux?) OUT="linux-ia64" ;;
  ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
d416 1
a416 6
  *-*-unixware7) OUT="unixware-7" ;;
  *-*-UnixWare7) OUT="unixware-7" ;;
  *-*-Unixware7) OUT="unixware-7" ;;
  *-*-unixware[1-2]*) OUT="unixware-2.0" ;;
  *-*-UnixWare[1-2]*) OUT="unixware-2.0" ;;
  *-*-Unixware[1-2]*) OUT="unixware-2.0" ;;
a419 3
  *-hpux1*)	OUT="hpux-parisc-$CC"
		options="$options -D_REENTRANT" ;;
  *-hpux)	OUT="hpux-parisc-$CC" ;;
d421 1
a426 16
# See whether we can compile Atalla support
if [ -f /usr/include/atasi.h ]
then
  options="$options -DATALLA"
fi

#get some basic shared lib support (behnke@@trustcenter.de)
case "$OUT" in
   solaris-*-gcc)
	if  [ "$SHARED" = "true" ] 
	 then
	  options="$options -DPIC -fPIC"
        fi
     ;;
esac

a440 11
# To start with $OUT is never i86pc-sun-solaris2. Secondly why
# ban *all* assembler implementation if it can't stand only one,
# SHA-0 implementation.
#if [ "$OUT" = "i86pc-sun-solaris2" ]
#then
#  ASM=`as -V /dev/null 2>&1`
#  case "$ASM" in
#    GNU*) ;;
#    *) 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." ;;
#  esac
#fi
d487 1
a487 1
$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null
d494 1
a494 1
$PERL ./Configure LIST | grep "$OUT" > /dev/null
@


1.1.1.1.2.2
log
@Pull up revisions 1.1.1.3-1.1.1.7 (requested by itojun,he):
  Update OpenSSL to version 0.9.6g.  Includes major version bump for
  libcrypto and all the dependent libraries.
@
text
@d52 1
a52 7
		if [ "x$VERSION" = "x2.01" ]; then
		    echo "${MACHINE}-whatever-unixware201"; exit 0
		elif [ "x$VERSION" = "x2.02" ]; then
		    echo "${MACHINE}-whatever-unixware202"; exit 0
		elif [ "x$VERSION" = "x2.03" ]; then
		    echo "${MACHINE}-whatever-unixware203"; exit 0
		elif [ "x$VERSION" = "x2.1.1" ]; then
a55 2
		elif [ "x$VERSION" = "x2.1.3" ]; then
		    echo "${MACHINE}-whatever-unixware213"; exit 0
a62 5
     OpenUNIX)
		if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x8" ]; then
		    echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
		fi
		;;
a73 4
    MPE/iX:*)
	MACHINE=`echo "$MACHINE" | sed -e 's/-/_/g'`
	echo "parisc-hp-MPE/iX"; exit 0
	;;
a77 8
    AIX:[3456789]:4:*)
	echo "${MACHINE}-ibm-aix43"; exit 0
	;;

    AIX:*:[56789]:*)
	echo "${MACHINE}-ibm-aix43"; exit 0
	;;

d167 1
a167 1
        echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
a177 4
    OpenUNIX:*)
	echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
	;;

d179 1
a179 12
	OSFMAJOR=`echo ${RELEASE}| sed -e 's/^V\([0-9]*\)\..*$/\1/'`
	case "$OSFMAJOR" in
	    4|5)
		echo "${MACHINE}-dec-tru64"; exit 0
		;;
	    1|2|3)
		echo "${MACHINE}-dec-osf"; exit 0
		;;
	    *)
		echo "${MACHINE}-dec-osf"; exit 0
		;;
	esac
d183 3
a185 6
	case "$RELEASE" in
	    4*)
		echo "${MACHINE}-whatever-qnx4"
		;;
	    6*)
		echo "${MACHINE}-whatever-qnx6"
d188 1
a188 1
		echo "${MACHINE}-whatever-qnx"
a201 4
    Darwin:*)
	echo "ppc-apple-darwin"; exit 0
	;;

d203 1
a203 1
	echo "${MACHINE}-whatever-solaris2"; exit 0
a249 23
    NEWS-OS:4.*)
	echo "mips-sony-newsos4"; exit 0;
	;;

    CYGWIN*)
	case "$RELEASE" in
	    [bB]*|1.0|1.[12].*)
		echo "${MACHINE}-whatever-cygwin_pre1.3"
		;;
	    *)
		echo "${MACHINE}-whatever-cygwin"
		;;
	esac
	exit 0
	;;

    *"CRAY T3E")
       echo "t3e-cray-unicosmk"; exit 0;
       ;;

    *CRAY*)
       echo "j90-cray-unicos"; exit 0;
       ;;
d295 2
d316 1
a316 1
GCCVER=`(gcc -dumpversion) 2>/dev/null`
d319 2
a320 6
  # then strip off whatever prefix egcs prepends the number with...
  # Hopefully, this will work for any future prefixes as well.
  GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
  # Since gcc 3.1 gcc --version behaviour has changed.  gcc -dumpversion
  # does give us what we want though, so we use that.  We just just the
  # major and minor version numbers.
d326 1
a326 13
GCCVER=${GCCVER:-0}
if [ "$SYSTEM" = "HP-UX" ];then
  # By default gcc is a ILP32 compiler (with long long == 64).
  GCC_BITS="32"
  if [ $GCCVER -ge 30 ]; then
    # PA64 support only came in with gcc 3.0.x.
    # We look for the preprocessor symbol __LP64__ indicating
    # 64bit bit long and pointer.  sizeof(int) == 32 on HPUX64.
    if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
      GCC_BITS="64"
    fi
  fi
fi
d390 2
a391 2
	echo "         invoke './Configure irix64-mips4-$CC' *manually*."
	echo "         Type return if you want to continue, Ctrl-C to abort."
d393 1
a393 7
        CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
        CPU=${CPU:-0}
        if [ $CPU -ge 5000 ]; then
                options="$options -mips4"
        else
                options="$options -mips3"
        fi
d410 1
a410 20
  mips-*-linux?)
          cat >dummy.c <<EOF
#include <stdio.h>  /* for printf() prototype */
        int main (argc, argv) int argc; char *argv[]; {
#ifdef __MIPSEB__
  printf ("linux-%s\n", argv[1]);
#endif
#ifdef __MIPSEL__
  printf ("linux-%sel\n", argv[1]);
#endif
  return 0;
}
EOF
	${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
	rm dummy dummy.c
	;;
  ppc64-*-linux2)
	#Use the standard target for PPC architecture until we create a
	#special one for the 64bit architecture.
	OUT="linux-ppc" ;;
a411 1
  m68k-*-linux*) OUT="linux-m68k" ;;
a413 1
  ppc-apple-darwin) OUT="darwin-ppc-cc" ;;
d419 1
a419 1
	#echo "         Type return if you want to continue, Ctrl-C to abort."
d423 1
a423 1
	KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
a429 23
  parisc-*-linux2)
        CPUARCH=`awk '/cpu family/{print substr($5,1,3)}' /proc/cpuinfo`
	CPUSCHEDULE=`awk '/^cpu.[ 	]: PA/{print substr($3,3)}' /proc/cpuinfo`

	# ??TODO ??  Model transformations
	# 0. CPU Architecture for the 1.1 processor has letter suffixes. We strip that off
	#    assuming no further arch. identification will ever be used by GCC.
	# 1. I'm most concerned about whether is a 7300LC is closer to a 7100 versus a 7100LC.
	# 2. The variant 64-bit processors cause concern should GCC support explicit schedulers
	#    for these chips in the future.
	#         PA7300LC -> 7100LC (1.1)
	#         PA8200   -> 8000   (2.0)
	#         PA8500   -> 8000   (2.0)
	#         PA8600   -> 8000   (2.0)

	CPUSCHEDULE=`echo $CPUSCHEDULE|sed -e 's/7300LC/7100LC/' -e 's/8?00/8000/'`
	# Finish Model transformations

	options="$options -mschedule=$CPUSCHEDULE -march=$CPUARCH"
	OUT="linux-parisc" ;;
  arm*-*-linux2) OUT="linux-elf-arm" ;;
  s390-*-linux2) OUT="linux-s390" ;;
  s390x-*-linux?) OUT="linux-s390x" ;;
d432 1
a432 1
  sun4u*-*-solaris2)
d437 1
a437 1
		echo "         Type return if you want to continue, Ctrl-C to abort."
d441 4
a444 4
  sun4m-*-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4d-*-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4*-*-solaris2)	OUT="solaris-sparcv7-$CC" ;;
  *86*-*-solaris2) OUT="solaris-x86-$CC" ;;
d457 1
a457 9
  *-*-osf) OUT="alphaold-cc" ;;
  *-*-tru64) OUT="alpha-cc" ;;
  *-*-OpenUNIX*)
	if [ "$CC" = "gcc" ]; then
	  OUT="OpenUNIX-8-gcc" 
	else    
	  OUT="OpenUNIX-8" 
	fi
	;;
d461 3
a463 6
  *-*-unixware20*) OUT="unixware-2.0" ;;
  *-*-unixware21*) OUT="unixware-2.1" ;;
  *-*-UnixWare20*) OUT="unixware-2.0" ;;
  *-*-UnixWare21*) OUT="unixware-2.1" ;;
  *-*-Unixware20*) OUT="unixware-2.0" ;;
  *-*-Unixware21*) OUT="unixware-2.1" ;;
d467 2
a468 12
  *-hpux1*)
	if [ $CC = "gcc" ];
	then
	  if [ $GCC_BITS = "64" ]; then
	    OUT="hpux64-parisc-gcc"
	  else
	    OUT="hpux-parisc-gcc"
	  fi
	else
	  OUT="hpux-parisc-$CC"
	fi
	options="$options -D_REENTRANT" ;;
a472 5
  mips-sony-newsos4) OUT="newsos4-gcc" ;;
  *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
  *-*-cygwin) OUT="Cygwin" ;;
  t3e-cray-unicosmk) OUT="cray-t3e" ;;
  j90-cray-unicos) OUT="cray-j90" ;;
d482 10
d506 11
d522 1
a522 1
for i in bf cast des dh dsa hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
@


1.1.1.2
log
@OpenSSL 0.9.5a import.
@
text
@a29 1

a52 2
		elif [ "x$VERSION" = "x2.1.2" ]; then
		    echo "${MACHINE}-whatever-unixware212"; exit 0
a59 5
	    5)
		if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
		    echo "${MACHINE}-sco-unixware7"; exit 0
		fi
		;;
a189 4
    Rhapsody:*)
	echo "ppc-apple-rhapsody"; exit 0
	;;

a282 2
# shared library support (behnke@@trustcenter.de)
-shared) SHARED=true;;
d314 1
a314 1
  # check for WorkShop C, expected output is "cc: blah-blah C x.x"
a330 13
if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
  # check for Compaq C, expected output is "blah-blah C Vx.x"
  CCCVER=`(ccc -V 2>&1) 2>/dev/null | \
	egrep -e '.* C V[0-9]\.[0-9]' | \
	sed 's/.* C V\([0-9]\)\.\([0-9]\).*/\1\2/'`
  CCCVER=${CCCVER:-0}
  if [ $CCCVER -gt 60 ]; then
    CC=ccc	# overrides gcc!!! well, ccc outperforms inoticeably
		# only on hash routines and des, otherwise gcc (2.95)
		# keeps along rather tight...
  fi
fi

d343 3
a371 18
  alpha-*-linux2)
        ISA=`awk '/cpu model/{print$4}' /proc/cpuinfo`
	case ${ISA:-generic} in
	*[67])	OUT="linux-alpha+bwx-$CC" ;;
	*)	OUT="linux-alpha-$CC" ;;
	esac
	if [ "$CC" = "gcc" ]; then
	    case ${ISA:-generic} in
	    EV5|EV45)		options="$options -mcpu=ev5";;
	    EV56|PCA56)		options="$options -mcpu=ev56";;
	    EV6|EV67|PCA57)	options="$options -mcpu=ev6";;
	    esac
	fi
	;;
  mips-*-linux?) OUT="linux-mips" ;;
  ppc-*-linux2) OUT="linux-ppc" ;;
  ia64-*-linux?) OUT="linux-ia64" ;;
  ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
d416 1
a416 6
  *-*-unixware7) OUT="unixware-7" ;;
  *-*-UnixWare7) OUT="unixware-7" ;;
  *-*-Unixware7) OUT="unixware-7" ;;
  *-*-unixware[1-2]*) OUT="unixware-2.0" ;;
  *-*-UnixWare[1-2]*) OUT="unixware-2.0" ;;
  *-*-Unixware[1-2]*) OUT="unixware-2.0" ;;
a419 3
  *-hpux1*)	OUT="hpux-parisc-$CC"
		options="$options -D_REENTRANT" ;;
  *-hpux)	OUT="hpux-parisc-$CC" ;;
d421 1
a426 16
# See whether we can compile Atalla support
if [ -f /usr/include/atasi.h ]
then
  options="$options -DATALLA"
fi

#get some basic shared lib support (behnke@@trustcenter.de)
case "$OUT" in
   solaris-*-gcc)
	if  [ "$SHARED" = "true" ] 
	 then
	  options="$options -DPIC -fPIC"
        fi
     ;;
esac

a440 11
# To start with $OUT is never i86pc-sun-solaris2. Secondly why
# ban *all* assembler implementation if it can't stand only one,
# SHA-0 implementation.
#if [ "$OUT" = "i86pc-sun-solaris2" ]
#then
#  ASM=`as -V /dev/null 2>&1`
#  case "$ASM" in
#    GNU*) ;;
#    *) 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." ;;
#  esac
#fi
d487 1
a487 1
$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null
d494 1
a494 1
$PERL ./Configure LIST | grep "$OUT" > /dev/null
@


1.1.1.3
log
@OpenSSL 0.9.6a
@
text
@d52 1
a52 7
		if [ "x$VERSION" = "x2.01" ]; then
		    echo "${MACHINE}-whatever-unixware201"; exit 0
		elif [ "x$VERSION" = "x2.02" ]; then
		    echo "${MACHINE}-whatever-unixware202"; exit 0
		elif [ "x$VERSION" = "x2.03" ]; then
		    echo "${MACHINE}-whatever-unixware203"; exit 0
		elif [ "x$VERSION" = "x2.1.1" ]; then
a55 2
		elif [ "x$VERSION" = "x2.1.3" ]; then
		    echo "${MACHINE}-whatever-unixware213"; exit 0
a73 4
    MPE/iX:*)
	MACHINE=`echo "$MACHINE" | sed -e 's/-/_/g'`
	echo "parisc-hp-MPE/iX"; exit 0
	;;
a77 8
    AIX:[3456789]:4:*)
	echo "${MACHINE}-ibm-aix43"; exit 0
	;;

    AIX:*:[56789]:*)
	echo "${MACHINE}-ibm-aix43"; exit 0
	;;

d167 1
a167 1
        echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
d184 2
a185 2
	    4*)
		echo "${MACHINE}-whatever-qnx4"
d188 1
a188 1
		echo "${MACHINE}-whatever-qnx"
d203 1
a203 1
	echo "${MACHINE}-whatever-solaris2"; exit 0
a249 4
    NEWS-OS:4.*)
	echo "mips-sony-newsos4"; exit 0;
	;;

d295 2
d390 2
a391 2
	echo "         invoke './Configure irix64-mips4-$CC' *manually*."
	echo "         Type return if you want to continue, Ctrl-C to abort."
d393 1
a393 7
        CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
        CPU=${CPU:-0}
        if [ $CPU -ge 5000 ]; then
                options="$options -mips4"
        else
                options="$options -mips3"
        fi
a411 1
  m68k-*-linux*) OUT="linux-m68k" ;;
d419 1
a419 1
	#echo "         Type return if you want to continue, Ctrl-C to abort."
d423 1
a423 1
	KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
a429 2
  arm*-*-linux2) OUT="linux-elf-arm" ;;
  s390-*-linux2) OUT="linux-s390" ;;
d432 1
a432 1
  sun4u*-*-solaris2)
d437 1
a437 1
		echo "         Type return if you want to continue, Ctrl-C to abort."
d441 4
a444 4
  sun4m-*-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4d-*-solaris2)	OUT="solaris-sparcv8-$CC" ;;
  sun4*-*-solaris2)	OUT="solaris-sparcv7-$CC" ;;
  *86*-*-solaris2) OUT="solaris-x86-$CC" ;;
d461 3
a463 6
  *-*-unixware20*) OUT="unixware-2.0" ;;
  *-*-unixware21*) OUT="unixware-2.1" ;;
  *-*-UnixWare20*) OUT="unixware-2.0" ;;
  *-*-UnixWare21*) OUT="unixware-2.1" ;;
  *-*-Unixware20*) OUT="unixware-2.0" ;;
  *-*-Unixware21*) OUT="unixware-2.1" ;;
a472 1
  mips-sony-newsos4) OUT="newsos4-gcc" ;;
d482 10
d506 11
@


1.1.1.3.2.1
log
@Pull up revisions 1.1.1.4-1.1.1.5 (requested by itojun in ticket #607):
sync to head for openssl 0.9.6e
@
text
@a70 5
     OpenUNIX)
		if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x8" ]; then
		    echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
		fi
		;;
a197 4
    OpenUNIX:*)
	echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
	;;

d199 1
a199 12
	OSFMAJOR=`echo ${RELEASE}| sed -e 's/^V\([0-9]*\)\..*$/\1/'`
	case "$OSFMAJOR" in
	    4|5)
		echo "${MACHINE}-dec-tru64"; exit 0
		;;
	    1|2|3)
		echo "${MACHINE}-dec-osf"; exit 0
		;;
	    *)
		echo "${MACHINE}-dec-osf"; exit 0
		;;
	esac
d203 1
a203 1
	case "$RELEASE" in
a206 3
	    6*)
		echo "${MACHINE}-whatever-qnx6"
		;;
a221 4
    Darwin:*)
	echo "ppc-apple-darwin"; exit 0
	;;

a273 19
    CYGWIN*)
	case "$RELEASE" in
	    [bB]*|1.0|1.[12].*)
		echo "${MACHINE}-whatever-cygwin_pre1.3"
		;;
	    *)
		echo "${MACHINE}-whatever-cygwin"
		;;
	esac
	exit 0
	;;

    *"CRAY T3E")
       echo "t3e-cray-unicosmk"; exit 0;
       ;;

    *CRAY*)
       echo "j90-cray-unicos"; exit 0;
       ;;
d338 1
a338 1
GCCVER=`(gcc -dumpversion) 2>/dev/null`
d341 2
a342 3
  # Since gcc 3.1 gcc --version behaviour has changed.  gcc -dumpversion
  # does give us what we want though, so we use that.  We just just the
  # major and minor version numbers.
d348 1
a348 12
if [ "$SYSTEM" = "HP-UX" ];then
  # By default gcc is a ILP32 compiler (with long long == 64).
  GCC_BITS="32"
  if [ $GCCVER -ge 30 ]; then
    # PA64 support only came in with gcc 3.0.x.
    # We look for the preprocessor symbol __LP64__ indicating
    # 64bit bit long and pointer.  sizeof(int) == 32 on HPUX64.
    if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
      GCC_BITS="64"
    fi
  fi
fi
d438 1
a438 20
  mips-*-linux?)
          cat >dummy.c <<EOF
#include <stdio.h>  /* for printf() prototype */
        int main (argc, argv) int argc; char *argv[]; {
#ifdef __MIPSEB__
  printf ("linux-%s\n", argv[1]);
#endif
#ifdef __MIPSEL__
  printf ("linux-%sel\n", argv[1]);
#endif
  return 0;
}
EOF
	${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
	rm dummy dummy.c
	;;
  ppc64-*-linux2)
	#Use the standard target for PPC architecture until we create a
	#special one for the 64bit architecture.
	OUT="linux-ppc" ;;
a442 1
  ppc-apple-darwin) OUT="darwin-ppc-cc" ;;
a458 20
  parisc-*-linux2)
        CPUARCH=`awk '/cpu family/{print substr($5,1,3)}' /proc/cpuinfo`
	CPUSCHEDULE=`awk '/^cpu.[ 	]: PA/{print substr($3,3)}' /proc/cpuinfo`

	# ??TODO ??  Model transformations
	# 0. CPU Architecture for the 1.1 processor has letter suffixes. We strip that off
	#    assuming no further arch. identification will ever be used by GCC.
	# 1. I'm most concerned about whether is a 7300LC is closer to a 7100 versus a 7100LC.
	# 2. The variant 64-bit processors cause concern should GCC support explicit schedulers
	#    for these chips in the future.
	#         PA7300LC -> 7100LC (1.1)
	#         PA8200   -> 8000   (2.0)
	#         PA8500   -> 8000   (2.0)
	#         PA8600   -> 8000   (2.0)

	CPUSCHEDULE=`echo $CPUSCHEDULE|sed -e 's/7300LC/7100LC/' -e 's/8?00/8000/'`
	# Finish Model transformations

	options="$options -mschedule=$CPUSCHEDULE -march=$CPUARCH"
	OUT="linux-parisc" ;;
a460 1
  s390x-*-linux?) OUT="linux-s390x" ;;
d488 1
a488 9
  *-*-osf) OUT="alphaold-cc" ;;
  *-*-tru64) OUT="alpha-cc" ;;
  *-*-OpenUNIX*)
	if [ "$CC" = "gcc" ]; then
	  OUT="OpenUNIX-8-gcc" 
	else    
	  OUT="OpenUNIX-8" 
	fi
	;;
d501 2
a502 12
  *-hpux1*)
	if [ $CC = "gcc" ];
	then
	  if [ $GCC_BITS = "64" ]; then
	    OUT="hpux64-parisc-gcc"
	  else
	    OUT="hpux-parisc-gcc"
	  fi
	else
	  OUT="hpux-parisc-$CC"
	fi
	options="$options -D_REENTRANT" ;;
a507 4
  *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
  *-*-cygwin) OUT="Cygwin" ;;
  t3e-cray-unicosmk) OUT="cray-t3e" ;;
  j90-cray-unicos) OUT="cray-j90" ;;
d536 1
a536 1
for i in bf cast des dh dsa hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
@


1.1.1.3.2.2
log
@Manually pullup to -1-6 changes between openssl_0_9_6f and openssl_0_9_6g,
merging in some missing pullups from 0_9_6e (etc).
Requested by itojun in ticket #660.
@
text
@a386 3
  # then strip off whatever prefix egcs prepends the number with...
  # Hopefully, this will work for any future prefixes as well.
  GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
@


1.1.1.3.2.3
log
@Manually pull up changes between openssl_0_9_6e and openssl_0_9_6f,
which were previously missed.
(effectively) requested by itojun in ticket #654
@
text
@a397 1
GCCVER=${GCCVER:-0}
@


1.1.1.4
log
@openssl 0.9.6d
@
text
@a70 5
     OpenUNIX)
		if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x8" ]; then
		    echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
		fi
		;;
a197 4
    OpenUNIX:*)
	echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
	;;

d199 1
a199 12
	OSFMAJOR=`echo ${RELEASE}| sed -e 's/^V\([0-9]*\)\..*$/\1/'`
	case "$OSFMAJOR" in
	    4|5)
		echo "${MACHINE}-dec-tru64"; exit 0
		;;
	    1|2|3)
		echo "${MACHINE}-dec-osf"; exit 0
		;;
	    *)
		echo "${MACHINE}-dec-osf"; exit 0
		;;
	esac
d203 1
a203 1
	case "$RELEASE" in
a206 3
	    6*)
		echo "${MACHINE}-whatever-qnx6"
		;;
a221 4
    Darwin:*)
	echo "ppc-apple-darwin"; exit 0
	;;

a273 19
    CYGWIN*)
	case "$RELEASE" in
	    [bB]*|1.0|1.[12].*)
		echo "${MACHINE}-whatever-cygwin_pre1.3"
		;;
	    *)
		echo "${MACHINE}-whatever-cygwin"
		;;
	esac
	exit 0
	;;

    *"CRAY T3E")
       echo "t3e-cray-unicosmk"; exit 0;
       ;;

    *CRAY*)
       echo "j90-cray-unicos"; exit 0;
       ;;
d438 1
a438 16
  mips-*-linux?)
          cat >dummy.c <<EOF
#include <stdio.h>  /* for printf() prototype */
        int main (argc, argv) int argc; char *argv[]; {
#ifdef __MIPSEB__
  printf ("linux-%s\n", argv[1]);
#endif
#ifdef __MIPSEL__
  printf ("linux-%sel\n", argv[1]);
#endif
  return 0;
}
EOF
	${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
	rm dummy dummy.c
	;;
a442 1
  ppc-apple-darwin) OUT="darwin-ppc-cc" ;;
a458 20
  parisc-*-linux2)
        CPUARCH=`awk '/cpu family/{print substr($5,1,3)}' /proc/cpuinfo`
	CPUSCHEDULE=`awk '/^cpu.[ 	]: PA/{print substr($3,3)}' /proc/cpuinfo`

	# ??TODO ??  Model transformations
	# 0. CPU Architecture for the 1.1 processor has letter suffixes. We strip that off
	#    assuming no further arch. identification will ever be used by GCC.
	# 1. I'm most concerned about whether is a 7300LC is closer to a 7100 versus a 7100LC.
	# 2. The variant 64-bit processors cause concern should GCC support explicit schedulers
	#    for these chips in the future.
	#         PA7300LC -> 7100LC (1.1)
	#         PA8200   -> 8000   (2.0)
	#         PA8500   -> 8000   (2.0)
	#         PA8600   -> 8000   (2.0)

	CPUSCHEDULE=`echo $CPUSCHEDULE|sed -e 's/7300LC/7100LC/' -e 's/8?00/8000/'`
	# Finish Model transformations

	options="$options -mschedule=$CPUSCHEDULE -march=$CPUARCH"
	OUT="linux-parisc" ;;
a460 1
  s390x-*-linux?) OUT="linux-s390x" ;;
d488 1
a488 9
  *-*-osf) OUT="alphaold-cc" ;;
  *-*-tru64) OUT="alpha-cc" ;;
  *-*-OpenUNIX*)
	if [ "$CC" = "gcc" ]; then
	  OUT="OpenUNIX-8-gcc" 
	else    
	  OUT="OpenUNIX-8" 
	fi
	;;
a507 4
  *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
  *-*-cygwin) OUT="Cygwin" ;;
  t3e-cray-unicosmk) OUT="cray-t3e" ;;
  j90-cray-unicos) OUT="cray-j90" ;;
d536 1
a536 1
for i in bf cast des dh dsa hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
@


1.1.1.5
log
@OpenSSL 0.9.6e.  includes major security fixes (already applied)
@
text
@d384 1
a384 1
GCCVER=`(gcc -dumpversion) 2>/dev/null`
d387 2
a388 3
  # Since gcc 3.1 gcc --version behaviour has changed.  gcc -dumpversion
  # does give us what we want though, so we use that.  We just just the
  # major and minor version numbers.
d394 1
a394 12
if [ "$SYSTEM" = "HP-UX" ];then
  # By default gcc is a ILP32 compiler (with long long == 64).
  GCC_BITS="32"
  if [ $GCCVER -ge 30 ]; then
    # PA64 support only came in with gcc 3.0.x.
    # We look for the preprocessor symbol __LP64__ indicating
    # 64bit bit long and pointer.  sizeof(int) == 32 on HPUX64.
    if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
      GCC_BITS="64"
    fi
  fi
fi
a499 4
  ppc64-*-linux2)
	#Use the standard target for PPC architecture until we create a
	#special one for the 64bit architecture.
	OUT="linux-ppc" ;;
d592 2
a593 12
  *-hpux1*)
	if [ $CC = "gcc" ];
	then
	  if [ $GCC_BITS = "64" ]; then
	    OUT="hpux64-parisc-gcc"
	  else
	    OUT="hpux-parisc-gcc"
	  fi
	else
	  OUT="hpux-parisc-$CC"
	fi
	options="$options -D_REENTRANT" ;;
@


1.1.1.6
log
@openssl 0.9.6f, with security fixes
@
text
@a394 1
GCCVER=${GCCVER:-0}
@


1.1.1.7
log
@openssl 0.9.6g, build framework fixes
@
text
@a386 3
  # then strip off whatever prefix egcs prepends the number with...
  # Hopefully, this will work for any future prefixes as well.
  GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
@


1.1.1.8
log
@OpenSSL 0.9.7b, major API changes included
@
text
@a22 25
PREFIX=""
SUFFIX=""
TEST="false"

# pick up any command line args to config
for i
do
case "$i" in 
-d*) PREFIX="debug-";;
-t*) TEST="true";;
-h*) TEST="true"; cat <<EOF
Usage: config [options]
 -d	Add a debug- prefix to machine choice.
 -t	Test mode, do not run the Configure perl script.
 -h	This help.

Any other text will be passed to the Configure perl script.
See INSTALL for instructions.

EOF
;;
*) options=$options" $i" ;;
esac
done

d52 15
a66 5
		case "x${VERSION}" in
		    x2.0*) echo "whatever-whatever-unixware20"; exit 0 ;;
		    x2.1*) echo "whatever-whatever-unixware21"; exit 0 ;;
		    x2*)   echo "whatever-whatever-unixware2";  exit 0 ;;
		esac
d69 6
a74 1
		echo "i386-whatever-unixware1"; exit 0
d77 3
a79 11
		case "x${VERSION}" in
		    # We hardcode i586 in place of ${MACHINE} for the
		    # following reason. The catch is that even though Pentium
		    # is minimum requirement for platforms in question,
		    # ${MACHINE} gets always assigned to i386. Now, problem
		    # with i386 is that it makes ./config pass 386 to
		    # ./Configure, which in turn makes make generate
		    # inefficient SHA-1 (for this moment) code.
		    x7*)  echo "i586-sco-unixware7";           exit 0 ;;
		    x8*)  echo "i586-unkn-OpenUNIX${VERSION}"; exit 0 ;;
		esac
d118 4
a121 1
	    1[0-9].*)	# HPUX 10 and 11 targets are unified
a149 4
    GNU*)
	echo "hurd-x86"; exit 0;
	;;

d173 1
a173 1
    FreeBSD:*:*:*386*)
d182 1
a190 4
    FreeBSD:*)
	echo "${MACHINE}-whatever-freebsd"; exit 0
	;;

d246 1
a246 9
	case "$MACHINE" in
	    Power*)
		echo "ppc-apple-darwin${VERSION}"
		;;
	    *)
		echo "i386-apple-darwin${VERSION}"
		;;
	esac
	exit 0
a319 4

    NONSTOP_KERNEL*)
       echo "nsr-tandem-nsk"; exit 0;
       ;;
d357 25
a411 9
  if [ $GCCVER -ge 30 ]; then
    # 64-bit ABI isn't officially supported in gcc 3.0, but it appears
    # to be working, at the very least 'make test' passes...
    if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then
      GCC_ARCH="-m64"
    else
      GCC_ARCH="-m32"
    fi
  fi
d442 1
a442 4
if [ "${SYSTEM}" = "AIX" ]; then	# favor vendor cc over gcc
    (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
fi

d455 1
a455 1
	CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
d463 1
a463 1
	CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
d475 3
a477 5
	if [ "$TEST" = "false" ]; then
	  echo "         You have about 5 seconds to press Ctrl-C to abort."
	  (stty -icanon min 0 time 50; read waste) < /dev/tty
	fi
        CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
d524 1
a524 2
  ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
  i386-apple-darwin*) OUT="darwin-i386-cc" ;;
d526 6
a531 7
	echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI"
	echo "         and wish to build 64-bit library, then you have to"
	echo "         invoke './Configure linux64-sparcv9' *manually*."
	if [ "$TEST" = "false" ]; then
	  echo "          You have about 5 seconds to press Ctrl-C to abort."
	  (stty -icanon min 0 time 50; read waste) < /dev/tty
	fi
d564 1
a564 13
  x86_64-*-linux?) OUT="linux-x86_64" ;;
  *-*-linux2) OUT="linux-elf"
	if [ "$GCCVER" -gt 28 ]; then
          if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
            OUT="linux-pentium"
          fi
          if grep '^model.*Pentium Pro' /proc/cpuinfo >/dev/null ; then
            OUT="linux-ppro"
          fi
          if grep '^model.*K6' /proc/cpuinfo >/dev/null ; then
            OUT="linux-k6"
          fi
        fi ;;
a566 1
	OUT="solaris-sparcv9-$CC"
d568 1
a568 2
	if [ "$ISA64" != "" ]; then
	    if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then
d571 2
a572 25
		if [ "$TEST" = "false" ]; then
		  echo "         You have about 5 seconds to press Ctrl-C to abort."
		  (stty -icanon min 0 time 50; read waste) < /dev/tty
		fi
	    elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then
		# $GCC_ARCH denotes default ABI chosen by compiler driver
		# (first one found on the $PATH). I assume that user
		# expects certain consistency with the rest of his builds
		# and therefore switch over to 64-bit. <appro>
		OUT="solaris64-sparcv9-gcc"
		echo "WARNING! If you wish to build 32-bit library, then you have to"
		echo "         invoke './Configure solaris-sparcv9-gcc' *manually*."
		if [ "$TEST" = "false" ]; then
		  echo "         You have about 5 seconds to press Ctrl-C to abort."
		  (stty -icanon min 0 time 50; read waste) < /dev/tty
		fi
	    elif [ "$GCC_ARCH" = "-m32" ]; then
		echo "NOTICE! If you *know* that your GNU C supports 64-bit/V9 ABI"
		echo "        and wish to build 64-bit library, then you have to"
		echo "        invoke './Configure solaris64-sparcv9-gcc' *manually*."
		if [ "$TEST" = "false" ]; then
		  echo "         You have about 5 seconds to press Ctrl-C to abort."
		  (stty -icanon min 0 time 50; read waste) < /dev/tty
		fi
	    fi
d574 1
a574 1
	;;
a580 2
  sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;;
  ia64-*-freebsd*) OUT="FreeBSD-ia64" ;;
d586 1
a587 4
  *86*-*-openbsd) OUT="OpenBSD-i386" ;;
  m68k*-*-openbsd) OUT="OpenBSD-m68k" ;;
  m88k*-*-openbsd) OUT="OpenBSD-m88k" ;;
  mips*-*-openbsd) OUT="OpenBSD-mips" ;;
a588 5
  powerpc*-*-openbsd) OUT="OpenBSD-powerpc" ;;
  sparc64*-*-openbsd) OUT="OpenBSD-sparc64" ;;
  sparc*-*-openbsd) OUT="OpenBSD-sparc" ;;
  vax*-*-openbsd) OUT="OpenBSD-vax" ;;
  hppa*-*-openbsd) OUT="OpenBSD-hppa" ;;
a622 33
	KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
	KERNEL_BITS=${KERNEL_BITS:-32}
	CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
	CPU_VERSION=${CPU_VERSION:-0}
	# See <sys/unistd.h> for further info on CPU_VERSION.
	if   [ $CPU_VERSION -ge 768 ]; then	# IA-64 CPU
	     echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi."
	     echo "         If you wish to build 32-bit library, the you have to"
	     echo "         invoke './Configure hpux-ia32-cc' *manually*."
	     if [ "$TEST" = "false" ]; then
		echo "         You have about 5 seconds to press Ctrl-C to abort."
		(stty -icanon min 0 time 50; read waste) < /dev/tty
	     fi
	     OUT="hpux64-ia64-cc"
	elif [ $CPU_VERSION -ge 532 ]; then	# PA-RISC 2.x CPU
	     if [ "$CC" = "cc" ]; then
		OUT="hpux-parisc2-cc" # can't we have hpux-parisc2-gcc?
	     fi
	     if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
		echo "WARNING! If you wish to build 64-bit library then you have to"
		echo "         invoke './Configure hpux64-parisc2-cc' *manually*."
		if [ "$TEST" = "false" ]; then
		  echo "         You have about 5 seconds to press Ctrl-C to abort."
		  (stty -icanon min 0 time 50; read waste) < /dev/tty
		fi
	     fi
	elif [ $CPU_VERSION -ge 528 ]; then	# PA-RISC 1.1+ CPU
	     :
	elif [ $CPU_VERSION -ge 523 ]; then	# PA-RISC 1.0 CPU
	     :
	else					# Motorola(?) CPU
	     OUT="hpux-$CC"
	fi
a632 1
  nsr-tandem-nsk) OUT="tandem-c89" ;;
a635 6
# NB: This atalla support has been superceded by the ENGINE support
# That contains its own header and definitions anyway. Support can
# be enabled or disabled on any supported platform without external
# headers, eg. by adding the "hw-atalla" switch to ./config or
# perl Configure
#
d637 4
a640 4
#if [ -f /usr/include/atasi.h ]
#then
#  options="$options -DATALLA"
#fi
d661 1
a661 1
for i in bf cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 aes ripemd rsa sha
a667 21

# Discover Kerberos 5 (since it's still a prototype, we don't
# do any guesses yet, that's why this section is commented away.
#if [ -d /usr/kerberos ]; then
#    krb5_dir=/usr/kerberos
#    if [ \( -f $krb5_dir/lib/libgssapi_krb5.a -o -f $krb5_dir/lib/libgssapi_krb5.so* \)\
#	-a \( -f $krb5_dir/lib/libkrb5.a -o -f $krb5_dir/lib/libkrb5.so* \)\
#	-a \( -f $krb5_dir/lib/libcom_err.a -o -f $krb5_dir/lib/libcom_err.so* \)\
#	-a \( -f $krb5_dir/lib/libk5crypto.a -o -f $krb5_dir/lib/libk5crypto.so* \)\
#	-a \( -f $krb5_dir/include/krb5.h \) ]; then
#	options="$options --with-krb5-flavor=MIT"
#    fi
#elif [ -d /usr/heimdal ]; then
#    krb5_dir=/usr/heimdal
#    if [ \( -f $krb5_dir/lib/libgssapi.a -o -f $krb5_dir/lib/libgssapi.so* \)\
#	-a \( -f $krb5_dir/lib/libkrb5.a -o -f $krb5_dir/lib/libkrb5.so* \)\
#	-a \( -f $krb5_dir/lib/libcom_err.a -o -f $krb5_dir/lib/libcom_err.so* \)\
#	-a \( -f $krb5_dir/include/krb5.h \) ]; then
#	options="$options --with-krb5-flavor=Heimdal"
#    fi
#fi
@


1.1.1.9
log
@Import OpenSSL 0.9.7d to address:

	1. Null-pointer assignment during SSL handshake
	2. Out-of-bounds read affects Kerberos ciphersuites
@
text
@d137 1
a137 1
		echo "${MACHINE}-hp-hpux1x"; exit 0
d413 3
a415 4
    # We check if the preprocessor symbol __LP64__ is defined...
    if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then
      : # __LP64__ has slipped through, it therefore is not defined
    else
d688 1
a688 1
	    OUT="hpux64-parisc2-gcc"
d703 1
a703 1
	     echo "         invoke './Configure hpux-ia64-cc' *manually*."
@


1.1.1.10
log
@import openssl-0.9.7f from ftp.openssl.org
@
text
@a25 1
EXE=""
d113 2
a114 2
    AIX:[3-9]:4:*)
	echo "${MACHINE}-ibm-aix"; exit 0
d117 2
a118 2
    AIX:*:[5-9]:*)
	echo "${MACHINE}-ibm-aix"; exit 0
d122 1
a122 1
	echo "${MACHINE}-ibm-aix3"; exit 0
a290 8
    VOS:*:*:i786)
     echo "i386-stratus-vos"; exit 0
     ;;

    VOS:*:*:*)
     echo "hppa1.1-stratus-vos"; exit 0
     ;;

d485 7
a491 7
	#CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
	#CPU=${CPU:-0}
	#if [ $CPU -ge 5000 ]; then
	#	options="$options -mips4"
	#else
	#	options="$options -mips3"
	#fi
d497 1
a497 1
	if [ "$TEST" = "false" -a -t 1 ]; then
d499 1
a499 1
	  (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
d501 7
a507 7
        #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
        #CPU=${CPU:-0}
        #if [ $CPU -ge 5000 ]; then
        #        options="$options -mips4"
        #else
        #        options="$options -mips3"
        #fi
d541 3
a543 8
	echo "WARNING! If you wish to build 64-bit library, then you have to"
	echo "         invoke './Configure linux-ppc64' *manually*."
	if [ "$TEST" = "false" -a -t 1 ]; then
	    echo "         You have about 5 seconds to press Ctrl-C to abort."
	    (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
	fi
	OUT="linux-ppc"
	;;
d554 1
a554 1
	if [ "$TEST" = "false" -a -t 1 ]; then
d556 1
a556 1
	  (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
d587 1
a587 3
  arm*b-*-linux2) OUT="linux-elf-arm"; options="$options -DB_ENDIAN" ;;
  arm*l-*-linux2) OUT="linux-elf-arm"; options="$options -DL_ENDIAN" ;;
  arm*-*-linux2)  OUT="linux-elf-arm" ;;
d611 1
a611 1
		if [ "$TEST" = "false" -a -t 1 ]; then
d613 1
a613 1
		  (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
d623 1
a623 1
		if [ "$TEST" = "false" -a -t 1 ]; then
d625 1
a625 1
		  (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
d631 1
a631 1
		if [ "$TEST" = "false" -a -t 1 ]; then
d633 1
a633 1
		  (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
a681 4
  *-*-vos)
	options="$options no-threads no-shared no-asm no-dso"
	EXE=".pm"
	OUT="vos-$CC" ;;
d705 1
a705 1
	     if [ "$TEST" = "false" -a -t 1 ]; then
d707 1
a707 1
		(trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
d717 1
a717 1
		if [ "$TEST" = "false" -a -t 1 ]; then
d719 1
a719 1
		  (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
a730 21
  *-aix)
	KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
	KERNEL_BITS=${KERNEL_BITS:-32}
	OBJECT_MODE=${OBJECT_MODE:-32}
	if [ "$CC" = "gcc" ]; then
	    OUT="aix-gcc"
	elif [ $OBJECT_MODE -eq 64 ]; then
	    echo 'Your $OBJECT_MODE was found to be set to 64' 
	    OUT="aix64-cc"
	else
	    OUT="aix-cc"
	    if [ $KERNEL_BITS -eq 64 ]; then
		echo "WARNING! If you wish to build 64-bit kit, then you have to"
		echo "         invoke './Configure aix64-cc' *manually*."
		if [ "$TEST" = "false" -a -t 1 ]; then
		    echo "         You have ~5 seconds to press Ctrl-C to abort."
		    (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
		fi
	    fi
	fi
	;;
d732 1
d809 2
a810 2
		if [ -f "$i/perl5$EXE" ] ; then
			PERL="$i/perl5$EXE"
d818 3
a820 3
		if [ -f "$i/perl$EXE" ] ; then
			if "$i/perl$EXE" -e 'exit($]<5.0)'; then
				PERL="$i/perl$EXE"
@


1.1.1.11
log
@from www.openssl.org
@
text
@a339 3
    MINGW*)
	echo "${MACHINE}-whatever-mingw"; echo 0;
	;;
d445 1
a445 1
  if [ $MACHINE != i86pc -a $CCVER -gt 40 ]; then
d657 1
a657 8
  *86*-*-solaris2)
	ISA64=`(isalist) 2>/dev/null | grep amd64`
	if [ "$ISA64" != "" ]; then
	    OUT="solaris64-x86_64-$CC"
	else
	    OUT="solaris-x86-$CC"
	fi
	;;
@


1.1.1.12
log
@from http://www.openssl.org/source
@
text
@d85 1
a85 1
		echo "whatever-whatever-unixware1"; exit 0
d87 1
a87 1
	    5*)
d96 2
a97 1
		    x[678]*)  echo "i586-sco-unixware7"; exit 0 ;;
d341 1
a341 1
	echo "${MACHINE}-whatever-mingw"; exit 0;
d455 2
a521 3
  ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
  ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
  i386-apple-darwin*) OUT="darwin-i386-cc" ;;
d523 1
a523 1
        ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo`
d525 1
a525 1
	*[678])	OUT="linux-alpha+bwx-$CC" ;;
d532 1
a532 1
	    *)			options="$options -mcpu=ev6";;
d536 16
d562 1
d564 3
d577 1
a577 1
	KARCH=`awk '/^type/{print$3;exit(0);}' /proc/cpuinfo`
d582 1
a582 1
	*)	OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
d584 3
a586 5
  parisc*-*-linux2)
	# 64-bit builds under parisc64 linux are not supported and
	# compiler is expected to generate 32-bit objects...
	CPUARCH=`awk '/cpu family/{print substr($5,1,3); exit(0);}' /proc/cpuinfo`
	CPUSCHEDULE=`awk '/^cpu.[ 	]*: PA/{print substr($3,3); exit(0);}' /proc/cpuinfo`
d599 1
a599 1
	CPUSCHEDULE=`echo $CPUSCHEDULE|sed -e 's/7300LC/7100LC/' -e 's/8.00/8000/'`
d602 7
a608 5
	options="$options -DB_ENDIAN -mschedule=$CPUSCHEDULE -march=$CPUARCH"
	OUT="linux-generic32" ;;
  arm*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
  arm*l-*-linux2) OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
  s390*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN -DNO_ASM" ;;
d610 1
a610 1
  *86-*-linux2) OUT="linux-elf"
d613 1
a613 1
	    options="$options -mcpu=pentium"
d616 1
a616 1
	    options="$options -mcpu=pentiumpro"
d619 1
a619 1
	    options="$options -mcpu=k6"
a622 1
  *-*-linux2) OUT="linux-generic32" ;;
a665 3
	    if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then
		options="$options no-sse2"
	    fi
d668 25
a692 24
  *-*-sunos4)		OUT="sunos-$CC" ;;

  *86*-*-bsdi4)		OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;;
  alpha*-*-*bsd*)	OUT="BSD-generic64; options="$options -DL_ENDIAN" ;;
  powerpc64-*-*bsd*)	OUT="BSD-generic64; options="$options -DB_ENDIAN" ;;
  sparc64-*-*bsd*)	OUT="BSD-sparc64" ;;
  ia64-*-*bsd*)		OUT="BSD-ia64" ;;
  amd64-*-*bsd*)	OUT="BSD-x86_64" ;;
  *86*-*-*bsd*)		# mimic ld behaviour when it's looking for libc...
			if [ -L /usr/lib/libc.so ]; then	# [Free|Net]BSD
			    libc=/usr/lib/libc.so
			else					# OpenBSD
			    # ld searches for highest libc.so.* and so do we
			    libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null`
			fi
			case "`(file -L $libc) 2>/dev/null`" in
			*ELF*)	OUT="BSD-x86-elf" ;;
			*)	OUT="BSD-x86"; options="$options no-sse2" ;;
			esac ;;
  *-*-*bsd*)		OUT="BSD-generic32" ;;

  *-*-osf)		OUT="osf1-alpha-cc" ;;
  *-*-tru64)		OUT="tru64-alpha-cc" ;;
  *-*-[Uu]nix[Ww]are7)
d694 1
a694 1
	  OUT="unixware-7-gcc" ; options="$options no-sse2"
d696 1
a696 1
	  OUT="unixware-7" ; options="$options no-sse2 -D__i386__"
d699 9
a707 2
  *-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0"; options="$options no-sse2 no-sha512" ;;
  *-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1"; options="$options no-sse2 no-sha512" ;;
d716 3
a718 1
	if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then
d720 5
d741 3
a743 1
	     OUT=${OUT:-"hpux-parisc2-${CC}"}
d753 1
a753 1
	     OUT="hpux-parisc-${CC}
d755 1
a755 1
	     OUT="hpux-parisc-${CC}
a780 5
	if (lsattr -E -O -l proc0 | grep -i powerpc) >/dev/null 2>&1; then
	    :	# this applies even to Power3 and later, as they return PowerPC_POWER[345]
	else
	    options="$options no-asm"
	fi
d808 1
a808 2
  echo "WARNING! Falling down to 'solaris-sparcv8-gcc'."
  echo "         Upgrade to gcc-2.8 or later."
d810 1
a810 1
  OUT=solaris-sparcv8-gcc
@


1.1.1.13
log
@ftp www.openssl.org
@
text
@d409 1
a409 1
  GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
@


1.1.1.14
log
@import 0.9.8d
@
text
@d720 1
a720 1
	     OUT="hpux-parisc-${CC}"
d722 1
a722 1
	     OUT="hpux-parisc-${CC}"
d797 1
a797 1
for i in aes bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
@


1.1.1.14.4.1
log
@Sync w/ NetBSD-4-RC_1
@
text
@d530 3
a532 3
	    EV5|EV45)		options="$options -march=ev5";;
	    EV56|PCA56)		options="$options -march=ev56";;
	    *)			options="$options -march=ev6";;
a587 3
  sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
  sh*-*-linux2)  OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
  m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
d593 1
a593 1
	    options="$options -march=pentium"
d596 1
a596 1
	    options="$options -march=pentiumpro"
d599 1
a599 1
	    options="$options -march=k6"
d777 1
a777 1
# gcc < 2.8 does not support -march=ultrasparc
@


1.1.1.14.2.1
log
@Pull up following (requested by mjf in ticket #828):

Sync OpenSSL with HEAD
@
text
@d530 3
a532 3
	    EV5|EV45)		options="$options -march=ev5";;
	    EV56|PCA56)		options="$options -march=ev56";;
	    *)			options="$options -march=ev6";;
a587 3
  sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
  sh*-*-linux2)  OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
  m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
d593 1
a593 1
	    options="$options -march=pentium"
d596 1
a596 1
	    options="$options -march=pentiumpro"
d599 1
a599 1
	    options="$options -march=k6"
d777 1
a777 1
# gcc < 2.8 does not support -march=ultrasparc
@


1.1.1.15
log
@Import OpenSSL 0.9.8e
@
text
@d530 3
a532 3
	    EV5|EV45)		options="$options -march=ev5";;
	    EV56|PCA56)		options="$options -march=ev56";;
	    *)			options="$options -march=ev6";;
a587 3
  sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
  sh*-*-linux2)  OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
  m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
d593 1
a593 1
	    options="$options -march=pentium"
d596 1
a596 1
	    options="$options -march=pentiumpro"
d599 1
a599 1
	    options="$options -march=k6"
d777 1
a777 1
# gcc < 2.8 does not support -march=ultrasparc
@


1.1.1.15.12.1
log
@Sync w/ -current. 34 merge conflicts to follow.
@
text
@a124 8
    BeOS:*:BePC)
    if [ -e /boot/develop/headers/be/bone ]; then
		echo "beos-x86-bone"; exit 0
	else
		echo "beos-x86-r5"; exit 0
	fi
	;;

d273 1
a273 1
		echo "i686-apple-darwin${VERSION}"
d520 2
a521 22
  ppc-apple-darwin*)
	ISA64=`(sysctl -n hw.optional.64bitops) 2>/dev/null`
	if [ "$ISA64" = "1" ]; then
	    echo "WARNING! If you wish to build 64-bit library, then you have to"
	    echo "         invoke './Configure darwin64-ppc-cc' *manually*."
	    if [ "$TEST" = "false" -a -t 1 ]; then
	      echo "         You have about 5 seconds to press Ctrl-C to abort."
	      (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
	    fi
	fi
	OUT="darwin-ppc-cc" ;;
  i?86-apple-darwin*)
	ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null`
	if [ "$ISA64" = "1" ]; then
	    echo "WARNING! If you wish to build 64-bit library, then you have to"
	    echo "         invoke './Configure darwin64-x86_86-cc' *manually*."
	    if [ "$TEST" = "false" -a -t 1 ]; then
	      echo "         You have about 5 seconds to press Ctrl-C to abort."
	      (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
	    fi
	fi
	OUT="darwin-i386-cc" ;;
d530 3
a532 3
	    EV5|EV45)		options="$options -mcpu=ev5";;
	    EV56|PCA56)		options="$options -mcpu=ev56";;
	    *)			options="$options -mcpu=ev6";;
d586 2
a587 2
  armv[1-3]*-*-linux2) OUT="linux-generic32" ;;
  arm*-*-linux2) OUT="linux-armv4" ;;
d591 1
a591 2
  s390-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
  s390x-*-linux2) OUT="linux-s390x" ;;
d607 1
a607 1
  sun4[uv]*-*-solaris2)
d658 2
a659 2
  alpha*-*-*bsd*)	OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;;
  powerpc64-*-*bsd*)	OUT="BSD-generic64"; options="$options -DB_ENDIAN" ;;
d751 1
a751 1
	if (lsattr -E -O -l `lsdev -c processor|awk '{print$1;exit}'` | grep -i powerpc) >/dev/null 2>&1; then
a764 1
  beos-*) OUT="$GUESSOS" ;;
d800 1
a800 1
for i in aes bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa seed sha
@


1.1.1.15.10.1
log
@sync with head.
@
text
@a124 8
    BeOS:*:BePC)
    if [ -e /boot/develop/headers/be/bone ]; then
		echo "beos-x86-bone"; exit 0
	else
		echo "beos-x86-r5"; exit 0
	fi
	;;

d273 1
a273 1
		echo "i686-apple-darwin${VERSION}"
d520 2
a521 22
  ppc-apple-darwin*)
	ISA64=`(sysctl -n hw.optional.64bitops) 2>/dev/null`
	if [ "$ISA64" = "1" ]; then
	    echo "WARNING! If you wish to build 64-bit library, then you have to"
	    echo "         invoke './Configure darwin64-ppc-cc' *manually*."
	    if [ "$TEST" = "false" -a -t 1 ]; then
	      echo "         You have about 5 seconds to press Ctrl-C to abort."
	      (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
	    fi
	fi
	OUT="darwin-ppc-cc" ;;
  i?86-apple-darwin*)
	ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null`
	if [ "$ISA64" = "1" ]; then
	    echo "WARNING! If you wish to build 64-bit library, then you have to"
	    echo "         invoke './Configure darwin64-x86_86-cc' *manually*."
	    if [ "$TEST" = "false" -a -t 1 ]; then
	      echo "         You have about 5 seconds to press Ctrl-C to abort."
	      (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
	    fi
	fi
	OUT="darwin-i386-cc" ;;
d530 3
a532 3
	    EV5|EV45)		options="$options -mcpu=ev5";;
	    EV56|PCA56)		options="$options -mcpu=ev56";;
	    *)			options="$options -mcpu=ev6";;
d586 2
a587 2
  armv[1-3]*-*-linux2) OUT="linux-generic32" ;;
  arm*-*-linux2) OUT="linux-armv4" ;;
d591 1
a591 2
  s390-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
  s390x-*-linux2) OUT="linux-s390x" ;;
d607 1
a607 1
  sun4[uv]*-*-solaris2)
d658 2
a659 2
  alpha*-*-*bsd*)	OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;;
  powerpc64-*-*bsd*)	OUT="BSD-generic64"; options="$options -DB_ENDIAN" ;;
d751 1
a751 1
	if (lsattr -E -O -l `lsdev -c processor|awk '{print$1;exit}'` | grep -i powerpc) >/dev/null 2>&1; then
a764 1
  beos-*) OUT="$GUESSOS" ;;
d800 1
a800 1
for i in aes bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa seed sha
@


1.1.1.16
log
@import today's snapshot! Hi <tls>
@
text
@a124 8
    BeOS:*:BePC)
    if [ -e /boot/develop/headers/be/bone ]; then
		echo "beos-x86-bone"; exit 0
	else
		echo "beos-x86-r5"; exit 0
	fi
	;;

d273 1
a273 1
		echo "i686-apple-darwin${VERSION}"
d520 2
a521 22
  ppc-apple-darwin*)
	ISA64=`(sysctl -n hw.optional.64bitops) 2>/dev/null`
	if [ "$ISA64" = "1" ]; then
	    echo "WARNING! If you wish to build 64-bit library, then you have to"
	    echo "         invoke './Configure darwin64-ppc-cc' *manually*."
	    if [ "$TEST" = "false" -a -t 1 ]; then
	      echo "         You have about 5 seconds to press Ctrl-C to abort."
	      (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
	    fi
	fi
	OUT="darwin-ppc-cc" ;;
  i?86-apple-darwin*)
	ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null`
	if [ "$ISA64" = "1" ]; then
	    echo "WARNING! If you wish to build 64-bit library, then you have to"
	    echo "         invoke './Configure darwin64-x86_86-cc' *manually*."
	    if [ "$TEST" = "false" -a -t 1 ]; then
	      echo "         You have about 5 seconds to press Ctrl-C to abort."
	      (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
	    fi
	fi
	OUT="darwin-i386-cc" ;;
d530 3
a532 3
	    EV5|EV45)		options="$options -mcpu=ev5";;
	    EV56|PCA56)		options="$options -mcpu=ev56";;
	    *)			options="$options -mcpu=ev6";;
d586 2
a587 2
  armv[1-3]*-*-linux2) OUT="linux-generic32" ;;
  arm*-*-linux2) OUT="linux-armv4" ;;
d591 1
a591 2
  s390-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
  s390x-*-linux2) OUT="linux-s390x" ;;
d607 1
a607 1
  sun4[uv]*-*-solaris2)
d658 2
a659 2
  alpha*-*-*bsd*)	OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;;
  powerpc64-*-*bsd*)	OUT="BSD-generic64"; options="$options -DB_ENDIAN" ;;
d751 1
a751 1
	if (lsattr -E -O -l `lsdev -c processor|awk '{print$1;exit}'` | grep -i powerpc) >/dev/null 2>&1; then
a764 1
  beos-*) OUT="$GUESSOS" ;;
d800 1
a800 1
for i in aes bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa seed sha
@
