Deleted Added
full compact
config (59191) config (68651)
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>.

--- 57 unchanged lines hidden (view full) ---

66 fi
67 ;;
68 esac
69 fi
70fi
71# Now we simply scan though... In most cases, the SYSTEM info is enough
72#
73case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
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>.

--- 57 unchanged lines hidden (view full) ---

66 fi
67 ;;
68 esac
69 fi
70fi
71# Now we simply scan though... In most cases, the SYSTEM info is enough
72#
73case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
74 MPE/iX:*)
75 MACHINE=`echo "$MACHINE" | sed -e 's/-/_/g'`
76 echo "parisc-hp-MPE/iX"; exit 0
77 ;;
74 A/UX:*)
75 echo "m68k-apple-aux3"; exit 0
76 ;;
77
78 AIX:*)
79 echo "${MACHINE}-ibm-aix"; exit 0
80 ;;
81

--- 77 unchanged lines hidden (view full) ---

159 esac
160 case ${MACH} in
161 i[0-9]86 ) ARCH="pc" ;;
162 esac
163 echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
164 ;;
165
166 NetBSD:*:*:*386*)
78 A/UX:*)
79 echo "m68k-apple-aux3"; exit 0
80 ;;
81
82 AIX:*)
83 echo "${MACHINE}-ibm-aix"; exit 0
84 ;;
85

--- 77 unchanged lines hidden (view full) ---

163 esac
164 case ${MACH} in
165 i[0-9]86 ) ARCH="pc" ;;
166 esac
167 echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
168 ;;
169
170 NetBSD:*:*:*386*)
167 echo "`sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whateve\r-netbsd"; exit 0
171 echo "`/usr/sbin/sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
168 ;;
169
170 NetBSD:*)
171 echo "${MACHINE}-whatever-netbsd"; exit 0
172 ;;
173
174 OpenBSD:*)
175 echo "${MACHINE}-whatever-openbsd"; exit 0
176 ;;
177
178 OSF1:*:*:*alpha*)
179 echo "${MACHINE}-dec-osf"; exit 0
180 ;;
181
182 QNX:*)
183 case "$VERSION" in
172 ;;
173
174 NetBSD:*)
175 echo "${MACHINE}-whatever-netbsd"; exit 0
176 ;;
177
178 OpenBSD:*)
179 echo "${MACHINE}-whatever-openbsd"; exit 0
180 ;;
181
182 OSF1:*:*:*alpha*)
183 echo "${MACHINE}-dec-osf"; exit 0
184 ;;
185
186 QNX:*)
187 case "$VERSION" in
184 423)
185 echo "${MACHINE}-qssl-qnx32"
188 4*)
189 echo "${MACHINE}-whatever-qnx4"
186 ;;
187 *)
190 ;;
191 *)
188 echo "${MACHINE}-qssl-qnx"
192 echo "${MACHINE}-whatever-qnx"
189 ;;
190 esac
191 exit 0
192 ;;
193
194 Paragon*:*:*:*)
195 echo "i860-intel-osf1"; exit 0
196 ;;
197
198 Rhapsody:*)
199 echo "ppc-apple-rhapsody"; exit 0
200 ;;
201
202 SunOS:5.*)
193 ;;
194 esac
195 exit 0
196 ;;
197
198 Paragon*:*:*:*)
199 echo "i860-intel-osf1"; exit 0
200 ;;
201
202 Rhapsody:*)
203 echo "ppc-apple-rhapsody"; exit 0
204 ;;
205
206 SunOS:5.*)
203 echo "${MACHINE}-sun-solaris2"; exit 0
207 echo "${MACHINE}-whatever-solaris2"; exit 0
204 ;;
205
206 SunOS:*)
207 echo "${MACHINE}-sun-sunos4"; exit 0
208 ;;
209
210 UNIX_System_V:4.*:*)
211 echo "${MACHINE}-whatever-sysv4"; exit 0

--- 30 unchanged lines hidden (view full) ---

