]> git.ipfire.org Git - thirdparty/openssl.git/blame - config
VMS: add alias macros to avoid 31 character symbol name limit warning
[thirdparty/openssl.git] / config
CommitLineData
58964a49 1#!/bin/sh
d42d0a4d 2# Copyright 1998-2017 The OpenSSL Project Authors. All Rights Reserved.
58964a49 3#
44c8a5e2
RS
4# Licensed under the OpenSSL license (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
5d3bb220 9# OpenSSL config: determine the operating system and run ./Configure
44c8a5e2 10# Derived from minarch and GuessOS from Apache.
58964a49 11#
44c8a5e2 12# Do "config -h" for usage information.
06a2b07b 13SUFFIX=""
ffb261ff
RL
14DRYRUN="false"
15VERBOSE="false"
28a80034 16EXE=""
9fe2bb77 17THERE=`dirname $0`
06a2b07b
UM
18
19# pick up any command line args to config
20for i
21do
22case "$i" in
9e43c6b5 23-d*) options=$options" --debug";;
ffb261ff
RL
24-t*) DRYRUN="true" VERBOSE="true";;
25-v*) VERBOSE="true";;
26-h*) DRYRUN="true"; cat <<EOF
06a2b07b 27Usage: config [options]
b33c5ffe 28 -d Build with debugging when possible.
06a2b07b 29 -t Test mode, do not run the Configure perl script.
ffb261ff 30 -v Verbose mode, show the exact Configure call that is being made.
06a2b07b
UM
31 -h This help.
32
33Any other text will be passed to the Configure perl script.
34See INSTALL for instructions.
35
36EOF
37;;
a064c615
RL
38*) i=`echo "$i" | sed -e "s|'|'\\\\\\''|g"`
39 options="$options '$i'" ;;
06a2b07b
UM
40esac
41done
42
2ab92ae9
RL
43# Environment that's being passed to Configure
44__CNF_CPPDEFINES=
45__CNF_CPPINCLUDES=
46__CNF_CPPFLAGS=
47__CNF_CFLAGS=
48__CNF_CXXFLAGS=
49__CNF_LDFLAGS=
50__CNF_LDLIBS=
51
58964a49
RE
52# First get uname entries that we use below
53
19a0192b
DSH
54[ "$MACHINE" ] || MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
55[ "$RELEASE" ] || RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
56[ "$SYSTEM" ] || SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
57[ "$BUILD" ] || VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
58964a49 58
8f6dc9c5 59
58964a49
RE
60# Now test for ISC and SCO, since it is has a braindamaged uname.
61#
62# We need to work around FreeBSD 1.1.5.1
63(
64XREL=`uname -X 2>/dev/null | grep "^Release" | awk '{print $3}'`
65if [ "x$XREL" != "x" ]; then
66 if [ -f /etc/kconfig ]; then
67 case "$XREL" in
68 4.0|4.1)
69 echo "${MACHINE}-whatever-isc4"; exit 0
70 ;;
71 esac
72 else
73 case "$XREL" in
74 3.2v4.2)
75 echo "whatever-whatever-sco3"; exit 0
76 ;;
77 3.2v5.0*)
78 echo "whatever-whatever-sco5"; exit 0
79 ;;
80 4.2MP)
7c4e24af 81 case "x${VERSION}" in
9abff96b
AP
82 x2.0*) echo "whatever-whatever-unixware20"; exit 0 ;;
83 x2.1*) echo "whatever-whatever-unixware21"; exit 0 ;;
84 x2*) echo "whatever-whatever-unixware2"; exit 0 ;;
7c4e24af 85 esac
58964a49
RE
86 ;;
87 4.2)
88 echo "whatever-whatever-unixware1"; exit 0
89 ;;
14cc0aaf 90 5*)
7c4e24af
AP
91 case "x${VERSION}" in
92 # We hardcode i586 in place of ${MACHINE} for the
93 # following reason. The catch is that even though Pentium
94 # is minimum requirement for platforms in question,
95 # ${MACHINE} gets always assigned to i386. Now, problem
96 # with i386 is that it makes ./config pass 386 to
97 # ./Configure, which in turn makes make generate
98 # inefficient SHA-1 (for this moment) code.
14cc0aaf 99 x[678]*) echo "i586-sco-unixware7"; exit 0 ;;
7c4e24af 100 esac
9a5a7401 101 ;;
58964a49
RE
102 esac
103 fi
104fi
105# Now we simply scan though... In most cases, the SYSTEM info is enough
106#
107case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
108 A/UX:*)
109 echo "m68k-apple-aux3"; exit 0
110 ;;
111
76ef6ac9
AP
112 AIX:[3-9]:4:*)
113 echo "${MACHINE}-ibm-aix"; exit 0
114 ;;
115
dd558806 116 AIX:*:[5-9]:*)
76ef6ac9 117 echo "${MACHINE}-ibm-aix"; exit 0
36810177
RL
118 ;;
119
58964a49 120 AIX:*)
76ef6ac9 121 echo "${MACHINE}-ibm-aix3"; exit 0
58964a49
RE
122 ;;
123
58964a49
RE
124 HI-UX:*)
125 echo "${MACHINE}-hi-hiux"; exit 0
126 ;;
127
128 HP-UX:*)
129 HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
130 case "$HPUXVER" in
6d03b73e 131 1[0-9].*) # HPUX 10 and 11 targets are unified
0a4c8baf 132 echo "${MACHINE}-hp-hpux1x"; exit 0
58964a49
RE
133 ;;
134 *)
135 echo "${MACHINE}-hp-hpux"; exit 0
136 ;;
137 esac
138 ;;
139
1656ef29 140 IRIX:6.*)
da8fa72f 141 echo "mips3-sgi-irix"; exit 0
58964a49
RE
142 ;;
143
144 IRIX64:*)
da8fa72f 145 echo "mips4-sgi-irix64"; exit 0
58964a49
RE
146 ;;
147
148 Linux:[2-9].*)
149 echo "${MACHINE}-whatever-linux2"; exit 0
150 ;;
151
152 Linux:1.*)
153 echo "${MACHINE}-whatever-linux1"; exit 0
154 ;;
155
10a2975a
RL
156 GNU*)
157 echo "hurd-x86"; exit 0;
158 ;;
159
58964a49
RE
160 LynxOS:*)
161 echo "${MACHINE}-lynx-lynxos"; exit 0
162 ;;
163
a9ffce0a
BM
164 BSD/OS:4.*) # BSD/OS always says 386
165 echo "i486-whatever-bsdi4"; exit 0
0cceb1c7
BM
166 ;;
167
58964a49 168 BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*)
9c789ad1
UM
169 case `/sbin/sysctl -n hw.model` in
170 Pentium*)
8050bc79 171 echo "i586-whatever-bsdi"; exit 0
9c789ad1
UM
172 ;;
173 *)
8050bc79 174 echo "i386-whatever-bsdi"; exit 0
9c789ad1
UM
175 ;;
176 esac;
58964a49
RE
177 ;;
178
179 BSD/386:*|BSD/OS:*)
180 echo "${MACHINE}-whatever-bsdi"; exit 0
181 ;;
182
afd41c9f 183 FreeBSD:*:*:*386*)
44717474
RE
184 VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
185 MACH=`sysctl -n hw.model`
186 ARCH='whatever'
187 case ${MACH} in
188 *386* ) MACH="i386" ;;
189 *486* ) MACH="i486" ;;
190 Pentium\ II*) MACH="i686" ;;
191 Pentium* ) MACH="i586" ;;
44717474
RE
192 * ) MACH="$MACHINE" ;;
193 esac
194 case ${MACH} in
195 i[0-9]86 ) ARCH="pc" ;;
196 esac
197 echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
198 ;;
58964a49 199
2df7f11f 200 DragonFly:*)
201 echo "${MACHINE}-whatever-dragonfly"; exit 0
202 ;;
203
afd41c9f
RL
204 FreeBSD:*)
205 echo "${MACHINE}-whatever-freebsd"; exit 0
206 ;;
207
6e08e9e7
JD
208 Haiku:*)
209 echo "${MACHINE}-whatever-haiku"; exit 0
210 ;;
211
c6fdd7dc 212 NetBSD:*:*:*386*)
48d89b56 213 echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
58964a49
RE
214 ;;
215
216 NetBSD:*)
217 echo "${MACHINE}-whatever-netbsd"; exit 0
218 ;;
219
220 OpenBSD:*)
221 echo "${MACHINE}-whatever-openbsd"; exit 0
222 ;;
223
6c36f7a9
LJ
224 OpenUNIX:*)
225 echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
226 ;;
227
58964a49 228 OSF1:*:*:*alpha*)
6bc847e4
RL
229 OSFMAJOR=`echo ${RELEASE}| sed -e 's/^V\([0-9]*\)\..*$/\1/'`
230 case "$OSFMAJOR" in
231 4|5)
232 echo "${MACHINE}-dec-tru64"; exit 0
233 ;;
234 1|2|3)
235 echo "${MACHINE}-dec-osf"; exit 0
236 ;;
237 *)
238 echo "${MACHINE}-dec-osf"; exit 0
239 ;;
240 esac
58964a49
RE
241 ;;
242
243 QNX:*)
6a9af68b 244 case "$RELEASE" in
36124b10
BM
245 4*)
246 echo "${MACHINE}-whatever-qnx4"
58964a49 247 ;;
6a9af68b
LJ
248 6*)
249 echo "${MACHINE}-whatever-qnx6"
250 ;;
58964a49 251 *)
36124b10 252 echo "${MACHINE}-whatever-qnx"
58964a49
RE
253 ;;
254 esac
255 exit 0
256 ;;
257
258 Paragon*:*:*:*)
259 echo "i860-intel-osf1"; exit 0
260 ;;
261
0fad6cb7
AP
262 Rhapsody:*)
263 echo "ppc-apple-rhapsody"; exit 0
264 ;;
265
9b7a552f 266 Darwin:*)
70d70a3c
RL
267 case "$MACHINE" in
268 Power*)
269 echo "ppc-apple-darwin${VERSION}"
270 ;;
3dfcb6a0
RL
271 x86_64)
272 echo "x86_64-apple-darwin${VERSION}"
273 ;;
70d70a3c 274 *)
ca640568 275 echo "i686-apple-darwin${VERSION}"
70d70a3c
RL
276 ;;
277 esac
278 exit 0
9b7a552f
RL
279 ;;
280
58964a49 281 SunOS:5.*)
7228920c 282 echo "${MACHINE}-whatever-solaris2"; exit 0
58964a49
RE
283 ;;
284
285 SunOS:*)
286 echo "${MACHINE}-sun-sunos4"; exit 0
287 ;;
288
289 UNIX_System_V:4.*:*)
290 echo "${MACHINE}-whatever-sysv4"; exit 0
291 ;;
292
28a80034
RL
293 VOS:*:*:i786)
294 echo "i386-stratus-vos"; exit 0
295 ;;
296
297 VOS:*:*:*)
298 echo "hppa1.1-stratus-vos"; exit 0
299 ;;
300
58964a49
RE
301 *:4*:R4*:m88k)
302 echo "${MACHINE}-whatever-sysv4"; exit 0
303 ;;
304
305 DYNIX/ptx:4*:*)
306 echo "${MACHINE}-whatever-sysv4"; exit 0
307 ;;
308
309 *:4.0:3.0:3[34]?? | *:4.0:3.0:3[34]??,*)
310 echo "i486-ncr-sysv4"; exit 0
311 ;;
312
313 ULTRIX:*)
314 echo "${MACHINE}-unknown-ultrix"; exit 0
315 ;;
316
9231f477
UM
317 POSIX-BC*)
318 echo "${MACHINE}-siemens-sysv4"; exit 0 # Here, $MACHINE == "BS2000"
319 ;;
320
58964a49
RE
321 machten:*)
322 echo "${MACHINE}-tenon-${SYSTEM}"; exit 0;
323 ;;
324
325 library:*)
326 echo "${MACHINE}-ncr-sysv4"; exit 0
327 ;;
328
329 ConvexOS:*:11.0:*)
330 echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
331 ;;
332
41bee3e8
RL
333 # The following combinations are supported
334 # MINGW64* on x86_64 => mingw64
335 # MINGW32* on x86_64 => mingw
336 # MINGW32* on i?86 => mingw
337 #
338 # MINGW64* on i?86 isn't expected to work...
339 MINGW64*:*:*:x86_64)
340 echo "${MACHINE}-whatever-mingw64"; exit 0;
341 ;;
4848cbf1
AP
342 MINGW*)
343 echo "${MACHINE}-whatever-mingw"; exit 0;
344 ;;
d78e5298 345 CYGWIN*)
a717c110 346 echo "${MACHINE}-pc-cygwin"; exit 0
d78e5298
UM
347 ;;
348
2f6efd6a
DSH
349 vxworks*)
350 echo "${MACHINE}-whatever-vxworks"; exit 0;
351 ;;
58964a49
RE
352esac
353
354#
355# Ugg. These are all we can determine by what we know about
356# the output of uname. Be more creative:
357#
358
359# Do the Apollo stuff first. Here, we just simply assume
478b50cf 360# that the existence of the /usr/apollo directory is proof
58964a49
RE
361# enough
362if [ -d /usr/apollo ]; then
363 echo "whatever-apollo-whatever"
364 exit 0
365fi
366
367# Now NeXT
368ISNEXT=`hostinfo 2>/dev/null`
369case "$ISNEXT" in
8e9eae0f 370 *'NeXT Mach 3.3'*)
74a6c7f3
BM
371 echo "whatever-next-nextstep3.3"; exit 0
372 ;;
58964a49
RE
373 *NeXT*)
374 echo "whatever-next-nextstep"; exit 0
375 ;;
376esac
377
378# At this point we gone through all the one's
379# we know of: Punt
380
b1fe6b43 381echo "${MACHINE}-whatever-${SYSTEM}"
58964a49
RE
382exit 0
383) 2>/dev/null | (
384
385# ---------------------------------------------------------------------------
386# this is where the translation occurs into SSLeay terms
387# ---------------------------------------------------------------------------
388
7f625320 389# Only set CC if not supplied already
8b8d2dcc
AP
390if [ -z "$CROSS_COMPILE$CC" ]; then
391 GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null`
7f625320 392 if [ "$GCCVER" != "" ]; then
8b8d2dcc
AP
393 # then strip off whatever prefix egcs prepends the number with...
394 # Hopefully, this will work for any future prefixes as well.
395 GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
396 # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
397 # does give us what we want though, so we use that. We just just the
398 # major and minor version numbers.
399 # peak single digit before and after first dot, e.g. 2.95.1 gives 29
400 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
7f625320
BL
401 CC=gcc
402 else
403 CC=cc
404 fi
1656ef29 405fi
ac7b4261 406GCCVER=${GCCVER:-0}
1d4547a4
LJ
407if [ "$SYSTEM" = "HP-UX" ];then
408 # By default gcc is a ILP32 compiler (with long long == 64).
409 GCC_BITS="32"
410 if [ $GCCVER -ge 30 ]; then
411 # PA64 support only came in with gcc 3.0.x.
0a4c8baf
AP
412 # We check if the preprocessor symbol __LP64__ is defined...
413 if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then
414 : # __LP64__ has slipped through, it therefore is not defined
415 else
1d4547a4
LJ
416 GCC_BITS="64"
417 fi
418 fi
419fi
1656ef29 420if [ "$SYSTEM" = "SunOS" ]; then
ac7b4261
AP
421 if [ $GCCVER -ge 30 ]; then
422 # 64-bit ABI isn't officially supported in gcc 3.0, but it appears
423 # to be working, at the very least 'make test' passes...
424 if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then
425 GCC_ARCH="-m64"
426 else
427 GCC_ARCH="-m32"
428 fi
429 fi
bdf5e183 430 # check for WorkShop C, expected output is "cc: blah-blah C x.x"
1656ef29
AP
431 CCVER=`(cc -V 2>&1) 2>/dev/null | \
432 egrep -e '^cc: .* C [0-9]\.[0-9]' | \
433 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
434 CCVER=${CCVER:-0}
0abfd606 435 if [ $MACHINE != i86pc -a $CCVER -gt 40 ]; then
1656ef29
AP
436 CC=cc # overrides gcc!!!
437 if [ $CCVER -eq 50 ]; then
438 echo "WARNING! Detected WorkShop C 5.0. Do make sure you have"
439 echo " patch #107357-01 or later applied."
440 sleep 5
441 fi
744029c1 442 fi
58964a49
RE
443fi
444
726c2231 445if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
439909a0 446 (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
726c2231
AP
447fi
448
da8fa72f
AP
449CCVER=${CCVER:-0}
450
58964a49
RE
451# read the output of the embedded GuessOS
452read GUESSOS
453
b1fe6b43 454echo Operating system: $GUESSOS
58964a49
RE
455
456# now map the output into SSLeay terms ... really should hack into the
457# script above so we end up with values in vars but that would take
458# more time that I want to waste at the moment
459case "$GUESSOS" in
15c7adb0
DSH
460 uClinux*64*)
461 OUT=uClinux-dist64
462 ;;
463 uClinux*)
464 OUT=uClinux-dist
465 ;;
da8fa72f 466 mips3-sgi-irix)
da8fa72f
AP
467 OUT="irix-mips3-$CC"
468 ;;
469 mips4-sgi-irix64)
470 echo "WARNING! If you wish to build 64-bit library, then you have to"
9fe2bb77 471 echo " invoke '$THERE/Configure irix64-mips4-$CC' *manually*."
ffb261ff 472 if [ "$DRYRUN" = "false" -a -t 1 ]; then
ac7b4261 473 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 474 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
06a2b07b 475 fi
da8fa72f
AP
476 OUT="irix-mips3-$CC"
477 ;;
b7efa56a 478 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
d6c76457
AP
479 ppc-apple-darwin*)
480 ISA64=`(sysctl -n hw.optional.64bitops) 2>/dev/null`
af036845 481 if [ "$ISA64" = "1" -a -z "$KERNEL_BITS" ]; then
d6c76457 482 echo "WARNING! If you wish to build 64-bit library, then you have to"
9fe2bb77 483 echo " invoke '$THERE/Configure darwin64-ppc-cc' *manually*."
ffb261ff 484 if [ "$DRYRUN" = "false" -a -t 1 ]; then
d6c76457 485 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 486 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
d6c76457
AP
487 fi
488 fi
af036845
AP
489 if [ "$ISA64" = "1" -a "$KERNEL_BITS" = "64" ]; then
490 OUT="darwin64-ppc-cc"
491 else
492 OUT="darwin-ppc-cc"
493 fi ;;
ca640568 494 i?86-apple-darwin*)
0bb01b7d 495 ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null`
af036845 496 if [ "$ISA64" = "1" -a -z "$KERNEL_BITS" ]; then
0bb01b7d 497 echo "WARNING! If you wish to build 64-bit library, then you have to"
3dfcb6a0 498 echo " invoke 'KERNEL_BITS=64 $THERE/config $options'."
ffb261ff 499 if [ "$DRYRUN" = "false" -a -t 1 ]; then
0bb01b7d 500 echo " You have about 5 seconds to press Ctrl-C to abort."
8a4460c2 501 (trap "stty `stty -g`; exit 1" 2; stty -icanon min 0 time 50; read waste; exit 0) <&1 || exit
0bb01b7d
AP
502 fi
503 fi
af036845
AP
504 if [ "$ISA64" = "1" -a "$KERNEL_BITS" = "64" ]; then
505 OUT="darwin64-x86_64-cc"
506 else
507 OUT="darwin-i386-cc"
508 fi ;;
3dfcb6a0 509 x86_64-apple-darwin*)
3dfcb6a0
RL
510 if [ "$KERNEL_BITS" = "32" ]; then
511 OUT="darwin-i386-cc"
512 else
513 OUT="darwin64-x86_64-cc"
514 fi ;;
a2570242 515 armv6+7-*-iphoneos)
2ab92ae9
RL
516 __CNF_CFLAGS="$__CNF_CFLAGS -arch%20armv6 -arch%20armv7"
517 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch%20armv6 -arch%20armv7"
a2570242
AP
518 OUT="iphoneos-cross" ;;
519 *-*-iphoneos)
2ab92ae9
RL
520 __CNF_CFLAGS="$__CNF_CFLAGS -arch%20${MACHINE}"
521 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch%20${MACHINE}"
a2570242 522 OUT="iphoneos-cross" ;;
b06f7d9a
AP
523 arm64-*-iphoneos|*-*-ios64)
524 OUT="ios64-cross" ;;
93cd57a5 525 alpha-*-linux2)
b7efa56a 526 ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo`
bdf5e183 527 case ${ISA:-generic} in
b7efa56a 528 *[678]) OUT="linux-alpha+bwx-$CC" ;;
bdf5e183
AP
529 *) OUT="linux-alpha-$CC" ;;
530 esac
531 if [ "$CC" = "gcc" ]; then
532 case ${ISA:-generic} in
2ab92ae9
RL
533 EV5|EV45) __CNF_CFLAGS="$__CNF_CFLAGS -mcpu=ev5"
534 __CNF_CXXFLAGS="$__CNF_CFLAGS -mcpu=ev5";;
535 EV56|PCA56) __CNF_CFLAGS="$__CNF_CFLAGS -mcpu=ev56"
536 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -mcpu=ev56";;
537 *) __CNF_CFLAGS="$__CNF_CFLAGS -mcpu=ev6"
538 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -mcpu=ev6";;
bdf5e183
AP
539 esac
540 fi
541 ;;
76ef6ac9 542 ppc64-*-linux2)
78c3e205
AP
543 if [ -z "$KERNEL_BITS" ]; then
544 echo "WARNING! If you wish to build 64-bit library, then you have to"
9fe2bb77 545 echo " invoke '$THERE/Configure linux-ppc64' *manually*."
ffb261ff 546 if [ "$DRYRUN" = "false" -a -t 1 ]; then
78c3e205 547 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 548 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
78c3e205
AP
549 fi
550 fi
551 if [ "$KERNEL_BITS" = "64" ]; then
552 OUT="linux-ppc64"
553 else
554 OUT="linux-ppc"
2ab92ae9
RL
555 if (echo "__LP64__" | gcc -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null); then
556 :;
557 else
558 __CNF_CFLAGS="$__CNF_CFLAGS -m32"
559 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -m32"
560 fi
76ef6ac9 561 fi
76ef6ac9 562 ;;
f1982acc 563 ppc64le-*-linux2) OUT="linux-ppc64le" ;;
bdf5e183 564 ppc-*-linux2) OUT="linux-ppc" ;;
b8c59291
AP
565 mips64*-*-linux2)
566 echo "WARNING! If you wish to build 64-bit library, then you have to"
9fe2bb77 567 echo " invoke '$THERE/Configure linux64-mips64' *manually*."
ffb261ff 568 if [ "$DRYRUN" = "false" -a -t 1 ]; then
b8c59291 569 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 570 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
b8c59291
AP
571 fi
572 OUT="linux-mips64"
573 ;;
574 mips*-*-linux2) OUT="linux-mips32" ;;
2f6efd6a
DSH
575 ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;;
576 ppcgen-*-vxworks*) OUT="vxworks-ppcgen" ;;
1fb2e0f9
DSH
577 pentium-*-vxworks*) OUT="vxworks-pentium" ;;
578 simlinux-*-vxworks*) OUT="vxworks-simlinux" ;;
579 mips-*-vxworks*) OUT="vxworks-mips";;
010712ff 580 ia64-*-linux?) OUT="linux-ia64" ;;
a0618e3e 581 sparc64-*-linux2)
c14b4d6b 582 echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI"
6d4ac67a 583 echo " and wish to build 64-bit library, then you have to"
9fe2bb77 584 echo " invoke '$THERE/Configure linux64-sparcv9' *manually*."
ffb261ff 585 if [ "$DRYRUN" = "false" -a -t 1 ]; then
6d4ac67a 586 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 587 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
6d4ac67a 588 fi
a0618e3e 589 OUT="linux-sparcv9" ;;
da8fa72f 590 sparc-*-linux2)
b7efa56a 591 KARCH=`awk '/^type/{print$3;exit(0);}' /proc/cpuinfo`
a0618e3e
AP
592 case ${KARCH:-sun4} in
593 sun4u*) OUT="linux-sparcv9" ;;
594 sun4m) OUT="linux-sparcv8" ;;
595 sun4d) OUT="linux-sparcv8" ;;
2ab92ae9
RL
596 *) OUT="linux-generic32";
597 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DB_ENDIAN" ;;
a0618e3e 598 esac ;;
57a68b21
AP
599 parisc*-*-linux2)
600 # 64-bit builds under parisc64 linux are not supported and
601 # compiler is expected to generate 32-bit objects...
602 CPUARCH=`awk '/cpu family/{print substr($5,1,3); exit(0);}' /proc/cpuinfo`
603 CPUSCHEDULE=`awk '/^cpu.[ ]*: PA/{print substr($3,3); exit(0);}' /proc/cpuinfo`
95f8c719
RL
604
605 # ??TODO ?? Model transformations
606 # 0. CPU Architecture for the 1.1 processor has letter suffixes. We strip that off
607 # assuming no further arch. identification will ever be used by GCC.
608 # 1. I'm most concerned about whether is a 7300LC is closer to a 7100 versus a 7100LC.
609 # 2. The variant 64-bit processors cause concern should GCC support explicit schedulers
610 # for these chips in the future.
611 # PA7300LC -> 7100LC (1.1)
612 # PA8200 -> 8000 (2.0)
613 # PA8500 -> 8000 (2.0)
614 # PA8600 -> 8000 (2.0)
615
57a68b21 616 CPUSCHEDULE=`echo $CPUSCHEDULE|sed -e 's/7300LC/7100LC/' -e 's/8.00/8000/'`
95f8c719
RL
617 # Finish Model transformations
618
2ab92ae9
RL
619 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DB_ENDIAN"
620 __CNF_CFLAGS="$__CNF_CFLAGS -mschedule=$CPUSCHEDULE -march=$CPUARCH"
621 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -mschedule=$CPUSCHEDULE -march=$CPUARCH"
b7efa56a 622 OUT="linux-generic32" ;;
2c3ee162 623 armv[1-3]*-*-linux2) OUT="linux-generic32" ;;
2ab92ae9
RL
624 armv[7-9]*-*-linux2) OUT="linux-armv4"
625 __CNF_CFLAGS="$__CNF_CFLAGS -march=armv7-a"
626 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -march=armv7-a"
627 ;;
7722e53f 628 arm*-*-linux2) OUT="linux-armv4" ;;
e8d93e34 629 aarch64-*-linux2) OUT="linux-aarch64" ;;
2ab92ae9
RL
630 sh*b-*-linux2) OUT="linux-generic32";
631 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DB_ENDIAN" ;;
632 sh*-*-linux2) OUT="linux-generic32";
633 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DL_ENDIAN" ;;
634 m68k*-*-linux2) OUT="linux-generic32";
635 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DB_ENDIAN" ;;
636 s390-*-linux2) OUT="linux-generic32";
637 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DB_ENDIAN" ;;
e822c756
AP
638 s390x-*-linux2)
639 # To be uncommented when glibc bug is fixed, see Configure...
640 #if egrep -e '^features.* highgprs' /proc/cpuinfo >/dev/null ; then
641 # echo "WARNING! If you wish to build \"highgprs\" 32-bit library, then you"
642 # echo " have to invoke './Configure linux32-s390x' *manually*."
ffb261ff 643 # if [ "$DRYRUN" = "false" -a -t -1 ]; then
e822c756 644 # echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 645 # (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
e822c756
AP
646 # fi
647 #fi
648 OUT="linux64-s390x"
649 ;;
c5c0cac5
AP
650 x86_64-*-linux?)
651 if $CC -dM -E -x c /dev/null 2>&1 | grep -q ILP32 > /dev/null; then
652 OUT="linux-x32"
653 else
654 OUT="linux-x86_64"
655 fi ;;
27a451e3
RL
656 *86-*-linux2)
657 # On machines where the compiler understands -m32, prefer a
658 # config target that uses it
659 if $CC -m32 -E -x c /dev/null > /dev/null 2>&1; then
660 OUT="linux-x86"
661 else
662 OUT="linux-elf"
663 fi ;;
8f3bc096
AP
664 *86-*-linux1) OUT="linux-aout" ;;
665 *-*-linux?) OUT="linux-generic32" ;;
160065c5 666 sun4[uv]*-*-solaris2)
cc8aa08b 667 OUT="solaris-sparcv9-$CC"
74c2db31 668 ISA64=`(isainfo) 2>/dev/null | grep sparcv9`
bba391a9 669 if [ "$ISA64" != "" -a "$KERNEL_BITS" = "" ]; then
ac7b4261 670 if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then
1656ef29 671 echo "WARNING! If you wish to build 64-bit library, then you have to"
9fe2bb77 672 echo " invoke '$THERE/Configure solaris64-sparcv9-cc' *manually*."
ffb261ff 673 if [ "$DRYRUN" = "false" -a -t 1 ]; then
ac7b4261 674 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 675 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
06a2b07b 676 fi
ac7b4261
AP
677 elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then
678 # $GCC_ARCH denotes default ABI chosen by compiler driver
679 # (first one found on the $PATH). I assume that user
680 # expects certain consistency with the rest of his builds
681 # and therefore switch over to 64-bit. <appro>
682 OUT="solaris64-sparcv9-gcc"
683 echo "WARNING! If you wish to build 32-bit library, then you have to"
9fe2bb77 684 echo " invoke '$THERE/Configure solaris-sparcv9-gcc' *manually*."
ffb261ff 685 if [ "$DRYRUN" = "false" -a -t 1 ]; then
ac7b4261 686 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 687 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
ac7b4261
AP
688 fi
689 elif [ "$GCC_ARCH" = "-m32" ]; then
690 echo "NOTICE! If you *know* that your GNU C supports 64-bit/V9 ABI"
691 echo " and wish to build 64-bit library, then you have to"
9fe2bb77 692 echo " invoke '$THERE/Configure solaris64-sparcv9-gcc' *manually*."
ffb261ff 693 if [ "$DRYRUN" = "false" -a -t 1 ]; then
ac7b4261 694 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 695 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
ac7b4261
AP
696 fi
697 fi
1656ef29 698 fi
bba391a9
AP
699 if [ "$ISA64" != "" -a "$KERNEL_BITS" = "64" ]; then
700 OUT="solaris64-sparcv9-$CC"
701 fi
ac7b4261 702 ;;
7228920c
BM
703 sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
704 sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
705 sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;;
0abfd606 706 *86*-*-solaris2)
74c2db31 707 ISA64=`(isainfo) 2>/dev/null | grep amd64`
bba391a9 708 if [ "$ISA64" != "" -a ${KERNEL_BITS:-64} -eq 64 ]; then
0abfd606
AP
709 OUT="solaris64-x86_64-$CC"
710 else
711 OUT="solaris-x86-$CC"
e4c9b85e
AP
712 if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then
713 options="$options no-sse2"
714 fi
0abfd606
AP
715 fi
716 ;;
b7efa56a
AP
717 *-*-sunos4) OUT="sunos-$CC" ;;
718
2ab92ae9
RL
719 *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2";
720 __CNF_LDFLAGS="$__CNF_LDFLAGS -ldl" ;;
721 alpha*-*-*bsd*) OUT="BSD-generic64";
722 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DL_ENDIAN" ;;
723 powerpc64-*-*bsd*) OUT="BSD-generic64";
724 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DB_ENDIAN" ;;
b7efa56a
AP
725 sparc64-*-*bsd*) OUT="BSD-sparc64" ;;
726 ia64-*-*bsd*) OUT="BSD-ia64" ;;
2df7f11f 727 x86_64-*-dragonfly*) OUT="BSD-x86_64" ;;
b7efa56a 728 amd64-*-*bsd*) OUT="BSD-x86_64" ;;
8b452002
AP
729 *86*-*-*bsd*) # mimic ld behaviour when it's looking for libc...
730 if [ -L /usr/lib/libc.so ]; then # [Free|Net]BSD
731 libc=/usr/lib/libc.so
732 else # OpenBSD
733 # ld searches for highest libc.so.* and so do we
c256e69d 734 libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null`
8b452002
AP
735 fi
736 case "`(file -L $libc) 2>/dev/null`" in
e1892f23 737 *ELF*) OUT="BSD-x86-elf" ;;
e4c9b85e 738 *) OUT="BSD-x86"; options="$options no-sse2" ;;
e1892f23 739 esac ;;
8f3bc096
AP
740 *-*-*bsd*) OUT="BSD-generic32" ;;
741
6e08e9e7
JD
742 x86_64-*-haiku) OUT="haiku-x86_64" ;;
743 *-*-haiku) OUT="haiku-x86" ;;
b7efa56a
AP
744
745 *-*-osf) OUT="osf1-alpha-cc" ;;
746 *-*-tru64) OUT="tru64-alpha-cc" ;;
14cc0aaf 747 *-*-[Uu]nix[Ww]are7)
cb42ce0b 748 if [ "$CC" = "gcc" ]; then
14cc0aaf 749 OUT="unixware-7-gcc" ; options="$options no-sse2"
cb42ce0b 750 else
2ab92ae9
RL
751 OUT="unixware-7" ; options="$options no-sse2"
752 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -D__i386__"
cb42ce0b
LJ
753 fi
754 ;;
5b737a07
AP
755 *-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0"; options="$options no-sse2 no-sha512" ;;
756 *-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1"; options="$options no-sse2 no-sha512" ;;
28a80034
RL
757 *-*-vos)
758 options="$options no-threads no-shared no-asm no-dso"
759 EXE=".pm"
760 OUT="vos-$CC" ;;
9231f477 761 BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
6d03b73e 762 *-hpux1*)
12470927
AP
763 if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then
764 OUT="hpux64-parisc2-gcc"
1d4547a4 765 fi
9fa8f3a6 766 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
6d03b73e
AP
767 KERNEL_BITS=${KERNEL_BITS:-32}
768 CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
769 CPU_VERSION=${CPU_VERSION:-0}
770 # See <sys/unistd.h> for further info on CPU_VERSION.
771 if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU
bdd45497
DSH
772 if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
773 OUT="hpux64-ia64-cc"
774 else
775 OUT="hpux-ia64-cc"
776 fi
6d03b73e 777 elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU
12470927 778 OUT=${OUT:-"hpux-parisc2-${CC}"}
6d03b73e
AP
779 if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
780 echo "WARNING! If you wish to build 64-bit library then you have to"
9fe2bb77 781 echo " invoke '$THERE/Configure hpux64-parisc2-cc' *manually*."
ffb261ff 782 if [ "$DRYRUN" = "false" -a -t 1 ]; then
6d03b73e 783 echo " You have about 5 seconds to press Ctrl-C to abort."
a87c159f 784 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
6d03b73e
AP
785 fi
786 fi
74acf1c4
AP
787 # PA-RISC 2.0 is no longer supported as separate 32-bit
788 # target. This is compensated for by run-time detection
789 # in most critical assembly modules and taking advantage
d8292af4 790 # of 2.0 architecture in PA-RISC 1.1 build.
74acf1c4 791 OUT="hpux-parisc1_1-${CC}"
6d03b73e 792 elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU
74acf1c4 793 OUT="hpux-parisc1_1-${CC}"
6d03b73e 794 elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU
83ed4914 795 OUT="hpux-parisc-${CC}"
6d03b73e
AP
796 else # Motorola(?) CPU
797 OUT="hpux-$CC"
798 fi
2ab92ae9 799 __CNF_CPPFLAGS="$__CNF_CPPFLAGS -D_REENTRANT" ;;
bcba6cc6 800 *-hpux) OUT="hpux-parisc-$CC" ;;
76ef6ac9 801 *-aix)
9fa8f3a6 802 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
dd558806 803 KERNEL_BITS=${KERNEL_BITS:-32}
76ef6ac9 804 OBJECT_MODE=${OBJECT_MODE:-32}
dd558806
AP
805 if [ "$CC" = "gcc" ]; then
806 OUT="aix-gcc"
a0e4a8e1
DSH
807 if [ $OBJECT_MODE -eq 64 ]; then
808 echo 'Your $OBJECT_MODE was found to be set to 64'
809 OUT="aix64-gcc"
810 fi
76ef6ac9
AP
811 elif [ $OBJECT_MODE -eq 64 ]; then
812 echo 'Your $OBJECT_MODE was found to be set to 64'
813 OUT="aix64-cc"
dd558806 814 else
76ef6ac9
AP
815 OUT="aix-cc"
816 if [ $KERNEL_BITS -eq 64 ]; then
817 echo "WARNING! If you wish to build 64-bit kit, then you have to"
9fe2bb77 818 echo " invoke '$THERE/Configure aix64-cc' *manually*."
ffb261ff 819 if [ "$DRYRUN" = "false" -a -t 1 ]; then
76ef6ac9 820 echo " You have ~5 seconds to press Ctrl-C to abort."
a87c159f 821 (trap "stty `stty -g`; exit 0" 2 0; stty -icanon min 0 time 50; read waste) <&1
76ef6ac9
AP
822 fi
823 fi
dd558806 824 fi
0a29f511 825 if (lsattr -E -O -l `lsdev -c processor|awk '{print$1;exit}'` | grep -i powerpc) >/dev/null 2>&1; then
60dd0857
AP
826 : # this applies even to Power3 and later, as they return PowerPC_POWER[345]
827 else
828 options="$options no-asm"
829 fi
dd558806 830 ;;
58964a49 831 # these are all covered by the catchall below
3f542969 832 i[3456]86-*-cygwin) OUT="Cygwin-x86" ;;
a717c110 833 *-*-cygwin) OUT="Cygwin-${MACHINE}" ;;
4f33534c
DSH
834 x86pc-*-qnx6) OUT="QNX6-i386" ;;
835 *-*-qnx6) OUT="QNX6" ;;
8fcdb1e6 836 x86-*-android|i?86-*-android) OUT="android-x86" ;;
893fe73a 837 armv[7-9]*-*-android)
2ab92ae9
RL
838 OUT="android-armeabi"
839 __CNF_CFLAGS="$__CNF_CFLAGS -march=armv7-a"
840 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -march=armv7-a";;
893fe73a 841 arm*-*-android) OUT="android-armeabi" ;;
58964a49 842 *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
5d3bb220
UM
843esac
844
478b50cf 845# NB: This atalla support has been superseded by the ENGINE support
5270e702
RL
846# That contains its own header and definitions anyway. Support can
847# be enabled or disabled on any supported platform without external
848# headers, eg. by adding the "hw-atalla" switch to ./config or
849# perl Configure
850#
bd03b99b 851# See whether we can compile Atalla support
5270e702
RL
852#if [ -f /usr/include/atasi.h ]
853#then
2ab92ae9 854# __CNF_CPPFLAGS="$__CNF_CPPFLAGS -DATALLA"
5270e702 855#fi
bd03b99b 856
1fb2e0f9
DSH
857if [ -n "$CONFIG_OPTIONS" ]; then
858 options="$options $CONFIG_OPTIONS"
859fi
860
8b8d2dcc 861if expr "$options" : '.*no\-asm' > /dev/null; then :; else
2ab92ae9
RL
862 if sh -c "$CROSS_COMPILE${CC:-gcc} -Wa,--help -c -o /tmp/null.$$.o -x assembler /dev/null && rm /tmp/null.$$.o" 2>&1 | \
863 grep \\--noexecstack >/dev/null; then
864 __CNF_CFLAGS="$__CNF_CFLAGS -Wa,--noexecstack"
865 __CNF_CXXFLAGS="$__CNF_CXXFLAGS -Wa,--noexecstack"
866 fi
1fb2e0f9 867fi
2966c2ec 868
9540ccdf 869# gcc < 2.8 does not support -march=ultrasparc
1656ef29 870if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
b6735832 871then
d0590fe6
AP
872 echo "WARNING! Falling down to 'solaris-sparcv8-gcc'."
873 echo " Upgrade to gcc-2.8 or later."
1656ef29 874 sleep 5
d0590fe6 875 OUT=solaris-sparcv8-gcc
a0618e3e
AP
876fi
877if [ "$OUT" = "linux-sparcv9" -a $GCCVER -lt 28 ]
878then
879 echo "WARNING! Falling down to 'linux-sparcv8'."
880 echo " Upgrade to gcc-2.8 or later."
1656ef29 881 sleep 5
a0618e3e 882 OUT=linux-sparcv8
b6735832
UM
883fi
884
5d3bb220
UM
885case "$GUESSOS" in
886 i386-*) options="$options 386" ;;
58964a49
RE
887esac
888
a0c3e4fa 889for i in aes aria bf camellia cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 ripemd rsa seed sha sm3 sm4
9231f477 890do
9fe2bb77 891 if [ ! -d $THERE/crypto/$i ]
9231f477
UM
892 then
893 options="$options no-$i"
894 fi
895done
896
58964a49
RE
897if [ -z "$OUT" ]; then
898 OUT="$CC"
899fi
900
99aab161
UM
901if [ ".$PERL" = . ] ; then
902 for i in . `echo $PATH | sed 's/:/ /g'`; do
28a80034
RL
903 if [ -f "$i/perl5$EXE" ] ; then
904 PERL="$i/perl5$EXE"
99aab161
UM
905 break;
906 fi;
907 done
908fi
909
910if [ ".$PERL" = . ] ; then
911 for i in . `echo $PATH | sed 's/:/ /g'`; do
28a80034
RL
912 if [ -f "$i/perl$EXE" ] ; then
913 if "$i/perl$EXE" -e 'exit($]<5.0)'; then
914 PERL="$i/perl$EXE"
a5a47e4a
UM
915 break;
916 fi;
99aab161
UM
917 fi;
918 done
919fi
920
a5a47e4a 921if [ ".$PERL" = . ] ; then
99aab161
UM
922 echo "You need Perl 5."
923 exit 1
924fi
925
58964a49
RE
926# run Configure to check to see if we need to specify the
927# compiler for the platform ... in which case we add it on
928# the end ... otherwise we leave it off
99aab161 929
9fe2bb77 930$PERL $THERE/Configure LIST | grep "$OUT-$CC" > /dev/null
58964a49
RE
931if [ $? = "0" ]; then
932 OUT="$OUT-$CC"
933fi
934
d2a5c40d 935OUT="$OUT"
58964a49 936
9fe2bb77 937$PERL $THERE/Configure LIST | grep "$OUT" > /dev/null
b1fe6b43 938if [ $? = "0" ]; then
ffb261ff 939 if [ "$VERBOSE" = "true" ]; then
2ab92ae9
RL
940 echo /usr/bin/env \
941 __CNF_CPPDEFINES="'$__CNF_CPPDEFINES'" \
942 __CNF_CPPINCLUDES="'$__CNF_CPPINCLUDES'" \
943 __CNF_CPPFLAGS="'$__CNF_CPPFLAGS'" \
944 __CNF_CFLAGS="'$__CNF_CFLAGS'" \
945 __CNF_CXXFLAGS="'$__CNF_CXXFLAGS'" \
946 __CNF_LDFLAGS="'$__CNF_LDFLAGS'" \
947 __CNF_LDLIBS="'$__CNF_LDLIBS'" \
948 $PERL $THERE/Configure $OUT $options
ffb261ff
RL
949 fi
950 if [ "$DRYRUN" = "false" ]; then
a064c615
RL
951 # eval to make sure quoted options, possibly with spaces inside,
952 # are treated right
2ab92ae9
RL
953 eval /usr/bin/env \
954 __CNF_CPPDEFINES="'$__CNF_CPPDEFINES'" \
955 __CNF_CPPINCLUDES="'$__CNF_CPPINCLUDES'" \
956 __CNF_CPPFLAGS="'$__CNF_CPPFLAGS'" \
957 __CNF_CFLAGS="'$__CNF_CFLAGS'" \
958 __CNF_CXXFLAGS="'$__CNF_CXXFLAGS'" \
959 __CNF_LDFLAGS="'$__CNF_LDFLAGS'" \
960 __CNF_LDLIBS="'$__CNF_LDLIBS'" \
961 $PERL $THERE/Configure $OUT $options
b1fe6b43 962 fi
58964a49 963else
744029c1 964 echo "This system ($OUT) is not supported. See file INSTALL for details."
141d7325 965 exit 1
58964a49 966fi
26967dc3
BL
967
968if [ "$OUT" = "darwin64-x86_64-cc" ]; then
969 echo "WARNING! If you wish to build 32-bit libraries, then you have to"
970 echo " invoke 'KERNEL_BITS=32 $THERE/config $options'."
971fi
58964a49 972)