For AIX 4.3 or above, allow the use of dlfcn.
[openssl.git] / config
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>.
9
10 # Original Apache Group comments on GuessOS
11
12 # Simple OS/Platform guesser. Similar to config.guess but
13 # much, much smaller. Since it was developed for use with
14 # Apache, it follows under Apache's regular licensing
15 # with one specific addition: Any changes or additions
16 # to this script should be Emailed to the Apache
17 # group (apache@apache.org) in general and to
18 # Jim Jagielski (jim@jaguNET.com) in specific.
19 #
20 # Be as similar to the output of config.guess/config.sub
21 # as possible.
22
23 PREFIX=""
24 SUFFIX=""
25 TEST="false"
26
27 # pick up any command line args to config
28 for i
29 do
30 case "$i" in 
31 -d*) PREFIX="debug-";;
32 -t*) TEST="true";;
33 -h*) TEST="true"; cat <<EOF
34 Usage: config [options]
35  -d     Add a debug- prefix to machine choice.
36  -t     Test mode, do not run the Configure perl script.
37  -h     This help.
38
39 Any other text will be passed to the Configure perl script.
40 See INSTALL for instructions.
41
42 EOF
43 ;;
44 *) options=$options" $i" ;;
45 esac
46 done
47
48 # First get uname entries that we use below
49
50 MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
51 RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
52 SYSTEM=`(uname -s) 2>/dev/null`  || SYSTEM="unknown"
53 VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
54
55
56 # Now test for ISC and SCO, since it is has a braindamaged uname.
57 #
58 # We need to work around FreeBSD 1.1.5.1 
59 (
60 XREL=`uname -X 2>/dev/null | grep "^Release" | awk '{print $3}'`
61 if [ "x$XREL" != "x" ]; then
62     if [ -f /etc/kconfig ]; then
63         case "$XREL" in
64             4.0|4.1)
65                     echo "${MACHINE}-whatever-isc4"; exit 0
66                 ;;
67         esac
68     else
69         case "$XREL" in
70             3.2v4.2)
71                 echo "whatever-whatever-sco3"; exit 0
72                 ;;
73             3.2v5.0*)
74                 echo "whatever-whatever-sco5"; exit 0
75                 ;;
76             4.2MP)
77                 if [ "x$VERSION" = "x2.1.1" ]; then
78                     echo "${MACHINE}-whatever-unixware211"; exit 0
79                 elif [ "x$VERSION" = "x2.1.2" ]; then
80                     echo "${MACHINE}-whatever-unixware212"; exit 0
81                 else
82                     echo "${MACHINE}-whatever-unixware2"; exit 0
83                 fi
84                 ;;
85             4.2)
86                 echo "whatever-whatever-unixware1"; exit 0
87                 ;;
88             5)
89                 if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
90                     echo "${MACHINE}-sco-unixware7"; exit 0
91                 fi
92                 ;;
93         esac
94     fi
95 fi
96 # Now we simply scan though... In most cases, the SYSTEM info is enough
97 #
98 case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
99     MPE/iX:*)
100         MACHINE=`echo "$MACHINE" | sed -e 's/-/_/g'`
101         echo "parisc-hp-MPE/iX"; exit 0
102         ;;
103     A/UX:*)
104         echo "m68k-apple-aux3"; exit 0
105         ;;
106
107     AIX:[3456789]:4:*)
108         echo "${MACHINE}-ibm-aix43"; exit 0
109         ;;
110
111     AIX:*:[56789]:*)
112         echo "${MACHINE}-ibm-aix43"; exit 0
113         ;;
114
115     AIX:*)
116         echo "${MACHINE}-ibm-aix"; exit 0
117         ;;
118
119     dgux:*)
120         echo "${MACHINE}-dg-dgux"; exit 0
121         ;;
122
123     HI-UX:*)
124         echo "${MACHINE}-hi-hiux"; exit 0
125         ;;
126
127     HP-UX:*)
128         HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
129         case "$HPUXVER" in
130             11.*)
131                 echo "${MACHINE}-hp-hpux11"; exit 0
132                 ;;
133             10.*)
134                 echo "${MACHINE}-hp-hpux10"; exit 0
135                 ;;
136             *)
137                 echo "${MACHINE}-hp-hpux"; exit 0
138                 ;;
139         esac
140         ;;
141
142     IRIX:5.*)
143         echo "mips2-sgi-irix"; exit 0
144         ;;
145
146     IRIX:6.*)
147         echo "mips3-sgi-irix"; exit 0
148         ;;
149
150     IRIX64:*)
151         echo "mips4-sgi-irix64"; exit 0
152         ;;
153
154     Linux:[2-9].*)
155         echo "${MACHINE}-whatever-linux2"; exit 0
156         ;;
157
158     Linux:1.*)
159         echo "${MACHINE}-whatever-linux1"; exit 0
160         ;;
161
162     GNU*)
163         echo "hurd-x86"; exit 0;
164         ;;
165
166     LynxOS:*)
167         echo "${MACHINE}-lynx-lynxos"; exit 0
168         ;;
169
170     BSD/OS:4.*)  # BSD/OS always says 386
171         echo "i486-whatever-bsdi4"; exit 0
172         ;;
173
174     BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*)
175         case `/sbin/sysctl -n hw.model` in
176             Pentium*)
177                 echo "i586-whatever-bsdi"; exit 0
178                 ;;
179             *)
180                 echo "i386-whatever-bsdi"; exit 0
181                 ;;
182             esac;
183         ;;
184
185     BSD/386:*|BSD/OS:*)
186         echo "${MACHINE}-whatever-bsdi"; exit 0
187         ;;
188
189     FreeBSD:*)
190         VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
191         MACH=`sysctl -n hw.model`
192         ARCH='whatever'
193         case ${MACH} in
194            *386*       ) MACH="i386"     ;;
195            *486*       ) MACH="i486"     ;;
196            Pentium\ II*) MACH="i686"     ;;
197            Pentium*    ) MACH="i586"     ;;
198            Alpha*      ) MACH="alpha"    ;;
199            *           ) MACH="$MACHINE" ;;
200         esac
201         case ${MACH} in
202            i[0-9]86 ) ARCH="pc" ;;
203         esac
204         echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
205         ;;
206
207     NetBSD:*:*:*386*)
208         echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
209         ;;
210
211     NetBSD:*)
212         echo "${MACHINE}-whatever-netbsd"; exit 0
213         ;;
214
215     OpenBSD:*)
216         echo "${MACHINE}-whatever-openbsd"; exit 0
217         ;;
218
219     OSF1:*:*:*alpha*)
220         echo "${MACHINE}-dec-osf"; exit 0
221         ;;
222
223     QNX:*)
224         case "$VERSION" in
225             4*)
226                 echo "${MACHINE}-whatever-qnx4"
227                 ;;
228             *)
229                 echo "${MACHINE}-whatever-qnx"
230                 ;;
231         esac
232         exit 0
233         ;;
234
235     Paragon*:*:*:*)
236         echo "i860-intel-osf1"; exit 0
237         ;;
238
239     Rhapsody:*)
240         echo "ppc-apple-rhapsody"; exit 0
241         ;;
242
243     Darwin:*)
244         case "$MACHINE" in
245             Power*)
246                 echo "ppc-apple-darwin${VERSION}"
247                 ;;
248             *)
249                 echo "i386-apple-darwin${VERSION}"
250                 ;;
251         esac
252         exit 0
253         ;;
254
255     SunOS:5.*)
256         echo "${MACHINE}-whatever-solaris2"; exit 0
257         ;;
258
259     SunOS:*)
260         echo "${MACHINE}-sun-sunos4"; exit 0
261         ;;
262
263     UNIX_System_V:4.*:*)
264         echo "${MACHINE}-whatever-sysv4"; exit 0
265         ;;
266
267     *:4*:R4*:m88k)
268         echo "${MACHINE}-whatever-sysv4"; exit 0
269         ;;
270
271     DYNIX/ptx:4*:*)
272         echo "${MACHINE}-whatever-sysv4"; exit 0
273         ;;
274
275     *:4.0:3.0:3[34]?? | *:4.0:3.0:3[34]??,*)
276         echo "i486-ncr-sysv4"; exit 0
277         ;;
278
279     ULTRIX:*)
280         echo "${MACHINE}-unknown-ultrix"; exit 0
281         ;;
282
283     SINIX*|ReliantUNIX*)
284         echo "${MACHINE}-siemens-sysv4"; exit 0
285         ;;
286
287     POSIX-BC*)
288         echo "${MACHINE}-siemens-sysv4"; exit 0   # Here, $MACHINE == "BS2000"
289         ;;
290
291     machten:*)
292        echo "${MACHINE}-tenon-${SYSTEM}"; exit 0;
293        ;;
294
295     library:*)
296         echo "${MACHINE}-ncr-sysv4"; exit 0
297         ;;
298
299     ConvexOS:*:11.0:*)
300         echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
301         ;;
302
303     NEWS-OS:4.*)
304         echo "mips-sony-newsos4"; exit 0;
305         ;;
306
307 esac
308
309 #
310 # Ugg. These are all we can determine by what we know about
311 # the output of uname. Be more creative:
312 #
313
314 # Do the Apollo stuff first. Here, we just simply assume
315 # that the existance of the /usr/apollo directory is proof
316 # enough
317 if [ -d /usr/apollo ]; then
318     echo "whatever-apollo-whatever"
319     exit 0
320 fi
321
322 # Now NeXT
323 ISNEXT=`hostinfo 2>/dev/null`
324 case "$ISNEXT" in
325     *'NeXT Mach 3.3'*)
326         echo "whatever-next-nextstep3.3"; exit 0
327         ;;
328     *NeXT*)
329         echo "whatever-next-nextstep"; exit 0
330         ;;
331 esac
332
333 # At this point we gone through all the one's
334 # we know of: Punt
335
336 echo "${MACHINE}-whatever-${SYSTEM}" 
337 exit 0
338 ) 2>/dev/null | (
339
340 # ---------------------------------------------------------------------------
341 # this is where the translation occurs into SSLeay terms
342 # ---------------------------------------------------------------------------
343
344 # figure out if gcc is available and if so we use it otherwise
345 # we fallback to whatever cc does on the system
346 GCCVER=`(gcc --version) 2>/dev/null`
347 if [ "$GCCVER" != "" ]; then
348   CC=gcc
349   # then strip off whatever prefix Cygnus prepends the number with...
350   GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'`
351   # peak single digit before and after first dot, e.g. 2.95.1 gives 29
352   GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
353 else
354   CC=cc
355 fi
356
357 if [ "$SYSTEM" = "SunOS" ]; then
358   # check for WorkShop C, expected output is "cc: blah-blah C x.x"
359   CCVER=`(cc -V 2>&1) 2>/dev/null | \
360         egrep -e '^cc: .* C [0-9]\.[0-9]' | \
361         sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
362   CCVER=${CCVER:-0}
363   if [ $CCVER -gt 40 ]; then
364     CC=cc       # overrides gcc!!!
365     if [ $CCVER -eq 50 ]; then
366       echo "WARNING! Detected WorkShop C 5.0. Do make sure you have"
367       echo "         patch #107357-01 or later applied."
368       sleep 5
369     fi
370   elif [ "$CC" = "cc" -a $CCVER -gt 0 ]; then
371     CC=sc3
372   fi
373 fi
374
375 if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
376   # check for Compaq C, expected output is "blah-blah C Vx.x"
377   CCCVER=`(ccc -V 2>&1) 2>/dev/null | \
378         egrep -e '.* C V[0-9]\.[0-9]' | \
379         sed 's/.* C V\([0-9]\)\.\([0-9]\).*/\1\2/'`
380   CCCVER=${CCCVER:-0}
381   if [ $CCCVER -gt 60 ]; then
382     CC=ccc      # overrides gcc!!! well, ccc outperforms inoticeably
383                 # only on hash routines and des, otherwise gcc (2.95)
384                 # keeps along rather tight...
385   fi
386 fi
387
388 GCCVER=${GCCVER:-0}
389 CCVER=${CCVER:-0}
390
391 # read the output of the embedded GuessOS 
392 read GUESSOS
393
394 echo Operating system: $GUESSOS
395
396 # now map the output into SSLeay terms ... really should hack into the
397 # script above so we end up with values in vars but that would take
398 # more time that I want to waste at the moment
399 case "$GUESSOS" in
400   mips2-sgi-irix)
401         CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
402         CPU=${CPU:-0}
403         if [ $CPU -ge 4000 ]; then
404                 options="$options -mips2"
405         fi
406         OUT="irix-$CC"
407         ;;
408   mips3-sgi-irix)
409         CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
410         CPU=${CPU:-0}
411         if [ $CPU -ge 5000 ]; then
412                 options="$options -mips4"
413         else
414                 options="$options -mips3"
415         fi
416         OUT="irix-mips3-$CC"
417         ;;
418   mips4-sgi-irix64)
419         echo "WARNING! If you wish to build 64-bit library, then you have to"
420         echo "         invoke './Configure irix64-mips4-$CC' *manually*."
421         echo "         Type return if you want to continue, Ctrl-C to abort."
422         if [ "$TEST" = "false" ]; then
423           read waste < /dev/tty
424         fi
425         CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
426         CPU=${CPU:-0}
427         if [ $CPU -ge 5000 ]; then
428                 options="$options -mips4"
429         else
430                 options="$options -mips3"
431         fi
432         OUT="irix-mips3-$CC"
433         ;;
434   alpha-*-linux2)
435         ISA=`awk '/cpu model/{print$4}' /proc/cpuinfo`
436         case ${ISA:-generic} in
437         *[67])  OUT="linux-alpha+bwx-$CC" ;;
438         *)      OUT="linux-alpha-$CC" ;;
439         esac
440         if [ "$CC" = "gcc" ]; then
441             case ${ISA:-generic} in
442             EV5|EV45)           options="$options -mcpu=ev5";;
443             EV56|PCA56)         options="$options -mcpu=ev56";;
444             EV6|EV67|PCA57)     options="$options -mcpu=ev6";;
445             esac
446         fi
447         ;;
448   mips-*-linux?)
449           cat >dummy.c <<EOF
450 #include <stdio.h>  /* for printf() prototype */
451         int main (argc, argv) int argc; char *argv[]; {
452 #ifdef __MIPSEB__
453   printf ("linux-%s\n", argv[1]);
454 #endif
455 #ifdef __MIPSEL__
456   printf ("linux-%sel\n", argv[1]);
457 #endif
458   return 0;
459 }
460 EOF
461         ${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
462         rm dummy dummy.c
463         ;;
464   ppc-*-linux2) OUT="linux-ppc" ;;
465   m68k-*-linux*) OUT="linux-m68k" ;;
466   ia64-*-linux?) OUT="linux-ia64" ;;
467   ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
468   ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
469   i386-apple-darwin*) OUT="darwin-i386-cc" ;;
470   sparc64-*-linux2)
471         #Before we can uncomment following lines we have to wait at least
472         #till 64-bit glibc for SPARC is operational:-(
473         #echo "WARNING! If you wish to build 64-bit library, then you have to"
474         #echo "         invoke './Configure linux64-sparcv9' *manually*."
475         #echo "         Type return if you want to continue, Ctrl-C to abort."
476         #read waste < /dev/tty
477         OUT="linux-sparcv9" ;;
478   sparc-*-linux2)
479         KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
480         case ${KARCH:-sun4} in
481         sun4u*) OUT="linux-sparcv9" ;;
482         sun4m)  OUT="linux-sparcv8" ;;
483         sun4d)  OUT="linux-sparcv8" ;;
484         *)      OUT="linux-sparcv7" ;;
485         esac ;;
486   arm*-*-linux2) OUT="linux-elf-arm" ;;
487   s390-*-linux2) OUT="linux-s390" ;;
488   *-*-linux2) OUT="linux-elf" ;;
489   *-*-linux1) OUT="linux-aout" ;;
490   sun4u*-*-solaris2)
491         ISA64=`(isalist) 2>/dev/null | grep sparcv9`
492         if [ "$ISA64" != "" -a "$CC" = "cc" -a $CCVER -ge 50 ]; then
493                 echo "WARNING! If you wish to build 64-bit library, then you have to"
494                 echo "         invoke './Configure solaris64-sparcv9-cc' *manually*."
495                 echo "         Type return if you want to continue, Ctrl-C to abort."
496                 if [ "$TEST" = "false" ]; then
497                   read waste < /dev/tty
498                 fi
499         fi
500         OUT="solaris-sparcv9-$CC" ;;
501   sun4m-*-solaris2)     OUT="solaris-sparcv8-$CC" ;;
502   sun4d-*-solaris2)     OUT="solaris-sparcv8-$CC" ;;
503   sun4*-*-solaris2)     OUT="solaris-sparcv7-$CC" ;;
504   *86*-*-solaris2) OUT="solaris-x86-$CC" ;;
505   *-*-sunos4) OUT="sunos-$CC" ;;
506   alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
507   *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
508   *-freebsd[1-2]*) OUT="FreeBSD" ;;
509   *86*-*-netbsd) OUT="NetBSD-x86" ;;
510   sun3*-*-netbsd) OUT="NetBSD-m68" ;;
511   *-*-netbsd) OUT="NetBSD-sparc" ;;
512   *86*-*-openbsd) OUT="OpenBSD-x86" ;;
513   alpha*-*-openbsd) OUT="OpenBSD-alpha" ;;
514   pmax*-*-openbsd) OUT="OpenBSD-mips" ;;
515   *-*-openbsd) OUT="OpenBSD" ;;
516   *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
517   *-*-osf) OUT="alpha-cc" ;;
518   *-*-unixware7) OUT="unixware-7" ;;
519   *-*-UnixWare7) OUT="unixware-7" ;;
520   *-*-Unixware7) OUT="unixware-7" ;;
521   *-*-unixware[1-2]*) OUT="unixware-2.0" ;;
522   *-*-UnixWare[1-2]*) OUT="unixware-2.0" ;;
523   *-*-Unixware[1-2]*) OUT="unixware-2.0" ;;
524   BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
525   RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
526   *-siemens-sysv4) OUT="SINIX" ;;
527   *-hpux1*)     OUT="hpux-parisc-$CC"
528                 options="$options -D_REENTRANT" ;;
529   *-hpux)       OUT="hpux-parisc-$CC" ;;
530   # these are all covered by the catchall below
531   # *-aix) OUT="aix-$CC" ;;
532   # *-dgux) OUT="dgux" ;;
533   mips-sony-newsos4) OUT="newsos4-gcc" ;;
534   *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
535 esac
536
537 # NB: This atalla support has been superceded by the ENGINE support
538 # That contains its own header and definitions anyway. Support can
539 # be enabled or disabled on any supported platform without external
540 # headers, eg. by adding the "hw-atalla" switch to ./config or
541 # perl Configure
542 #
543 # See whether we can compile Atalla support
544 #if [ -f /usr/include/atasi.h ]
545 #then
546 #  options="$options -DATALLA"
547 #fi
548
549 # gcc < 2.8 does not support -mcpu=ultrasparc
550 if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
551 then
552   echo "WARNING! Do consider upgrading to gcc-2.8 or later."
553   sleep 5
554   OUT=solaris-sparcv9-gcc27
555 fi
556 if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
557 then
558   echo "WARNING! Falling down to 'linux-sparcv8'."
559   echo "         Upgrade to gcc-2.8 or later."
560   sleep 5
561   OUT=linux-sparcv8
562 fi
563
564 case "$GUESSOS" in
565   i386-*) options="$options 386" ;;
566 esac
567
568 for i in bf cast des dh dsa ec hmac md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa sha
569 do
570   if [ ! -d crypto/$i ]
571   then
572     options="$options no-$i"
573   fi
574 done
575
576 # Discover Kerberos 5 (since it's still a prototype, we don't
577 # do any guesses yet, that's why this section is commented away.
578 #if [ -d /usr/kerberos ]; then
579 #    krb5_dir=/usr/kerberos
580 #    if [ \( -f $krb5_dir/lib/libgssapi_krb5.a -o -f $krb5_dir/lib/libgssapi_krb5.so* \)\
581 #       -a \( -f $krb5_dir/lib/libkrb5.a -o -f $krb5_dir/lib/libkrb5.so* \)\
582 #       -a \( -f $krb5_dir/lib/libcom_err.a -o -f $krb5_dir/lib/libcom_err.so* \)\
583 #       -a \( -f $krb5_dir/lib/libk5crypto.a -o -f $krb5_dir/lib/libk5crypto.so* \)\
584 #       -a \( -f $krb5_dir/include/krb5.h \) ]; then
585 #       options="$options --with-krb5-flavor=MIT"
586 #    fi
587 #elif [ -d /usr/heimdal ]; then
588 #    krb5_dir=/usr/heimdal
589 #    if [ \( -f $krb5_dir/lib/libgssapi.a -o -f $krb5_dir/lib/libgssapi.so* \)\
590 #       -a \( -f $krb5_dir/lib/libkrb5.a -o -f $krb5_dir/lib/libkrb5.so* \)\
591 #       -a \( -f $krb5_dir/lib/libcom_err.a -o -f $krb5_dir/lib/libcom_err.so* \)\
592 #       -a \( -f $krb5_dir/include/krb5.h \) ]; then
593 #       options="$options --with-krb5-flavor=Heimdal"
594 #    fi
595 #fi
596
597 if [ -z "$OUT" ]; then
598   OUT="$CC"
599 fi
600
601 if [ ".$PERL" = . ] ; then
602         for i in . `echo $PATH | sed 's/:/ /g'`; do
603                 if [ -f "$i/perl5" ] ; then
604                         PERL="$i/perl5"
605                         break;
606                 fi;
607         done
608 fi
609
610 if [ ".$PERL" = . ] ; then
611         for i in . `echo $PATH | sed 's/:/ /g'`; do
612                 if [ -f "$i/perl" ] ; then
613                         if "$i/perl" -e 'exit($]<5.0)'; then
614                                 PERL="$i/perl"
615                                 break;
616                         fi;
617                 fi;
618         done
619 fi
620
621 if [ ".$PERL" = . ] ; then
622         echo "You need Perl 5."
623         exit 1
624 fi
625
626 # run Configure to check to see if we need to specify the 
627 # compiler for the platform ... in which case we add it on
628 # the end ... otherwise we leave it off
629
630 $PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null
631 if [ $? = "0" ]; then
632   OUT="$OUT-$CC"
633 fi
634
635 OUT="$PREFIX$OUT"
636
637 $PERL ./Configure LIST | grep "$OUT" > /dev/null
638 if [ $? = "0" ]; then
639   echo Configuring for $OUT
640
641   if [ "$TEST" = "true" ]; then
642     echo $PERL ./Configure $OUT $options
643   else
644     $PERL ./Configure $OUT $options
645   fi
646 else
647   echo "This system ($OUT) is not supported. See file INSTALL for details."
648 fi
649 )