242 library:*)
243 echo "${MACHINE}-ncr-sysv4"; exit 0
244 ;;
245
246 ConvexOS:*:11.0:*)
247 echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
248 ;;
249
208 ;;
209
210 SunOS:*)
211 echo "${MACHINE}-sun-sunos4"; exit 0
212 ;;
213
214 UNIX_System_V:4.*:*)
215 echo "${MACHINE}-whatever-sysv4"; exit 0

--- 30 unchanged lines hidden (view full) ---

246 library:*)
247 echo "${MACHINE}-ncr-sysv4"; exit 0
248 ;;
249
250 ConvexOS:*:11.0:*)
251 echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
252 ;;
253
254 NEWS-OS:4.*)
255 echo "mips-sony-newsos4"; exit 0;
256 ;;
257
250esac
251
252#
253# Ugg. These are all we can determine by what we know about
254# the output of uname. Be more creative:
255#
256
257# Do the Apollo stuff first. Here, we just simply assume

--- 29 unchanged lines hidden (view full) ---

287PREFIX=""
288SUFFIX=""
289TEST="false"
290
291# pick up any command line args to config
292for i
293do
294case "$i" in
258esac
259
260#
261# Ugg. These are all we can determine by what we know about
262# the output of uname. Be more creative:
263#
264
265# Do the Apollo stuff first. Here, we just simply assume

--- 29 unchanged lines hidden (view full) ---

295PREFIX=""
296SUFFIX=""
297TEST="false"
298
299# pick up any command line args to config
300for i
301do
302case "$i" in
295# shared library support (behnke@trustcenter.de)
296-shared) SHARED=true;;
297-d*) PREFIX="debug-";;
298-t*) TEST="true";;
299-h*) TEST="true"; cat <<EOF
300Usage: config [options]
301 -d Add a debug- prefix to machine choice.
302 -t Test mode, do not run the Configure perl script.
303 -h This help.
304

--- 99 unchanged lines hidden (view full) ---

404 EV5|EV45) options="$options -mcpu=ev5";;
405 EV56|PCA56) options="$options -mcpu=ev56";;
406 EV6|EV67|PCA57) options="$options -mcpu=ev6";;
407 esac
408 fi
409 ;;
410 mips-*-linux?) OUT="linux-mips" ;;
411 ppc-*-linux2) OUT="linux-ppc" ;;
303-d*) PREFIX="debug-";;
304-t*) TEST="true";;
305-h*) TEST="true"; cat <<EOF
306Usage: config [options]
307 -d Add a debug- prefix to machine choice.
308 -t Test mode, do not run the Configure perl script.
309 -h This help.
310

--- 99 unchanged lines hidden (view full) ---

410 EV5|EV45) options="$options -mcpu=ev5";;
411 EV56|PCA56) options="$options -mcpu=ev56";;
412 EV6|EV67|PCA57) options="$options -mcpu=ev6";;
413 esac
414 fi
415 ;;
416 mips-*-linux?) OUT="linux-mips" ;;
417 ppc-*-linux2) OUT="linux-ppc" ;;
418 m68k-*-linux*) OUT="linux-m68k" ;;
412 ia64-*-linux?) OUT="linux-ia64" ;;
413 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
414 sparc64-*-linux2)
415 #Before we can uncomment following lines we have to wait at least
416 #till 64-bit glibc for SPARC is operational:-(
417 #echo "WARNING! If you wish to build 64-bit library, then you have to"
418 #echo " invoke './Configure linux64-sparcv9' *manually*."
419 #echo " Type Ctrl-C if you don't want to continue."
420 #read waste < /dev/tty
421 OUT="linux-sparcv9" ;;
422 sparc-*-linux2)
423 KARCH=`awk '/type/{print$3}' /proc/cpuinfo`
424 case ${KARCH:-sun4} in
425 sun4u*) OUT="linux-sparcv9" ;;
426 sun4m) OUT="linux-sparcv8" ;;
427 sun4d) OUT="linux-sparcv8" ;;
428 *) OUT="linux-sparcv7" ;;
429 esac ;;
419 ia64-*-linux?) OUT="linux-ia64" ;;
420 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
421 sparc64-*-linux2)
422 #Before we can uncomment following lines we have to wait at least
423 #till 64-bit glibc for SPARC is operational:-(
424 #echo "WARNING! If you wish to build 64-bit library, then you have to"
425 #echo " invoke './Configure linux64-sparcv9' *manually*."
426 #echo " Type Ctrl-C if you don't want to continue."
427 #read waste < /dev/tty
428 OUT="linux-sparcv9" ;;
429 sparc-*-linux2)
430 KARCH=`awk '/type/{print$3}' /proc/cpuinfo`
431 case ${KARCH:-sun4} in
432 sun4u*) OUT="linux-sparcv9" ;;
433 sun4m) OUT="linux-sparcv8" ;;
434 sun4d) OUT="linux-sparcv8" ;;
435 *) OUT="linux-sparcv7" ;;
436 esac ;;
437 arm*-*-linux2) OUT="linux-elf-arm" ;;
430 *-*-linux2) OUT="linux-elf" ;;
431 *-*-linux1) OUT="linux-aout" ;;
438 *-*-linux2) OUT="linux-elf" ;;
439 *-*-linux1) OUT="linux-aout" ;;
432 sun4u*-sun-solaris2)
440 sun4u*-*-solaris2)
433 ISA64=`(isalist) 2>/dev/null | grep sparcv9`
434 if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then
435 echo "WARNING! If you wish to build 64-bit library, then you have to"
436 echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
437 echo " Type Ctrl-C if you don't want to continue."
438 read waste < /dev/tty
439 fi
440 OUT="solaris-sparcv9-$CC" ;;
441 ISA64=`(isalist) 2>/dev/null | grep sparcv9`
442 if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then
443 echo "WARNING! If you wish to build 64-bit library, then you have to"
444 echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
445 echo " Type Ctrl-C if you don't want to continue."
446 read waste < /dev/tty
447 fi
448 OUT="solaris-sparcv9-$CC" ;;
441 sun4m-sun-solaris2) OUT="solaris-sparcv8-$CC" ;;
442 sun4d-sun-solaris2) OUT="solaris-sparcv8-$CC" ;;
443 sun4*-sun-solaris2) OUT="solaris-sparcv7-$CC" ;;
444 *86*-sun-solaris2) OUT="solaris-x86-$CC" ;;
449 sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
450 sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
451 sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;;
452 *86*-*-solaris2) OUT="solaris-x86-$CC" ;;
445 *-*-sunos4) OUT="sunos-$CC" ;;
446 alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
447 *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
448 *-freebsd[1-2]*) OUT="FreeBSD" ;;
449 *86*-*-netbsd) OUT="NetBSD-x86" ;;
450 sun3*-*-netbsd) OUT="NetBSD-m68" ;;
451 *-*-netbsd) OUT="NetBSD-sparc" ;;
452 *86*-*-openbsd) OUT="OpenBSD-x86" ;;

--- 12 unchanged lines hidden (view full) ---

465 RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
466 *-siemens-sysv4) OUT="SINIX" ;;
467 *-hpux1*) OUT="hpux-parisc-$CC"
468 options="$options -D_REENTRANT" ;;
469 *-hpux) OUT="hpux-parisc-$CC" ;;
470 # these are all covered by the catchall below
471 # *-aix) OUT="aix-$CC" ;;
472 # *-dgux) OUT="dgux" ;;
453 *-*-sunos4) OUT="sunos-$CC" ;;
454 alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
455 *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
456 *-freebsd[1-2]*) OUT="FreeBSD" ;;
457 *86*-*-netbsd) OUT="NetBSD-x86" ;;
458 sun3*-*-netbsd) OUT="NetBSD-m68" ;;
459 *-*-netbsd) OUT="NetBSD-sparc" ;;
460 *86*-*-openbsd) OUT="OpenBSD-x86" ;;

--- 12 unchanged lines hidden (view full) ---

473 RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
474 *-siemens-sysv4) OUT="SINIX" ;;
475 *-hpux1*) OUT="hpux-parisc-$CC"
476 options="$options -D_REENTRANT" ;;
477 *-hpux) OUT="hpux-parisc-$CC" ;;
478 # these are all covered by the catchall below
479 # *-aix) OUT="aix-$CC" ;;
480 # *-dgux) OUT="dgux" ;;
481 mips-sony-newsos4) OUT="newsos4-gcc" ;;
473 *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
474esac
475
476# See whether we can compile Atalla support
477if [ -f /usr/include/atasi.h ]
478then
479 options="$options -DATALLA"
480fi
481
482 *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
483esac
484
485# See whether we can compile Atalla support
486if [ -f /usr/include/atasi.h ]
487then
488 options="$options -DATALLA"
489fi
490
482#get some basic shared lib support (behnke@trustcenter.de)
483case "$OUT" in
484 solaris-*-gcc)
485 if [ "$SHARED" = "true" ]
486 then
487 options="$options -DPIC -fPIC"
488 fi
489 ;;
490esac
491
492# gcc < 2.8 does not support -mcpu=ultrasparc
493if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
494then
495 echo "WARNING! Do consider upgrading to gcc-2.8 or later."
496 sleep 5
497 OUT=solaris-sparcv9-gcc27
498fi
499if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
500then
501 echo "WARNING! Falling down to 'linux-sparcv8'."
502 echo " Upgrade to gcc-2.8 or later."
503 sleep 5
504 OUT=linux-sparcv8
505fi
491# gcc < 2.8 does not support -mcpu=ultrasparc
492if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
493then
494 echo "WARNING! Do consider upgrading to gcc-2.8 or later."
495 sleep 5
496 OUT=solaris-sparcv9-gcc27
497fi
498if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
499then
500 echo "WARNING! Falling down to 'linux-sparcv8'."
501 echo " Upgrade to gcc-2.8 or later."
502 sleep 5
503 OUT=linux-sparcv8
504fi
506# To start with $OUT is never i86pc-sun-solaris2. Secondly why
507# ban *all* assembler implementation if it can't stand only one,
508# SHA-0 implementation.
509#if [ "$OUT" = "i86pc-sun-solaris2" ]
510#then
511# ASM=`as -V /dev/null 2>&1`
512# case "$ASM" in
513# GNU*) ;;
514# *) 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." ;;
515# esac
516#fi
517
518case "$GUESSOS" in
519 i386-*) options="$options 386" ;;
520esac
521
522for i in bf cast des dh dsa hmac md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
523do
524 if [ ! -d crypto/$i ]

--- 39 unchanged lines hidden (view full) ---

564if [ $? = "0" ]; then
565 OUT="$OUT-$CC"
566fi
567
568OUT="$PREFIX$OUT"
569
570$PERL ./Configure LIST | grep "$OUT" > /dev/null
571if [ $? = "0" ]; then
505
506case "$GUESSOS" in
507 i386-*) options="$options 386" ;;
508esac
509
510for i in bf cast des dh dsa hmac md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
511do
512 if [ ! -d crypto/$i ]

--- 39 unchanged lines hidden (view full) ---

552if [ $? = "0" ]; then
553 OUT="$OUT-$CC"
554fi
555
556OUT="$PREFIX$OUT"
557
558$PERL ./Configure LIST | grep "$OUT" > /dev/null
559if [ $? = "0" ]; then
572 echo Configuring for $OUT
560 #echo Configuring for $OUT
573
574 if [ "$TEST" = "true" ]; then
575 echo $PERL ./Configure $OUT $options
576 else
577 $PERL ./Configure $OUT $options
578 fi
579else
580 echo "This system ($OUT) is not supported. See file INSTALL for details."
581fi
582)
561
562 if [ "$TEST" = "true" ]; then
563 echo $PERL ./Configure $OUT $options
564 else
565 $PERL ./Configure $OUT $options
566 fi
567else
568 echo "This system ($OUT) is not supported. See file INSTALL for details."
569fi
570)