This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Push current state to work on failing tests
[perl5.git] / Configure
CommitLineData
2304df62
AD
1#! /bin/sh
2#
3# If these # comments don't work, trim them. Don't worry about any other
4# shell scripts, Configure will trim # comments from them for you.
5#
6# (If you are trying to port this package to a machine without sh,
7# I would suggest you have a look at the prototypical config_h.SH file
8# and edit it to reflect your system. Some packages may include samples
9# of config.h for certain machines, so you might look for one of those.)
10#
11# Yes, you may rip this off to use in other distribution packages. This
12# script belongs to the public domain and cannot be copyrighted.
13#
f40bbcbf
MB
14# Note: this Configure script was generated automatically by the tool
15# called "metaconfig". Rather than working with this copy of Configure,
16# you may wish to get metaconfig. Perl uses a modified version of this
17# tool, available in the "dist" folder in the checkout of the git repo
18# $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
19# The original dist package (including metaconfig) is available via SVN:
20# $ svn co https://svn.code.sf.net/p/dist/code/trunk/dist
2304df62 21#
6f5be6d1
MB
22# Though this script was generated by metaconfig from metaunits, it is
23# OK to send patches against Configure itself. It's up to the Configure
24# pumpkin to backport the patch to the metaunits if it is accepted.
4471067f
JV
25# For more information on patching Configure, see pod/perlhack.pod
26#
6f5be6d1
MB
27# The metaunits are also available from the public git repository:
28# http://perl5.git.perl.org/metaconfig.git/ or
29# $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
5cadb3f3 30#
5cadb3f3 31# See Porting/pumpkin.pod for more information on metaconfig.
2304df62 32
f6a82ade 33# Generated using [metaconfig 3.5 PL0]
7f2de2d2 34# (with additional metaconfig patches by perlbug@perl.org)
2304df62 35
283fdd21 36cat >c1$$ <<EOF
2304df62
AD
37ARGGGHHHH!!!!!
38
39SCO csh still thinks true is false. Write to SCO today and tell them that next
40year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
41
42(Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
43we'd have to do is go in and swap the && and || tokens, wherever they are.)
44
45[End of diatribe. We now return you to your regularly scheduled programming...]
46EOF
283fdd21 47cat >c2$$ <<EOF
2304df62
AD
48
49OOPS! You naughty creature! You didn't run Configure with sh!
50I will attempt to remedy the situation by running sh for you...
51EOF
52
283fdd21 53true || cat c1$$ c2$$
2304df62
AD
54true || exec sh $0 $argv:q
55
283fdd21 56(exit $?0) || cat c2$$
2304df62 57(exit $?0) || exec sh $0 $argv:q
283fdd21 58rm -f c1$$ c2$$
2304df62 59
f6538904 60if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
d03b3b00 61 cat <<EOF
cbee2ce6
JH
62***
63*** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
64*** Configure that well. (Plan 9 is close to UNIX but not close enough.)
65*** Please read the README.plan9 for further instructions.
66*** Cannot continue, aborting.
67***
68EOF
69 exit 1
70fi
71
375e43a7
AB
72if test -f /sys/utilities/MultiView ; then
73 # AmigaOS, test -c for /dev/null is not useful
74 :
75elif test ! -c /dev/null ; then
d03b3b00 76 cat <<EOF
f8e2af1d
MC
77***
78*** I'm sorry, but /dev/null appears to be a file rather than a device.
79*** Please consult your operating sytem's notes for making a device
80*** in /dev.
81*** Cannot continue, aborting.
82***
83EOF
84 exit 1
85fi
86
a0d0e21e
LW
87: compute my invocation name
88me=$0
89case "$0" in
90*/*)
91 me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
92 test "$me" || me=$0
93 ;;
94esac
95
dfe9444c 96: Proper separator for the PATH environment variable
8e07c86e 97p_=:
613d6c3e 98: On OS/2 this directory should exist if this is not floppy only system ":-]"
48a72c67 99if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' 2>&1 ) 2>&1 >/dev/null ; then
613d6c3e 100 if test -n "$OS2_SHELL"; then
dfe9444c
AD
101 p_=\;
102 PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
103 OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
5c728af0 104 is_os2=yes
c4f23d77 105 elif test -n "$DJGPP"; then
495e2cbe 106 case "X${MACHTYPE:-nonesuchmach}" in
8f1aac98 107 *cygwin|*msys) ;;
495e2cbe
MB
108 *) p_=\; ;;
109 esac
dfe9444c 110 fi
39e571d4 111fi
a0d0e21e
LW
112
113: Proper PATH setting
114paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
16d20bd9 115paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
232e078e 116paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
16d20bd9 117paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
232e078e 118paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
87bdd940 119paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
232e078e
AD
120paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
121paths="$paths /sbin /usr/sbin /usr/libexec"
3c728e00 122paths="$paths /system/gnu_library/bin"
a0d0e21e
LW
123
124for p in $paths
125do
8e07c86e
AD
126 case "$p_$PATH$p_" in
127 *$p_$p$p_*) ;;
128 *) test -d $p && PATH=$PATH$p_$p ;;
a0d0e21e
LW
129 esac
130done
131
8e07c86e 132PATH=.$p_$PATH
2304df62
AD
133export PATH
134
dfe9444c
AD
135: shall we be using ksh?
136inksh=''
137needksh=''
138avoidksh=''
139newsh=/bin/ksh
140changesh=''
ff0cee69 141if (PATH=.; alias -x) >/dev/null 2>&1; then
dfe9444c
AD
142 inksh=true
143fi
144if test -f /hp-ux -a -f /bin/ksh; then
145 needksh='to avoid sh bug in "here document" expansion'
146fi
147if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
148 if test X`/usr/bin/uname -v` = X4; then
149 avoidksh="to avoid AIX 4's /bin/sh"
150 newsh=/usr/bin/bsh
2304df62 151 fi
dfe9444c 152fi
cf04f91f
JH
153if test -f /osf_boot -a -f /usr/sbin/setld; then
154 if test X`/usr/bin/uname -s` = XOSF1; then
613d6c3e
MB
155 avoidksh="to avoid Digital UNIX' ksh"
156 newsh=/bin/sh
157 unset BIN_SH
cf04f91f
JH
158 fi
159fi
dfe9444c
AD
160case "$inksh/$needksh" in
161/[a-z]*)
c4f23d77 162 ENV=''
dfe9444c
AD
163 changesh=true
164 reason="$needksh"
165 ;;
166esac
167case "$inksh/$avoidksh" in
168true/[a-z]*)
169 changesh=true
170 reason="$avoidksh"
171 ;;
172esac
173case "$inksh/$needksh-$avoidksh-" in
174true/--)
a0d0e21e
LW
175 cat <<EOM
176(I see you are using the Korn shell. Some ksh's blow up on $me,
dfe9444c 177mainly on older exotic systems. If yours does, try the Bourne shell instead.)
ff0cee69 178EOM
dfe9444c
AD
179 ;;
180esac
181case "$changesh" in
182true)
2e2a97a6 183 export newsh
dfe9444c
AD
184 echo "(Feeding myself to $newsh $reason.)"
185 case "$0" in
186 Configure|*/Configure) exec $newsh $0 "$@";;
187 *) exec $newsh Configure "$@";;
188 esac
189 ;;
190esac
7730b9f4 191test -x "${newsh}" || unset newsh
2304df62 192
613d6c3e 193: if needed, set CDPATH to a harmless value that is not chatty
bfb7748a
AD
194: avoid bash 2.02 problems with empty CDPATH.
195case "$CDPATH" in
196'') ;;
197*) case "$SHELL" in
613d6c3e
MB
198 *bash*) CDPATH='.' ;;
199 *) CDPATH='' ;;
bfb7748a
AD
200 esac
201 ;;
202esac
613d6c3e 203
2304df62
AD
204: Configure runs within the UU subdirectory
205test -d UU || mkdir UU
8e07c86e 206cd UU && rm -f ./*
2304df62 207
6b356c8e
JH
208ccname=''
209ccversion=''
b4eb6b3d
JH
210ccsymbols=''
211cppccsymbols=''
212cppsymbols=''
5440bc8e 213from=''
f53a6e0e
MB
214hostgenerate=''
215hostosname=''
216hostperl=''
5440bc8e
JH
217run=''
218targetarch=''
82a085a5 219targetdir=''
fa142983 220targetenv=''
82a085a5 221targethost=''
56b575b9 222targetmkdir=''
dad780ec 223targetport=''
5440bc8e
JH
224to=''
225usecrosscompile=''
61c26d18 226extern_C=''
6b34ded5 227mistrustnm=''
1be1b388 228usedevel=''
9c839522 229perllibs=''
b4eb6b3d
JH
230dynamic_ext=''
231extensions=''
232known_extensions=''
233nonxs_ext=''
234static_ext=''
235useopcode=''
236useposix=''
6fcddf3b 237extras=''
ecfc5424 238d_bsd=''
40a7a20a 239d_eunice=''
2304df62
AD
240d_xenix=''
241eunicefix=''
dfe9444c 242ar=''
2304df62
AD
243awk=''
244bash=''
245bison=''
246byacc=''
247cat=''
248chgrp=''
249chmod=''
250chown=''
ecfc5424 251comm=''
2304df62
AD
252compress=''
253cp=''
254cpio=''
255cpp=''
256csh=''
257date=''
258echo=''
259egrep=''
260emacs=''
261expr=''
262find=''
263flex=''
3c728e00 264gmake=''
2304df62 265grep=''
8ff267be 266gzip=''
2304df62
AD
267inews=''
268ksh=''
269less=''
270line=''
271lint=''
272ln=''
273lp=''
274lpr=''
275ls=''
276mail=''
277mailx=''
dfe9444c 278make=''
2304df62
AD
279mkdir=''
280more=''
281mv=''
693762b4 282nm=''
2304df62
AD
283nroff=''
284perl=''
285pg=''
286pmake=''
287pr=''
288rm=''
289rmail=''
290sed=''
291sendmail=''
2304df62
AD
292shar=''
293sleep=''
294smail=''
295sort=''
296submit=''
297tail=''
298tar=''
299tbl=''
693762b4 300tee=''
2304df62
AD
301test=''
302touch=''
303tr=''
304troff=''
305uname=''
306uniq=''
307uuname=''
308vi=''
309zcat=''
8ff267be 310zip=''
b4eb6b3d
JH
311full_ar=''
312full_sed=''
a0d0e21e 313libswanted=''
2304df62
AD
314hint=''
315myuname=''
85e6fe83
LW
316osname=''
317osvers=''
2304df62
AD
318Author=''
319Date=''
320Header=''
321Id=''
322Locker=''
323Log=''
324RCSfile=''
325Revision=''
326Source=''
327State=''
56b575b9 328sysroot=''
dfe9444c
AD
329_a=''
330_exe=''
331_o=''
4633a7c4
LW
332archobjs=''
333exe_ext=''
334firstmakefile=''
335lib_ext=''
336obj_ext=''
337path_sep=''
5b813a60 338rm_try=''
b4eb6b3d 339afs=''
a6d26a0d 340afsroot=''
b4eb6b3d
JH
341alignbytes=''
342ansi2knr=''
343archlib=''
344archlibexp=''
345d_archlib=''
346installarchlib=''
347archname=''
348myarchname=''
1a1287f4 349useversionedarchname=''
b4eb6b3d
JH
350d_atolf=''
351d_atoll=''
352baserev=''
353bin=''
354binexp=''
f3f1a2d8 355initialinstalllocation=''
b4eb6b3d 356installbin=''
f3f1a2d8 357userelocatableinc=''
b4eb6b3d 358byteorder=''
2304df62 359cc=''
2304df62
AD
360ccflags=''
361cppflags=''
362ldflags=''
363lkflags=''
8e07c86e 364locincpth=''
2304df62 365optimize=''
b4eb6b3d 366cf_email=''
2304df62
AD
367cf_by=''
368cf_time=''
c193ef60
MB
369charbits=''
370charsize=''
2304df62 371contains=''
b4eb6b3d 372cpp_stuff=''
2304df62
AD
373cpplast=''
374cppminus=''
375cpprun=''
376cppstdin=''
74cac757 377d__fwalk=''
b4eb6b3d
JH
378d_access=''
379d_accessx=''
40613a90 380d_acosh=''
55954f19 381d_aintl=''
b4eb6b3d 382d_alarm=''
10bc17b6
JH
383asctime_r_proto=''
384d_asctime_r=''
f40bbcbf
MB
385d_asinh=''
386d_atanh=''
fcdf39cf 387d_attribute_deprecated=''
0dbb1585
AL
388d_attribute_format=''
389d_attribute_malloc=''
390d_attribute_nonnull=''
391d_attribute_noreturn=''
392d_attribute_pure=''
393d_attribute_unused=''
394d_attribute_warn_unused_result=''
dcb594bc 395d_printf_format_null=''
60bd7b48 396d_backtrace=''
b4eb6b3d
JH
397d_bcmp=''
398d_bcopy=''
635aebb7
AL
399d_builtin_choose_expr=''
400d_builtin_expect=''
b4eb6b3d 401d_bzero=''
a2d23ec2 402d_c99_variadic_macros=''
b4eb6b3d
JH
403d_casti32=''
404castflags=''
405d_castneg=''
427d28ce 406d_cbrt=''
b4eb6b3d
JH
407d_chown=''
408d_chroot=''
409d_chsize=''
758a5d79 410d_class=''
b0a2e8e6 411d_clearenv=''
b4eb6b3d
JH
412d_closedir=''
413d_void_closedir=''
4e0554ec 414d_cmsghdr_s=''
b4eb6b3d 415d_const=''
427d28ce 416d_copysign=''
36adc09b 417d_copysignl=''
666ea192 418d_cplusplus=''
b4eb6b3d
JH
419cryptlib=''
420d_crypt=''
10bc17b6
JH
421crypt_r_proto=''
422d_crypt_r=''
b4eb6b3d
JH
423d_csh=''
424full_csh=''
13cfc98d 425d_ctermid=''
10bc17b6
JH
426ctermid_r_proto=''
427d_ctermid_r=''
428ctime_r_proto=''
429d_ctime_r=''
b4eb6b3d
JH
430d_cuserid=''
431d_dbl_dig=''
2ef53570 432d_dbminitproto=''
b4eb6b3d 433d_difftime=''
de52168c 434d_dir_dd_fd=''
ae0e3d3b 435d_dirfd=''
470dd224 436d_dladdr=''
b4eb6b3d 437d_dlerror=''
a0d0e21e 438d_dlopen=''
b4eb6b3d
JH
439d_dlsymun=''
440d_dosuid=''
441d_suidsafe=''
10bc17b6
JH
442d_drand48_r=''
443drand48_r_proto=''
b4eb6b3d
JH
444d_drand48proto=''
445d_dup2=''
446d_eaccess=''
447d_endgrent=''
10bc17b6
JH
448d_endgrent_r=''
449endgrent_r_proto=''
b4eb6b3d 450d_endhent=''
10bc17b6
JH
451d_endhostent_r=''
452endhostent_r_proto=''
b4eb6b3d 453d_endnent=''
10bc17b6
JH
454d_endnetent_r=''
455endnetent_r_proto=''
b4eb6b3d 456d_endpent=''
10bc17b6
JH
457d_endprotoent_r=''
458endprotoent_r_proto=''
b4eb6b3d 459d_endpwent=''
10bc17b6
JH
460d_endpwent_r=''
461endpwent_r_proto=''
b4eb6b3d 462d_endsent=''
10bc17b6
JH
463d_endservent_r=''
464endservent_r_proto=''
427d28ce
JH
465d_erf=''
466d_erfc=''
467d_exp2=''
468d_expm1=''
15b61c98 469d_faststdio=''
b363b713 470d_fchdir=''
b4eb6b3d
JH
471d_fchmod=''
472d_fchown=''
473d_fcntl=''
9d9004a9 474d_fcntl_can_lock=''
b4eb6b3d
JH
475d_fd_macros=''
476d_fd_set=''
477d_fds_bits=''
8b8c6ab7 478d_fdclose=''
f40bbcbf 479d_fdim=''
2f6b96eb 480d_fegetround=''
b4eb6b3d 481d_fgetpos=''
758a5d79
JH
482d_finite=''
483d_finitel=''
b4eb6b3d
JH
484d_flexfnam=''
485d_flock=''
2ef53570 486d_flockproto=''
427d28ce
JH
487d_fma=''
488d_fmax=''
489d_fmin=''
b4eb6b3d 490d_fork=''
758a5d79 491d_fp_class=''
b19ee02c 492d_fp_classl=''
758a5d79 493d_fpclass=''
d0166596 494d_fp_classify=''
758a5d79
JH
495d_fpclassify=''
496d_fpclassl=''
4c1a9b0c 497d_fpgetround=''
b4eb6b3d
JH
498d_fpos64_t=''
499d_frexpl=''
ea442100 500d_fs_data_s=''
b4eb6b3d
JH
501d_fseeko=''
502d_fsetpos=''
ea442100 503d_fstatfs=''
411ab01c 504d_fsync=''
b4eb6b3d
JH
505d_ftello=''
506d_ftime=''
507d_gettimeod=''
dc814df1 508d_futimes=''
0cc74f39 509d_gai_strerror=''
b4eb6b3d 510d_Gconvert=''
5086dff9 511d_getaddrinfo=''
b4eb6b3d
JH
512d_getcwd=''
513d_getespwnam=''
ea442100 514d_getfsstat=''
b4eb6b3d 515d_getgrent=''
10bc17b6
JH
516d_getgrent_r=''
517getgrent_r_proto=''
518d_getgrgid_r=''
519getgrgid_r_proto=''
520d_getgrnam_r=''
521getgrnam_r_proto=''
b4eb6b3d
JH
522d_getgrps=''
523d_gethbyaddr=''
524d_gethbyname=''
525d_gethent=''
526aphostname=''
527d_gethname=''
528d_phostname=''
529d_uname=''
10bc17b6
JH
530d_gethostbyaddr_r=''
531gethostbyaddr_r_proto=''
532d_gethostbyname_r=''
533gethostbyname_r_proto=''
534d_gethostent_r=''
535gethostent_r_proto=''
b4eb6b3d 536d_gethostprotos=''
4e0554ec 537d_getitimer=''
b4eb6b3d 538d_getlogin=''
10bc17b6
JH
539d_getlogin_r=''
540getlogin_r_proto=''
ea442100
JH
541d_getmnt=''
542d_getmntent=''
5086dff9 543d_getnameinfo=''
b4eb6b3d
JH
544d_getnbyaddr=''
545d_getnbyname=''
546d_getnent=''
10bc17b6
JH
547d_getnetbyaddr_r=''
548getnetbyaddr_r_proto=''
549d_getnetbyname_r=''
550getnetbyname_r_proto=''
551d_getnetent_r=''
552getnetent_r_proto=''
b4eb6b3d 553d_getnetprotos=''
0c0643d0 554d_getpagsz=''
b4eb6b3d
JH
555d_getpent=''
556d_getpgid=''
557d_getpgrp2=''
558d_bsdgetpgrp=''
559d_getpgrp=''
560d_getppid=''
561d_getprior=''
562d_getpbyname=''
563d_getpbynumber=''
10bc17b6
JH
564d_getprotobyname_r=''
565getprotobyname_r_proto=''
566d_getprotobynumber_r=''
567getprotobynumber_r_proto=''
568d_getprotoent_r=''
569getprotoent_r_proto=''
b4eb6b3d
JH
570d_getprotoprotos=''
571d_getprpwnam=''
572d_getpwent=''
10bc17b6
JH
573d_getpwent_r=''
574getpwent_r_proto=''
575d_getpwnam_r=''
576getpwnam_r_proto=''
577d_getpwuid_r=''
578getpwuid_r_proto=''
b4eb6b3d 579d_getsent=''
10bc17b6
JH
580d_getservbyname_r=''
581getservbyname_r_proto=''
582d_getservbyport_r=''
583getservbyport_r_proto=''
584d_getservent_r=''
585getservent_r_proto=''
b4eb6b3d
JH
586d_getservprotos=''
587d_getspnam=''
10bc17b6
JH
588d_getspnam_r=''
589getspnam_r_proto=''
b4eb6b3d
JH
590d_getsbyname=''
591d_getsbyport=''
10bc17b6
JH
592d_gmtime_r=''
593gmtime_r_proto=''
a4f3eea9 594d_gnulibc=''
5f6e0ee4 595gnulibc_version=''
ea442100 596d_hasmntopt=''
b4eb6b3d 597d_htonl=''
427d28ce
JH
598d_hypot=''
599d_ilogb=''
55954f19 600d_ilogbl=''
b4eb6b3d 601d_inetaton=''
5086dff9
MB
602d_inetntop=''
603d_inetpton=''
b4eb6b3d
JH
604d_int64_t=''
605d_isascii=''
269a7913 606d_isblank=''
758a5d79 607d_isfinite=''
fa484e60 608d_isfinitel=''
758a5d79 609d_isinf=''
fa484e60 610d_isinfl=''
f40bbcbf 611d_isless=''
b4eb6b3d
JH
612d_isnan=''
613d_isnanl=''
427d28ce 614d_isnormal=''
4671125a
JH
615d_j0=''
616d_j0l=''
b4eb6b3d 617d_killpg=''
f40bbcbf 618d_lc_monetary_2008=''
b4eb6b3d
JH
619d_lchown=''
620d_ldbl_dig=''
427d28ce
JH
621d_lgamma=''
622d_lgamma_r=''
0a0abfba 623d_libm_lib_version=''
b4eb6b3d 624d_link=''
427d28ce 625d_llrint=''
bc580dd3 626d_llrintl=''
427d28ce 627d_llround=''
bc580dd3 628d_llroundl=''
10bc17b6 629d_localtime_r=''
8572b25d 630d_localtime_r_needs_tzset=''
10bc17b6 631localtime_r_proto=''
b4eb6b3d
JH
632d_locconv=''
633d_lockf=''
427d28ce
JH
634d_log1p=''
635d_log2=''
636d_logb=''
f40bbcbf 637d_ldexpl=''
4cb05021
JH
638d_long_double_style_ieee=''
639d_long_double_style_ieee_doubledouble=''
640d_long_double_style_ieee_extended=''
641d_long_double_style_ieee_std=''
642d_long_double_style_vax=''
517f0560 643d_longdbl=''
dc91db6c 644longdblkind=''
b4eb6b3d
JH
645longdblsize=''
646d_longlong=''
647longlongsize=''
427d28ce 648d_lrint=''
bc580dd3 649d_lrintl=''
427d28ce 650d_lround=''
bc580dd3 651d_lroundl=''
b4eb6b3d
JH
652d_lseekproto=''
653d_lstat=''
654d_madvise=''
7dd121ae
MB
655d_malloc_good_size=''
656d_malloc_size=''
b4eb6b3d
JH
657d_mblen=''
658d_mbstowcs=''
659d_mbtowc=''
660d_memchr=''
661d_memcmp=''
662d_memcpy=''
3879c54d 663d_memmem=''
b4eb6b3d
JH
664d_memmove=''
665d_memset=''
666d_mkdir=''
667d_mkdtemp=''
668d_mkfifo=''
669d_mkstemp=''
670d_mkstemps=''
671d_mktime=''
672d_mmap=''
673mmaptype=''
674d_modfl=''
bc9a1b2c 675d_modflproto=''
b4eb6b3d
JH
676d_mprotect=''
677d_msg=''
678d_msgctl=''
679d_msgget=''
4e0554ec 680d_msghdr_s=''
b4eb6b3d
JH
681d_msgrcv=''
682d_msgsnd=''
683d_msync=''
684d_munmap=''
427d28ce
JH
685d_nan=''
686d_nearbyint=''
7e69463d 687d_duplocale=''
ecb44b8e
MB
688d_freelocale=''
689d_newlocale=''
bc900e45 690d_querylocale=''
ecb44b8e 691d_uselocale=''
7e69463d 692i_xlocale=''
427d28ce
JH
693d_nextafter=''
694d_nexttoward=''
b4eb6b3d 695d_nice=''
2765b840 696d_nl_langinfo=''
b4eb6b3d
JH
697d_off64_t=''
698d_open3=''
699d_fpathconf=''
700d_pathconf=''
701d_pause=''
702d_pipe=''
703d_poll=''
2304df62 704d_portable=''
c796e3db
MB
705d_prctl=''
706d_prctl_set_name=''
a33c94aa 707d_procselfexe=''
f24dbf84 708procselfexe=''
b4eb6b3d
JH
709d_old_pthread_create_joinable=''
710old_pthread_create_joinable=''
d6483fcc 711d_pthread_atfork=''
58d975c3 712d_pthread_attr_setscope=''
b4eb6b3d
JH
713d_pthread_yield=''
714d_sched_yield=''
715sched_yield=''
0e0c5f82 716d_ptrdiff_t=''
b4eb6b3d 717d_qgcvt=''
10bc17b6
JH
718d_random_r=''
719random_r_proto=''
720d_readdir64_r=''
721readdir64_r_proto=''
b4eb6b3d
JH
722d_readdir=''
723d_rewinddir=''
724d_seekdir=''
725d_telldir=''
10bc17b6
JH
726d_readdir_r=''
727readdir_r_proto=''
b4eb6b3d 728d_readlink=''
4e0554ec
JH
729d_readv=''
730d_recvmsg=''
f40bbcbf
MB
731d_re_comp=''
732d_regcmp=''
733d_regcomp=''
427d28ce
JH
734d_remainder=''
735d_remquo=''
b4eb6b3d 736d_rename=''
427d28ce 737d_rint=''
b4eb6b3d 738d_rmdir=''
427d28ce 739d_round=''
b4eb6b3d
JH
740d_safebcpy=''
741d_safemcpy=''
742d_sanemcmp=''
ef9f17be 743d_sbrkproto=''
427d28ce 744d_scalbn=''
55954f19 745d_scalbnl=''
b4eb6b3d
JH
746d_select=''
747d_sem=''
748d_semctl=''
749d_semget=''
750d_semop=''
4e0554ec 751d_sendmsg=''
b4eb6b3d
JH
752d_setegid=''
753d_seteuid=''
754d_setgrent=''
10bc17b6
JH
755d_setgrent_r=''
756setgrent_r_proto=''
b4eb6b3d
JH
757d_setgrps=''
758d_sethent=''
10bc17b6
JH
759d_sethostent_r=''
760sethostent_r_proto=''
4e0554ec 761d_setitimer=''
b4eb6b3d
JH
762d_setlinebuf=''
763d_setlocale=''
10bc17b6
JH
764d_setlocale_r=''
765setlocale_r_proto=''
b4eb6b3d 766d_setnent=''
10bc17b6
JH
767d_setnetent_r=''
768setnetent_r_proto=''
b4eb6b3d
JH
769d_setpent=''
770d_setpgid=''
771d_setpgrp2=''
772d_bsdsetpgrp=''
773d_setpgrp=''
774d_setprior=''
775d_setproctitle=''
10bc17b6
JH
776d_setprotoent_r=''
777setprotoent_r_proto=''
b4eb6b3d 778d_setpwent=''
10bc17b6
JH
779d_setpwent_r=''
780setpwent_r_proto=''
b4eb6b3d
JH
781d_setregid=''
782d_setresgid=''
783d_setresuid=''
784d_setreuid=''
785d_setrgid=''
786d_setruid=''
787d_setsent=''
10bc17b6
JH
788d_setservent_r=''
789setservent_r_proto=''
b4eb6b3d
JH
790d_setsid=''
791d_setvbuf=''
b4eb6b3d
JH
792d_shm=''
793d_shmat=''
794d_shmatprototype=''
795shmattype=''
796d_shmctl=''
797d_shmdt=''
798d_shmget=''
799d_sigaction=''
2640dfa8
MB
800d_siginfo_si_addr=''
801d_siginfo_si_band=''
cdfe2e65 802d_siginfo_si_errno=''
7e69463d 803d_siginfo_si_fd=''
cdfe2e65 804d_siginfo_si_pid=''
cdfe2e65 805d_siginfo_si_status=''
2640dfa8 806d_siginfo_si_uid=''
cdfe2e65 807d_siginfo_si_value=''
ed140128 808d_signbit=''
983dbef6 809d_sigprocmask=''
b4eb6b3d 810d_sigsetjmp=''
5f106f9c 811usesitecustomize=''
4f5da3e9
SP
812d_snprintf=''
813d_vsnprintf=''
49a78c82 814d_sockatmark=''
2ef53570 815d_sockatmarkproto=''
122b9bf4 816d_ip_mreq=''
3e06601f 817d_ip_mreq_source=''
18126d98 818d_ipv6_mreq=''
3e06601f 819d_ipv6_mreq_source=''
b4eb6b3d
JH
820d_msg_ctrunc=''
821d_msg_dontroute=''
822d_msg_oob=''
823d_msg_peek=''
824d_msg_proxy=''
825d_oldsock=''
826d_scm_rights=''
f53580fe 827d_sin6_scope_id=''
18126d98 828d_sockaddr_in6=''
b8677e3b 829d_sockaddr_sa_len=''
b4eb6b3d
JH
830d_socket=''
831d_sockpair=''
832sockethdr=''
833socketlib=''
834d_socklen_t=''
835d_socks5_init=''
360321b3 836d_sprintf_returns_strlen=''
b4eb6b3d 837d_sqrtl=''
10bc17b6
JH
838d_srand48_r=''
839srand48_r_proto=''
840d_srandom_r=''
841srandom_r_proto=''
eef837ea 842d_sresgproto=''
640374d0 843d_sresuproto=''
f40bbcbf 844d_stat=''
b4eb6b3d 845d_statblks=''
ea442100
JH
846d_statfs_f_flags=''
847d_statfs_s=''
17a6c8e3
AD
848d_static_inline=''
849perl_static_inline=''
ea442100
JH
850d_fstatvfs=''
851d_statvfs=''
b4eb6b3d
JH
852d_stdio_cnt_lval=''
853d_stdio_ptr_lval=''
a7ffa9b9
NC
854d_stdio_ptr_lval_nochange_cnt=''
855d_stdio_ptr_lval_sets_cnt=''
b4eb6b3d
JH
856d_stdiobase=''
857d_stdstdio=''
858stdio_base=''
859stdio_bufsiz=''
860stdio_cnt=''
861stdio_filbuf=''
862stdio_ptr=''
863d_index=''
864d_strchr=''
865d_strcoll=''
866d_strctcpy=''
867d_strerrm=''
868d_strerror=''
869d_sysernlst=''
870d_syserrlst=''
ef55c673 871d_strerror_l=''
10bc17b6
JH
872d_strerror_r=''
873strerror_r_proto=''
b3c85772 874d_strftime=''
08c92000
MB
875d_strlcat=''
876d_strlcpy=''
b4eb6b3d
JH
877d_strtod=''
878d_strtol=''
879d_strtold=''
880d_strtoll=''
28e5dec8 881d_strtoq=''
b4eb6b3d
JH
882d_strtoul=''
883d_strtoull=''
884d_strtouq=''
885d_strxfrm=''
886d_symlink=''
887d_syscall=''
2ef53570 888d_syscallproto=''
b4eb6b3d
JH
889d_sysconf=''
890d_system=''
891d_tcgetpgrp=''
892d_tcsetpgrp=''
893d_telldirproto=''
f40bbcbf 894d_tgamma=''
b4eb6b3d
JH
895d_time=''
896timetype=''
96938616
MB
897d_asctime64=''
898d_ctime64=''
899d_difftime64=''
900d_gmtime64=''
901d_localtime64=''
902d_mktime64=''
cbb9e8a7 903d_timegm=''
b4eb6b3d
JH
904clocktype=''
905d_times=''
10bc17b6
JH
906d_tmpnam_r=''
907tmpnam_r_proto=''
427d28ce 908d_trunc=''
b4eb6b3d 909d_truncate=''
4842dad7 910d_truncl=''
10bc17b6
JH
911d_ttyname_r=''
912ttyname_r_proto=''
b4eb6b3d 913d_tzname=''
4e0554ec
JH
914d_u32align=''
915d_ualarm=''
b4eb6b3d
JH
916d_umask=''
917d_semctl_semid_ds=''
918d_semctl_semun=''
919d_union_semun=''
758a5d79 920d_unordered=''
bdf33aa7 921d_unsetenv=''
4e0554ec 922d_usleep=''
2ef53570 923d_usleepproto=''
ea442100 924d_ustat=''
233e16ce 925d_pseudofork=''
b4eb6b3d
JH
926d_vfork=''
927usevfork=''
928d_voidsig=''
929signal_t=''
930d_volatile=''
931d_charvspr=''
932d_vprintf=''
933d_wait4=''
934d_waitpid=''
9cdcdad1 935d_wcscmp=''
b4eb6b3d 936d_wcstombs=''
9cdcdad1 937d_wcsxfrm=''
b4eb6b3d 938d_wctomb=''
4e0554ec 939d_writev=''
32db2dd3 940default_inc_excludes_dot=''
b4eb6b3d 941dlext=''
f1ce3bf1 942bin_ELF=''
85e6fe83
LW
943cccdlflags=''
944ccdlflags=''
2304df62 945dlsrc=''
232e078e 946ld=''
9ec4dadf 947ld_can_script=''
85e6fe83 948lddlflags=''
2304df62 949usedl=''
b4eb6b3d 950doublesize=''
2640dfa8 951dtraceobject=''
b4eb6b3d
JH
952ebcdic=''
953fflushNULL=''
954fflushall=''
955fpossize=''
956fpostype=''
2d736872 957gccansipedantic=''
5b463ca7 958gccosandvers=''
8a27cf78 959gccversion=''
b4eb6b3d
JH
960gidformat=''
961gidsign=''
962gidsize=''
963gidtype=''
964groupstype=''
965h_fcntl=''
966h_sysfile=''
6e1038e0
MB
967html1dir=''
968html1direxp=''
969installhtml1dir=''
970html3dir=''
971html3direxp=''
972installhtml3dir=''
b4eb6b3d 973i_arpainet=''
c0bacbef 974i_assert=''
470dd224 975i_bfd=''
10bc17b6 976i_crypt=''
b4eb6b3d
JH
977db_hashtype=''
978db_prefixtype=''
640374d0
JH
979db_version_major=''
980db_version_minor=''
981db_version_patch=''
b4eb6b3d
JH
982i_db=''
983i_dbm=''
984i_rpcsvcdbm=''
985d_dirnamlen=''
986direntrytype=''
987i_dirent=''
b4eb6b3d 988i_dlfcn=''
470dd224 989i_execinfo=''
b4eb6b3d 990i_fcntl=''
2f6b96eb 991i_fenv=''
b4eb6b3d 992i_float=''
758a5d79
JH
993i_fp=''
994i_fp_class=''
b4eb6b3d
JH
995i_gdbm=''
996d_grpasswd=''
997i_grp=''
b4eb6b3d
JH
998i_ieeefp=''
999i_inttypes=''
2765b840 1000i_langinfo=''
b4eb6b3d
JH
1001i_libutil=''
1002i_limits=''
1003i_locale=''
1004i_machcthr=''
1005i_malloc=''
1cd66f7c 1006i_mallocmalloc=''
b4eb6b3d
JH
1007i_math=''
1008i_memory=''
ea442100 1009i_mntent=''
e74475c7
MHM
1010d_gdbm_ndbm_h_uses_prototypes=''
1011d_gdbmndbm_h_uses_prototypes=''
a33f2d9f 1012d_ndbm=''
e74475c7 1013d_ndbm_h_uses_prototypes=''
a33f2d9f
AD
1014i_gdbm_ndbm=''
1015i_gdbmndbm=''
b4eb6b3d
JH
1016i_ndbm=''
1017i_netdb=''
1018i_neterrno=''
1019i_netinettcp=''
1020i_niin=''
1021i_sysin=''
1022i_poll=''
1023i_prot=''
1024i_pthread=''
1025d_pwage=''
1026d_pwchange=''
1027d_pwclass=''
1028d_pwcomment=''
1029d_pwexpire=''
1030d_pwgecos=''
1031d_pwpasswd=''
1032d_pwquota=''
1033i_pwd=''
4e5044f0 1034i_quadmath=''
b4eb6b3d
JH
1035i_shadow=''
1036i_socks=''
bd31be4b 1037i_stdbool=''
b4eb6b3d 1038i_stddef=''
83f6d82b 1039i_stdint=''
b4eb6b3d
JH
1040i_stdlib=''
1041i_string=''
1042strings=''
1043i_sunmath=''
1044i_sysaccess=''
1045i_sysdir=''
1046i_sysfile=''
1047d_voidtty=''
1048i_bsdioctl=''
1049i_sysfilio=''
1050i_sysioctl=''
1051i_syssockio=''
1052i_syslog=''
1053i_sysmman=''
1054i_sysmode=''
ea442100 1055i_sysmount=''
b4eb6b3d
JH
1056i_sysndir=''
1057i_sysparam=''
216dac04 1058i_syspoll=''
b4eb6b3d
JH
1059i_sysresrc=''
1060i_syssecrt=''
1061i_sysselct=''
1062i_sysstat=''
ea442100
JH
1063i_sysstatfs=''
1064i_sysstatvfs=''
b4eb6b3d
JH
1065i_systimes=''
1066i_systypes=''
1067i_sysuio=''
1068i_sysun=''
1069i_sysutsname=''
ea442100 1070i_sysvfs=''
b4eb6b3d
JH
1071i_syswait=''
1072i_sgtty=''
1073i_termio=''
1074i_termios=''
14b90194
JH
1075d_tm_tm_gmtoff=''
1076d_tm_tm_zone=''
b4eb6b3d
JH
1077i_systime=''
1078i_systimek=''
1079i_time=''
1080timeincl=''
1081i_unistd=''
ea442100 1082i_ustat=''
b4eb6b3d
JH
1083i_utime=''
1084i_values=''
1085i_stdarg=''
1086i_varargs=''
1087i_varhdr=''
1088i_vfork=''
f3f1a2d8 1089d_inc_version_list=''
b4eb6b3d
JH
1090inc_version_list=''
1091inc_version_list_init=''
e6704a40
MB
1092doubleinfbytes=''
1093doublenanbytes=''
1094longdblinfbytes=''
1095longdblnanbytes=''
b4eb6b3d
JH
1096installprefix=''
1097installprefixexp=''
1098installstyle=''
1099installusrbinperl=''
1100intsize=''
1101longsize=''
1102shortsize=''
4b661809 1103issymlink=''
2304df62 1104libc=''
b4eb6b3d
JH
1105ldlibpthname=''
1106libperl=''
1107shrpenv=''
1108useshrplib=''
a0d0e21e 1109glibpth=''
56b575b9 1110incpth=''
2304df62 1111libpth=''
8e07c86e 1112loclibpth=''
2304df62
AD
1113plibpth=''
1114xlibpth=''
1cfa4ec7 1115ignore_versioned_solibs=''
2304df62 1116libs=''
43999f95
JH
1117libsdirs=''
1118libsfiles=''
1119libsfound=''
13b3f787 1120libspath=''
85e6fe83 1121lns=''
b4eb6b3d
JH
1122d_PRIEUldbl=''
1123d_PRIFUldbl=''
1124d_PRIGUldbl=''
1125d_PRIeldbl=''
1126d_PRIfldbl=''
1127d_PRIgldbl=''
1128d_SCNfldbl=''
517f0560
MB
1129d_double_has_inf=''
1130d_double_has_nan=''
1131d_double_has_negative_zero=''
1132d_double_has_subnormals=''
1133d_double_style_cray=''
1134d_double_style_ibm=''
1135d_double_style_ieee=''
1136d_double_style_vax=''
f40bbcbf 1137doublekind=''
b4eb6b3d
JH
1138sPRIEUldbl=''
1139sPRIFUldbl=''
1140sPRIGUldbl=''
1141sPRIeldbl=''
1142sPRIfldbl=''
1143sPRIgldbl=''
1144sSCNfldbl=''
1145lseeksize=''
1146lseektype=''
f3f1a2d8
MB
1147make_set_make=''
1148d_mymalloc=''
1149freetype=''
b4eb6b3d
JH
1150mallocobj=''
1151mallocsrc=''
1152malloctype=''
9df442c2 1153usemallocwrap=''
b4eb6b3d
JH
1154usemymalloc=''
1155installman1dir=''
1156man1dir=''
1157man1direxp=''
1158man1ext=''
1159installman3dir=''
1160man3dir=''
1161man3direxp=''
1162man3ext=''
e6704a40
MB
1163doublemantbits=''
1164longdblmantbits=''
1165nvmantbits=''
b4eb6b3d
JH
1166modetype=''
1167multiarch=''
1168mydomain=''
1169myhostname=''
1170phostname=''
2304df62
AD
1171c=''
1172n=''
b4eb6b3d
JH
1173d_eofnblk=''
1174eagain=''
1175o_nonblock=''
1176rd_nodata=''
2cc61e15 1177need_va_copy=''
b4eb6b3d
JH
1178netdb_hlen_type=''
1179netdb_host_type=''
1180netdb_name_type=''
1181netdb_net_type=''
1182groupcat=''
1183hostcat=''
1184passcat=''
1185orderlib=''
1186ranlib=''
1187d_perl_otherlibdirs=''
1188otherlibdirs=''
2304df62
AD
1189package=''
1190spackage=''
b4eb6b3d
JH
1191pager=''
1192api_revision=''
1193api_subversion=''
1194api_version=''
1195api_versionstring=''
1196patchlevel=''
151e6568 1197perl_patchlevel=''
b4eb6b3d
JH
1198revision=''
1199subversion=''
1200version=''
861eb78d 1201version_patchlevel_string=''
b4eb6b3d
JH
1202perl5=''
1203perladmin=''
91f55cc7 1204perlpath=''
b4eb6b3d 1205d_nv_preserves_uv=''
f607920a 1206d_nv_zero_is_allbits_zero=''
b4eb6b3d
JH
1207i16size=''
1208i16type=''
1209i32size=''
1210i32type=''
1211i64size=''
1212i64type=''
1213i8size=''
1214i8type=''
1215ivsize=''
1216ivtype=''
b68c599a 1217nv_overflows_integers_at=''
4137585d 1218nv_preserves_uv_bits=''
b4eb6b3d
JH
1219nvsize=''
1220nvtype=''
1221u16size=''
1222u16type=''
1223u32size=''
1224u32type=''
1225u64size=''
1226u64type=''
1227u8size=''
1228u8type=''
1229uvsize=''
1230uvtype=''
1231ivdformat=''
1232nvEUformat=''
1233nvFUformat=''
1234nvGUformat=''
1235nveformat=''
1236nvfformat=''
1237nvgformat=''
1238uvXUformat=''
1239uvoformat=''
1240uvuformat=''
1241uvxformat=''
1242pidtype=''
1243prefix=''
1244prefixexp=''
1245installprivlib=''
1246privlib=''
1247privlibexp=''
1248prototype=''
1249ptrsize=''
1250d_PRIXU64=''
1251d_PRId64=''
1252d_PRIi64=''
1253d_PRIo64=''
1254d_PRIu64=''
1255d_PRIx64=''
1256sPRIXU64=''
1257sPRId64=''
1258sPRIi64=''
1259sPRIo64=''
1260sPRIu64=''
1261sPRIx64=''
1262d_quad=''
1263quadkind=''
1264quadtype=''
1265uquadtype=''
1266drand01=''
1267randbits=''
1268randfunc=''
1269randseedtype=''
1270seedfunc=''
1271installscript=''
1272scriptdir=''
1273scriptdirexp=''
1274selectminbits=''
1275selecttype=''
8ff267be 1276sh=''
f53a6e0e 1277targetsh=''
b4eb6b3d
JH
1278sig_count=''
1279sig_name=''
1280sig_name_init=''
1281sig_num=''
1282sig_num_init=''
76d3c696 1283sig_size=''
f3f1a2d8 1284d_sitearch=''
b4eb6b3d
JH
1285installsitearch=''
1286sitearch=''
1287sitearchexp=''
1288installsitebin=''
1289sitebin=''
1290sitebinexp=''
8d2cbf27
JH
1291installsitehtml1dir=''
1292sitehtml1dir=''
1293sitehtml1direxp=''
1294installsitehtml3dir=''
1295sitehtml3dir=''
1296sitehtml3direxp=''
b4eb6b3d
JH
1297installsitelib=''
1298sitelib=''
1299sitelib_stem=''
1300sitelibexp=''
91e123a8
JH
1301installsiteman1dir=''
1302siteman1dir=''
1303siteman1direxp=''
1304installsiteman3dir=''
1305siteman3dir=''
1306siteman3direxp=''
b4eb6b3d
JH
1307siteprefix=''
1308siteprefixexp=''
6e1038e0
MB
1309installsitescript=''
1310sitescript=''
1311sitescriptexp=''
b4eb6b3d
JH
1312sizesize=''
1313sizetype=''
56b575b9 1314d_libname_unique=''
a0d0e21e 1315so=''
b4eb6b3d 1316socksizetype=''
2304df62
AD
1317sharpbang=''
1318shsharp=''
1319spitshell=''
dfe9444c 1320src=''
b4eb6b3d 1321ssizetype=''
668fdbe1
MB
1322st_ino_sign=''
1323st_ino_size=''
b4eb6b3d 1324startperl=''
2304df62 1325startsh=''
b4eb6b3d
JH
1326stdchar=''
1327d_stdio_stream_array=''
1328stdio_stream_array=''
1329sysman=''
81c4fd9e
MB
1330sGMTIME_max=''
1331sGMTIME_min=''
73e6e416
MB
1332sLOCALTIME_max=''
1333sLOCALTIME_min=''
5ff3f7a4 1334trnl=''
b4eb6b3d
JH
1335uidformat=''
1336uidsign=''
1337uidsize=''
1338uidtype=''
1339archname64=''
1340use64bitall=''
1341use64bitint=''
470dd224 1342usecbacktrace=''
34f1896b
MB
1343dtrace=''
1344usedtrace=''
15b61c98 1345usefaststdio=''
d78f9ffa 1346usekernprocpathname=''
b4eb6b3d
JH
1347ccflags_uselargefiles=''
1348ldflags_uselargefiles=''
1349libswanted_uselargefiles=''
1350uselargefiles=''
1351uselongdouble=''
1352usemorebits=''
1353usemultiplicity=''
2304df62 1354nm_opt=''
40a7a20a 1355nm_so_opt=''
2304df62
AD
1356runnm=''
1357usenm=''
ae60cb46 1358usensgetexecutablepath=''
b4eb6b3d 1359useperlio=''
f40bbcbf 1360usequadmath=''
29209bc5 1361usesocks=''
b4eb6b3d
JH
1362d_oldpthreads=''
1363use5005threads=''
1364useithreads=''
9514c62b 1365usereentrant=''
b4eb6b3d 1366usethreads=''
2304df62 1367incpath=''
2304df62
AD
1368mips_type=''
1369usrinc=''
d03b3b00 1370vaproto=''
b4eb6b3d
JH
1371d_vendorarch=''
1372installvendorarch=''
1373vendorarch=''
1374vendorarchexp=''
1375d_vendorbin=''
1376installvendorbin=''
1377vendorbin=''
1378vendorbinexp=''
8d2cbf27
JH
1379installvendorhtml1dir=''
1380vendorhtml1dir=''
1381vendorhtml1direxp=''
1382installvendorhtml3dir=''
1383vendorhtml3dir=''
1384vendorhtml3direxp=''
b4eb6b3d
JH
1385d_vendorlib=''
1386installvendorlib=''
1387vendorlib=''
1388vendorlib_stem=''
1389vendorlibexp=''
91e123a8
JH
1390installvendorman1dir=''
1391vendorman1dir=''
1392vendorman1direxp=''
1393installvendorman3dir=''
1394vendorman3dir=''
1395vendorman3direxp=''
b4eb6b3d
JH
1396usevendorprefix=''
1397vendorprefix=''
1398vendorprefixexp=''
6e1038e0
MB
1399d_vendorscript=''
1400installvendorscript=''
1401vendorscript=''
1402vendorscriptexp=''
d56c5707 1403versiononly=''
3659ebf1
JH
1404yacc=''
1405yaccflags=''
2304df62
AD
1406CONFIG=''
1407
34f1896b 1408: Detect odd OSs
ecfc5424
AD
1409define='define'
1410undef='undef'
1411smallmach='pdp11 i8086 z8000 i80286 iAPX286'
1412rmlist=''
1413
1414: We must find out about Eunice early
1415eunicefix=':'
1416if test -f /etc/unixtovms; then
1417 eunicefix=/etc/unixtovms
1418fi
1419if test -f /etc/unixtovms.exe; then
1420 eunicefix=/etc/unixtovms.exe
1421fi
1422
cfb04860 1423: Set executable suffix now -- needed before hints available
6153ba32
PG
1424if test -f "/libs/version.library"; then
1425: Amiga OS
1426 _exe=""
1427elif test -f "/system/gnu_library/bin/ar.pm"; then
1428: Stratus VOS
cfb04860 1429 _exe=".pm"
6153ba32
PG
1430elif test -n "$DJGPP"; then
1431: DOS DJGPP
cfb04860 1432 _exe=".exe"
531d75b0
MB
1433elif test -f /kern/cookiejar; then
1434: MiNT
1435 _exe=""
5c728af0 1436elif test -d c:/. -o -n "$is_os2" ; then
506faf56 1437: OS/2 or cygwin
ba863942
JH
1438 _exe=".exe"
1439fi
868439a2 1440
1d8eaf8c 1441groupstype=''
b4eb6b3d 1442i_whoami=''
b8677e3b
MB
1443: Possible local include directories to search.
1444: Set locincpth to "" in a hint file to defeat local include searches.
1445locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
1446locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
1447:
1448: no include file wanted by default
1449inclwanted=''
1450
1451: Enable -DEBUGGING and -DDEBUGGING from the command line
1452EBUGGING=''
356123f1 1453DEBUGGING=''
b8677e3b 1454
7e69463d
AC
1455: Trailing extension. Override this in a hint file, if needed.
1456: Extra object files, if any, needed on this platform.
1457archobjs=''
64615a5e 1458libnames=''
732c9516
JH
1459: change the next line if compiling for Xenix/286 on Xenix/386
1460xlibpth='/usr/lib/386 /lib/386'
732c9516
JH
1461: Possible local library directories to search.
1462loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
1463loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
1464
1465: general looking path for locating libraries
5869b1f1 1466glibpth="/lib /usr/lib $xlibpth"
732c9516 1467glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
f7dd4e7f
JH
1468test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
1469test -f /shlib/libc.so && glibpth="/shlib $glibpth"
faae14e6 1470test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
732c9516
JH
1471
1472: Private path used by Configure to find libraries. Its value
1473: is prepended to libpth. This variable takes care of special
1474: machines, like the mips. Usually, it should be empty.
1475plibpth=''
1476
1cfa4ec7
GS
1477: default library list
1478libswanted=''
921b2963 1479: some systems want to use only the non-versioned libso:s
1cfa4ec7 1480ignore_versioned_solibs=''
ed140128
AD
1481ccname=''
1482ccversion=''
1483perllibs=''
1484: set useposix=false in your hint file to disable the POSIX extension.
1485useposix=true
1486: set useopcode=false in your hint file to disable the Opcode extension.
1487useopcode=true
b4eb6b3d
JH
1488archname64=''
1489ccflags_uselargefiles=''
1490ldflags_uselargefiles=''
1491libswanted_uselargefiles=''
1492: set usemultiplicity on the Configure command line to enable multiplicity.
29209bc5 1493: set usesocks on the Configure command line to enable socks.
7e69463d
AC
1494archname=''
1495: set usethreads on the Configure command line to enable threads.
1496usereentrant='undef'
ecfc5424 1497: List of libraries we want.
15431986 1498: If anyone needs extra -lxxx, put those in a hint file.
4732711e 1499libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
90207ba1 1500libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
1aef975c 1501: We probably want to search /usr/shlib before most other libraries.
94b6baf5 1502: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
ecfc5424
AD
1503glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
1504glibpth="/usr/shlib $glibpth"
1505: Do not use vfork unless overridden by a hint file.
1506usevfork=false
1507
8ff267be
PP
1508: Find the basic shell for Bourne shell scripts
1509case "$sh" in
1510'')
8ff267be
PP
1511 case "$SYSTYPE" in
1512 *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
1513 *) xxx='/bin/sh';;
1514 esac
1515 if test -f "$xxx"; then
1516 sh="$xxx"
1517 else
1518 : Build up a list and do a single loop so we can 'break' out.
1519 pth=`echo $PATH | sed -e "s/$p_/ /g"`
1520 for xxx in sh bash ksh pdksh ash; do
1521 for p in $pth; do
1522 try="$try ${p}/${xxx}"
1523 done
1524 done
1525 for xxx in $try; do
1526 if test -f "$xxx"; then
1527 sh="$xxx";
8ff267be 1528 break
a5a94ea5
JH
1529 elif test "X$_exe" != X -a -f "$xxx$_exe"; then
1530 sh="$xxx";
1531 break
8ff267be
PP
1532 elif test -f "$xxx.exe"; then
1533 sh="$xxx";
8ff267be
PP
1534 break
1535 fi
1536 done
1537 fi
1538 ;;
1539esac
1540
1541case "$sh" in
a33c94aa 1542'') cat >&2 <<EOM
1332606d 1543$me: Fatal Error: I can't find a Bourne Shell anywhere.
dfe9444c 1544
8ff267be 1545Usually it's in /bin/sh. How did you even get this far?
1332606d 1546Please contact me (Perl Maintainers) at perlbug@perl.org and
dfe9444c 1547we'll try to straighten this all out.
8ff267be
PP
1548EOM
1549 exit 1
1550 ;;
1551esac
1552
871414da
JR
1553: When cross-compiling we need to separate the sh-to-run-Configure-with from the sh-to-use-in-Perl
1554: default both to the same thing, cross-compilers can then set targetsh differently if they like
1555targetsh=$sh
1556
760ac839 1557: see if sh knows # comments
73614538 1558if `$sh -c '#' >/dev/null 2>&1`; then
760ac839
LW
1559 shsharp=true
1560 spitshell=cat
760ac839 1561 xcat=/bin/cat
a931254c
JH
1562 test -f $xcat$_exe || xcat=/usr/bin/cat
1563 if test ! -f $xcat$_exe; then
4bdb8fb5 1564 for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
a931254c 1565 if test -f $p/cat$_exe; then
1deb0a86 1566 xcat=$p/cat
3c728e00
JH
1567 break
1568 fi
1569 done
1deb0a86
JH
1570 if test ! -f $xcat$_exe; then
1571 echo "Can't find cat anywhere!"
3c728e00
JH
1572 exit 1
1573 fi
1574 fi
5440bc8e
JH
1575 echo "#!$xcat" >sharp
1576 $eunicefix sharp
1577 chmod +x sharp
1d8eaf8c 1578 ./sharp > today 2>/dev/null
760ac839 1579 if test -s today; then
760ac839
LW
1580 sharpbang='#!'
1581 else
5440bc8e
JH
1582 echo "#! $xcat" > sharp
1583 $eunicefix sharp
1584 chmod +x sharp
1d8eaf8c 1585 ./sharp > today 2>/dev/null
760ac839 1586 if test -s today; then
760ac839
LW
1587 sharpbang='#! '
1588 else
760ac839
LW
1589 sharpbang=': use '
1590 fi
1591 fi
1592else
dfe9444c 1593 echo " "
8ff267be 1594 echo "Your $sh doesn't grok # comments--I will strip them later on."
760ac839
LW
1595 shsharp=false
1596 cd ..
1597 echo "exec grep -v '^[ ]*#'" >spitshell
1598 chmod +x spitshell
1599 $eunicefix spitshell
1600 spitshell=`pwd`/spitshell
1601 cd UU
1602 echo "I presume that if # doesn't work, #! won't work either!"
1603 sharpbang=': use '
1604fi
5440bc8e 1605rm -f sharp today
760ac839
LW
1606
1607: figure out how to guarantee sh startup
8ff267be
PP
1608case "$startsh" in
1609'') startsh=${sharpbang}${sh} ;;
1610*)
760ac839 1611esac
5440bc8e 1612cat >sharp <<EOSS
760ac839
LW
1613$startsh
1614set abc
1615test "$?abc" != 1
1616EOSS
1617
5440bc8e
JH
1618chmod +x sharp
1619$eunicefix sharp
1620if ./sharp; then
8ff267be 1621 : echo "Yup, it does."
760ac839 1622else
dfe9444c
AD
1623 echo "Hmm... '$startsh' does not guarantee sh startup..."
1624 echo "You may have to fix up the shell scripts to make sure $sh runs them."
760ac839 1625fi
5440bc8e 1626rm -f sharp
760ac839 1627
aebf16e7
AD
1628: Save command line options in file UU/cmdline.opt for later use in
1629: generating config.sh.
1630cat > cmdline.opt <<EOSH
613d6c3e 1631: Configure command line arguments.
aebf16e7
AD
1632config_arg0='$0'
1633config_args='$*'
1634config_argc=$#
1635EOSH
1636argn=1
ee45ea83
IZ
1637args_exp=''
1638args_sep=''
aebf16e7
AD
1639for arg in "$@"; do
1640 cat >>cmdline.opt <<EOSH
1641config_arg$argn='$arg'
1642EOSH
ee45ea83
IZ
1643 cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
1644$arg
1645EOC
1646 arg_exp=`cat cmdl.opt`
1647 args_exp="$args_exp$args_sep'$arg_exp'"
aebf16e7 1648 argn=`expr $argn + 1`
ee45ea83 1649 args_sep=' '
aebf16e7 1650done
ee45ea83 1651rm -f cmdl.opt
aebf16e7 1652
2304df62
AD
1653: produce awk script to parse command line options
1654cat >options.awk <<'EOF'
1655BEGIN {
02e93a22 1656 optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
2304df62
AD
1657
1658 len = length(optstr);
1659 for (i = 1; i <= len; i++) {
1660 c = substr(optstr, i, 1);
1661 if (i < len) a = substr(optstr, i + 1, 1); else a = "";
1662 if (a == ":") {
1663 arg[c] = 1;
1664 i++;
1665 }
1666 opt[c] = 1;
1667 }
1668}
1669{
1670 expect = 0;
1671 str = $0;
1672 if (substr(str, 1, 1) != "-") {
1673 printf("'%s'\n", str);
1674 next;
1675 }
1676 len = length($0);
1677 for (i = 2; i <= len; i++) {
1678 c = substr(str, i, 1);
1679 if (!opt[c]) {
1680 printf("-%s\n", substr(str, i));
1681 next;
1682 }
1683 printf("-%s\n", c);
1684 if (arg[c]) {
1685 if (i < len)
1686 printf("'%s'\n", substr(str, i + 1));
1687 else
1688 expect = 1;
1689 next;
1690 }
1691 }
1692}
1693END {
1694 if (expect)
1695 print "?";
1696}
1697EOF
1698
1699: process the command line options
4633a7c4
LW
1700set X `for arg in "$@"; do echo "X$arg"; done |
1701 sed -e s/X// | awk -f options.awk`
2304df62
AD
1702eval "set $*"
1703shift
1704rm -f options.awk
1705
1706: set up default values
1707fastread=''
1708reuseval=false
1709config_sh=''
1710alldone=''
1711error=''
1712silent=''
1713extractsh=''
16d20bd9 1714knowitall=''
02e93a22 1715rm -f optdef.sh posthint.sh
28757baa
PP
1716cat >optdef.sh <<EOS
1717$startsh
1718EOS
2304df62 1719
dfe9444c 1720
2304df62
AD
1721: option parsing
1722while test $# -gt 0; do
1723 case "$1" in
1724 -d) shift; fastread=yes;;
1725 -e) shift; alldone=cont;;
1726 -f)
1727 shift
1728 cd ..
1729 if test -r "$1"; then
1730 config_sh="$1"
1731 else
a0d0e21e 1732 echo "$me: cannot read config file $1." >&2
2304df62
AD
1733 error=true
1734 fi
1735 cd UU
1736 shift;;
3f30fabf 1737 --help|\
2304df62
AD
1738 -h) shift; error=true;;
1739 -r) shift; reuseval=true;;
dfe9444c 1740 -s) shift; silent=true; realsilent=true;;
2304df62 1741 -E) shift; alldone=exit;;
16d20bd9 1742 -K) shift; knowitall=true;;
41d73075 1743 -O) shift;;
dfe9444c 1744 -S) shift; silent=true; extractsh=true;;
a0d0e21e
LW
1745 -D)
1746 shift
1747 case "$1" in
1748 *=)
1749 echo "$me: use '-U symbol=', not '-D symbol='." >&2
1750 echo "$me: ignoring -D $1" >&2
1751 ;;
ecfc5424 1752 *=*) echo "$1" | \
1aef975c
AD
1753 sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
1754 *) echo "$1='define'" >> optdef.sh;;
a0d0e21e
LW
1755 esac
1756 shift
1757 ;;
1758 -U)
1759 shift
1760 case "$1" in
1aef975c 1761 *=) echo "$1" >> optdef.sh;;
a0d0e21e
LW
1762 *=*)
1763 echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
1764 echo "$me: ignoring -U $1" >&2
1765 ;;
1aef975c 1766 *) echo "$1='undef'" >> optdef.sh;;
a0d0e21e
LW
1767 esac
1768 shift
1769 ;;
02e93a22
JH
1770 -A)
1771 shift
1772 xxx=''
1773 yyy="$1"
02e93a22 1774 zzz=''
5f83a3e9 1775 uuu=undef
02e93a22 1776 case "$yyy" in
f7c31117 1777 *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
5f83a3e9
JH
1778 case "$zzz" in
1779 *:*) zzz='' ;;
1780 *) xxx=append
613d6c3e 1781 zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
f7c31117 1782 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
5f83a3e9
JH
1783 esac
1784 ;;
1785 esac
1786 case "$xxx" in
1787 '') case "$yyy" in
f7c31117
JH
1788 *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
1789 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
1790 zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
1791 yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
1792 *) xxx=`echo "$yyy"|sed 's!:.*!!'`
1793 yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
5f83a3e9 1794 esac
613d6c3e 1795 ;;
5f83a3e9 1796 esac
02e93a22
JH
1797 case "$xxx" in
1798 append)
5f83a3e9 1799 echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
02e93a22 1800 clear)
5f83a3e9 1801 echo "$yyy=''" >> posthint.sh ;;
02e93a22
JH
1802 define)
1803 case "$zzz" in
1804 '') zzz=define ;;
1805 esac
5f83a3e9 1806 echo "$yyy='$zzz'" >> posthint.sh ;;
02e93a22 1807 eval)
5f83a3e9 1808 echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
02e93a22 1809 prepend)
5f83a3e9 1810 echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
02e93a22
JH
1811 undef)
1812 case "$zzz" in
1813 '') zzz="$uuu" ;;
1814 esac
5f83a3e9
JH
1815 echo "$yyy=$zzz" >> posthint.sh ;;
1816 *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
02e93a22 1817 esac
bde6b06b 1818 shift
02e93a22 1819 ;;
216dac04 1820 -V) echo "$me generated by metaconfig 3.5 PL0." >&2
5f83a3e9 1821 exit 0;;
2304df62 1822 --) break;;
a0d0e21e 1823 -*) echo "$me: unknown option $1" >&2; shift; error=true;;
2304df62
AD
1824 *) break;;
1825 esac
1826done
1827
1828case "$error" in
1829true)
1830 cat >&2 <<EOM
2afac517 1831Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
02e93a22 1832 [-U symbol] [-U symbol=] [-A command:symbol...]
2304df62
AD
1833 -d : use defaults for all answers.
1834 -e : go on without questioning past the production of config.sh.
1835 -f : specify an alternate default configuration file.
1836 -h : print this help message and exit (with an error status).
1837 -r : reuse C symbols value if possible (skips costly nm extraction).
1838 -s : silent mode, only echoes questions and essential information.
a0d0e21e
LW
1839 -D : define symbol to have some value:
1840 -D symbol symbol gets the value 'define'
1841 -D symbol=value symbol gets the value 'value'
3f30fabf
MB
1842 common used examples (see INSTALL for more info):
1843 -Duse64bitint use 64bit integers
b79e0b55 1844 -Duse64bitall use 64bit integers and pointers
3f30fabf 1845 -Dusethreads use thread support
b79e0b55 1846 -Dinc_version_list=none do not include older perl trees in @INC
3f30fabf
MB
1847 -DEBUGGING=none DEBUGGING options
1848 -Dcc=gcc choose your compiler
1849 -Dprefix=/opt/perl5 choose your destination
2304df62 1850 -E : stop at the end of questions, after having produced config.sh.
16d20bd9 1851 -K : do not use unless you know what you are doing.
41d73075 1852 -O : ignored for backward compatibility
2304df62 1853 -S : perform variable substitutions on all .SH files (can mix with -f)
a0d0e21e
LW
1854 -U : undefine symbol:
1855 -U symbol symbol gets the value 'undef'
1856 -U symbol= symbol gets completely empty
3f30fabf 1857 e.g.: -Uversiononly
02e93a22 1858 -A : manipulate symbol after the platform specific hints have been applied:
2ac814f3
MB
1859 -A append:symbol=value append value to symbol
1860 -A symbol=value like append:, but with a separating space
1861 -A define:symbol=value define symbol to have value
1862 -A clear:symbol define symbol to be ''
1863 -A define:symbol define symbol to be 'define'
1864 -A eval:symbol=value define symbol to be eval of value
1865 -A prepend:symbol=value prepend value to symbol
1866 -A undef:symbol define symbol to be 'undef'
1867 -A undef:symbol= define symbol to be ''
3f30fabf 1868 e.g.: -A prepend:libswanted='cl pthread '
2ac814f3 1869 -A ccflags=-DSOME_MACRO
2304df62
AD
1870 -V : print version number and exit (with a zero status).
1871EOM
1872 exit 1
1873 ;;
1874esac
1875
dfe9444c
AD
1876: Sanity checks
1877case "$fastread$alldone" in
1878yescont|yesexit) ;;
1879*)
aaeb8e51
GS
1880 case "$extractsh" in
1881 true) ;;
1882 *)
1883 if test ! -t 0; then
1884 echo "Say 'sh Configure', not 'sh <Configure'"
1885 exit 1
1886 fi
1887 ;;
1888 esac
dfe9444c
AD
1889 ;;
1890esac
1891
2304df62
AD
1892exec 4>&1
1893case "$silent" in
1894true) exec 1>/dev/null;;
1895esac
1896
ecfc5424 1897: run the defines and the undefines, if any, but leave the file out there...
1aef975c 1898touch optdef.sh
e244340e 1899grep '\\' optdef.sh >/dev/null 2>&1
e6704a40
MB
1900if test $? = 0; then
1901 echo "Configure does not support \\ in -D arguments"
1902 exit 1
1903fi
1aef975c 1904. ./optdef.sh
02e93a22
JH
1905: create the posthint manipulation script and leave the file out there...
1906touch posthint.sh
a0d0e21e 1907
2304df62 1908: set package name
34f1896b 1909package='perl5'
b4eb6b3d
JH
1910first=`echo $package | sed -e 's/^\(.\).*/\1/'`
1911last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
e129ac51
AB
1912case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
1913ABYZ-abyz) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
b4eb6b3d
JH
1914*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
1915esac
2304df62 1916
2304df62
AD
1917: Some greps do not return status, grrr.
1918echo "grimblepritz" >grimble
1919if grep blurfldyick grimble >/dev/null 2>&1 ; then
1920 contains=contains
1921elif grep grimblepritz grimble >/dev/null 2>&1 ; then
1922 contains=grep
1923else
1924 contains=contains
1925fi
1926rm -f grimble
1927: the following should work in any shell
1928case "$contains" in
1929contains*)
1930 echo " "
1931 echo "AGH! Grep doesn't return a status. Attempting remedial action."
1932 cat >contains <<'EOSS'
1933grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
1934EOSS
1935chmod +x contains
1936esac
1937
dfe9444c
AD
1938: Find the path to the source tree
1939case "$src" in
1940'') case "$0" in
b233458b
JH
1941 */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
1942 case "$src" in
1943 /*) ;;
8504afb7 1944 .) ;;
b233458b
JH
1945 *) src=`cd ../$src && pwd` ;;
1946 esac
1947 ;;
dfe9444c
AD
1948 *) src='.';;
1949 esac;;
1950esac
1951case "$src" in
1952'') src=/
1953 rsrc=/
1954 ;;
34f1896b
MB
1955/*) rsrc="$src";;
1956*) rsrc="../$src";;
dfe9444c
AD
1957esac
1958if test -f $rsrc/Configure && \
34f1896b 1959 $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
dfe9444c
AD
1960then
1961 : found it, so we are ok.
1962else
1963 rsrc=''
1964 for src in . .. ../.. ../../.. ../../../..; do
1965 if test -f ../$src/Configure && \
1966 $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
1967 then
1968 rsrc=../$src
1969 break
1970 fi
1971 done
1972fi
1973case "$rsrc" in
1974'')
1975 cat <<EOM >&4
1976
1977Sorry, I can't seem to locate the source dir for $package. Please start
1978Configure with an explicit path -- i.e. /some/path/Configure.
1979
1980EOM
1981 exit 1
1982 ;;
1983../.) rsrc='..';;
1984*)
1985 echo " "
1986 echo "Sources for $package found in \"$src\"." >&4
1987 ;;
1988esac
1989
1990: script used to extract .SH files with variable substitutions
1991cat >extract <<'EOS'
a02608de 1992PERL_CONFIG_SH=true
dfe9444c 1993echo "Doing variable substitutions on .SH files..."
24ccb310
JH
1994if test -f MANIFEST; then
1995 set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
dfe9444c
AD
1996else
1997 echo "(Looking for .SH files under the source directory.)"
6904989c 1998 set x `(cd "$src"; find . -name "*.SH" -print)`
dfe9444c
AD
1999fi
2000shift
2001case $# in
6904989c 20020) set x `(cd "$src"; echo *.SH)`; shift;;
dfe9444c 2003esac
6904989c 2004if test ! -f "$src/$1"; then
dfe9444c
AD
2005 shift
2006fi
2007mkdir_p='
2008name=$1;
2009create="";
2010while test $name; do
2011 if test ! -d "$name"; then
2012 create="$name $create";
2013 name=`echo $name | sed -e "s|^[^/]*$||"`;
2014 name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
2015 else
2016 name="";
2017 fi;
2018done;
2019for file in $create; do
2020 mkdir $file;
2021done
2022'
2023for file in $*; do
2024 case "$src" in
2025 ".")
2026 case "$file" in
2027 */*)
2028 dir=`expr X$file : 'X\(.*\)/'`
2029 file=`expr X$file : 'X.*/\(.*\)'`
6904989c 2030 (cd "$dir" && . ./$file)
dfe9444c
AD
2031 ;;
2032 *)
2033 . ./$file
2034 ;;
2035 esac
2036 ;;
2037 *)
2038 case "$file" in
2039 */*)
2040 dir=`expr X$file : 'X\(.*\)/'`
2041 file=`expr X$file : 'X.*/\(.*\)'`
2042 (set x $dir; shift; eval $mkdir_p)
6904989c 2043 sh <"$src/$dir/$file"
dfe9444c
AD
2044 ;;
2045 *)
6904989c 2046 sh <"$src/$file"
dfe9444c
AD
2047 ;;
2048 esac
2049 ;;
2050 esac
2051done
6904989c 2052if test -f "$src/config_h.SH"; then
dfe9444c
AD
2053 if test ! -f config.h; then
2054 : oops, they left it out of MANIFEST, probably, so do it anyway.
6904989c 2055 . "$src/config_h.SH"
dfe9444c
AD
2056 fi
2057fi
2058EOS
2059
2060: extract files and exit if asked to do so
2061case "$extractsh" in
2062true)
2063 case "$realsilent" in
2064 true) ;;
2065 *) exec 1>&4;;
2066 esac
2067 case "$config_sh" in
2068 '') config_sh='config.sh';;
2069 esac
2070 echo " "
2071 echo "Fetching answers from $config_sh..."
2072 cd ..
2073 . $config_sh
7a4fcb3f 2074 . UU/optdef.sh
dfe9444c
AD
2075 echo " "
2076 . UU/extract
2077 rm -rf UU
24ccb310 2078 echo "Extraction done."
dfe9444c
AD
2079 exit 0
2080 ;;
2081esac
2082
2083: Eunice requires " " instead of "", can you believe it
2084echo " "
2085: Here we go...
2086echo "Beginning of configuration questions for $package."
2087
2088trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
2089
2304df62
AD
2090: first determine how to suppress newline on echo command
2091echo " "
2092echo "Checking echo to see how to suppress newlines..."
2093(echo "hi there\c" ; echo " ") >.echotmp
2094if $contains c .echotmp >/dev/null 2>&1 ; then
2095 echo "...using -n."
2096 n='-n'
2097 c=''
2098else
2099 cat <<'EOM'
2100...using \c
2101EOM
2102 n=''
2103 c='\c'
2104fi
2105echo $n "The star should be here-->$c"
2106echo '*'
2107rm -f .echotmp
2108
2109: Now test for existence of everything in MANIFEST
2110echo " "
6904989c 2111if test -f "$rsrc/MANIFEST"; then
2304df62 2112 echo "First let's make sure your kit is complete. Checking..." >&4
1d8eaf8c 2113 awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
776a38e3 2114 (split -l 50 2>/dev/null || split -50)
2304df62 2115 rm -f missing
dfe9444c 2116 tmppwd=`pwd`
2304df62 2117 for filelist in x??; do
776a38e3
MB
2118 (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
2119 >/dev/null 2>>"$tmppwd/missing")
2304df62
AD
2120 done
2121 if test -s missing; then
2122 cat missing >&4
2123 cat >&4 <<'EOM'
2124
2125THIS PACKAGE SEEMS TO BE INCOMPLETE.
2126
2127You have the option of continuing the configuration process, despite the
2128distinct possibility that your kit is damaged, by typing 'y'es. If you
2129do, don't blame me if something goes wrong. I advise you to type 'n'o
7f2de2d2 2130and contact the author (perlbug@perl.org).
2304df62
AD
2131
2132EOM
2133 echo $n "Continue? [n] $c" >&4
2134 read ans
2135 case "$ans" in
2136 y*)
2137 echo "Continuing..." >&4
2138 rm -f missing
2139 ;;
2140 *)
2141 echo "ABORTING..." >&4
2142 kill $$
2143 ;;
2144 esac
2145 else
dfe9444c 2146 echo "Looks good..."
2304df62
AD
2147 fi
2148else
2149 echo "There is no MANIFEST file. I hope your kit is complete !"
2150fi
2151rm -f missing x??
2152
5ff3f7a4
GS
2153: Find the appropriate value for a newline for tr
2154if test -n "$DJGPP"; then
2155 trnl='\012'
2156fi
2157if test X"$trnl" = X; then
7e69463d 2158 case "`echo foo | tr '\n' x 2>/dev/null`" in
5ff3f7a4
GS
2159 foox) trnl='\n' ;;
2160 esac
2161fi
2162if test X"$trnl" = X; then
7e69463d 2163 case "`echo foo | tr '\012' x 2>/dev/null`" in
5ff3f7a4
GS
2164 foox) trnl='\012' ;;
2165 esac
2166fi
2167if test X"$trnl" = X; then
7e69463d 2168 case "`echo foo | tr '\r\n' xy 2>/dev/null`" in
8be2c24c
JH
2169 fooxy) trnl='\n\r' ;;
2170 esac
2171fi
2172if test X"$trnl" = X; then
5ff3f7a4
GS
2173 cat <<EOM >&2
2174
2175$me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
2176
2177EOM
2178 exit 1
2179fi
2180
2304df62
AD
2181: compute the number of columns on the terminal for proper question formatting
2182case "$COLUMNS" in
2183'') COLUMNS='80';;
2184esac
2185
2186: set up the echo used in my read
2187myecho="case \"\$xxxm\" in
2188'') echo $n \"\$rp $c\" >&4;;
2189*) case \"\$rp\" in
2190 '') echo $n \"[\$xxxm] $c\";;
2191 *)
2192 if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
2193 echo \"\$rp\" >&4
2194 echo $n \"[\$xxxm] $c\" >&4
2195 else
2196 echo $n \"\$rp [\$xxxm] $c\" >&4
2197 fi
2198 ;;
2199 esac;;
2200esac"
2201
2202: now set up to do reads with possible shell escape and default assignment
2203cat <<EOSC >myread
28757baa 2204$startsh
2304df62
AD
2205xxxm=\$dflt
2206$myecho
2207ans='!'
2208case "\$fastread" in
2209yes) case "\$dflt" in
2210 '') ;;
2211 *) ans='';
2212 case "\$silent-\$rp" in
2213 true-) ;;
2214 *) echo " " >&4;;
2215 esac;;
2216 esac;;
2217*) case "\$silent" in
2218 true) case "\$rp" in
2219 '') ans='';;
2220 esac;;
2221 esac;;
2222esac
2223while expr "X\$ans" : "X!" >/dev/null; do
2224 read answ
2225 set x \$xxxm
2226 shift
dfe9444c 2227 aok=''; eval "ans=\\"\$answ\\"" && aok=y
2304df62 2228 case "\$answ" in
dfe9444c
AD
2229 "!")
2230 sh 1>&4
2231 echo " "
2232 $myecho
2233 ;;
2234 !*)
2235 set x \`expr "X\$ans" : "X!\(.*\)\$"\`
2236 shift
2237 sh 1>&4 -c "\$*"
2238 echo " "
2239 $myecho
2240 ;;
2304df62
AD
2241 "\$ans")
2242 case "\$ans" in
ecfc5424
AD
2243 \\&*)
2244 set x \`expr "X\$ans" : "X&\(.*\)\$"\`
2245 shift
2246 case "\$1" in
2247 -d)
2248 fastread=yes
40a7a20a 2249 echo "(OK, I'll run with -d after this question.)" >&4
ecfc5424
AD
2250 ;;
2251 -*)
40a7a20a 2252 echo "*** Sorry, \$1 not supported yet." >&4
ecfc5424
AD
2253 ;;
2254 esac
2255 $myecho
2256 ans=!
2257 ;;
2304df62
AD
2258 esac;;
2259 *)
2260 case "\$aok" in
2261 y)
2262 echo "*** Substitution done -- please confirm."
2263 xxxm="\$ans"
c9795ab7 2264 ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
2304df62
AD
2265 xxxm="\$ans"
2266 ans=!
2267 ;;
2268 *)
2269 echo "*** Error -- try again."
2270 ans=!
2271 ;;
2272 esac
2273 $myecho
2274 ;;
2275 esac
2276 case "\$ans\$xxxm\$nostick" in
2277 '')
2278 ans=!
2279 $myecho
2280 ;;
2281 esac
2282done
2283case "\$ans" in
2284'') ans="\$xxxm";;
2285esac
2286EOSC
2287
2288: create .config dir to save info across Configure sessions
2289test -d ../.config || mkdir ../.config
2290cat >../.config/README <<EOF
2291This directory created by Configure to save information that should
dfe9444c 2292persist across sessions for $package.
2304df62
AD
2293
2294You may safely delete it if you wish.
2295EOF
2296
613d6c3e 2297: See if we are using a devel version and want that
9507cadf 2298xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
af960fef 2299case "$usedevel" in
1be1b388
MB
2300$define|true|[yY]*)
2301 usedevel="$define" ;;
9507cadf 2302*) case "$xversion" in
0107c034
JH
2303 *[13579])
2304 cat >&4 <<EOH
2305*** WHOA THERE!!! ***
2306
2307 This is an UNSTABLE DEVELOPMENT release.
9507cadf
JH
2308 The version of this $package distribution is $xversion, that is, odd,
2309 (as opposed to even) and that signifies a development release.
3d5d58b1 2310 If you want a maintenance release, you want an even-numbered version.
0107c034
JH
2311
2312 Do ***NOT*** install this into production use.
2313 Data corruption and crashes are possible.
2314
2315 It is most seriously suggested that you do not continue any further
2316 unless you want to help in developing and debugging Perl.
2317
6adc6a45
JH
2318 If you *still* want to build perl, you can answer 'y' now,
2319 or pass -Dusedevel to Configure.
2320
0107c034
JH
2321EOH
2322 rp='Do you really want to continue?'
2323 dflt='n'
2324 . ./myread
2325 case "$ans" in
8feeef0e
JH
2326 [yY]) echo >&4 "Okay, continuing."
2327 usedevel="$define" ;;
0107c034
JH
2328 *) echo >&4 "Okay, bye."
2329 exit 1
2330 ;;
2331 esac
2332 ;;
2333 esac
1be1b388 2334 usedevel="$undef"
0107c034
JH
2335 ;;
2336esac
8feeef0e
JH
2337case "$usedevel" in
2338$define|true|[yY]*)
2339 case "$versiononly" in
2340 '') versiononly="$define" ;;
2341 esac
2342 case "$installusrbinperl" in
2343 '') installusrbinperl="$undef" ;;
2344 esac
2345 ;;
2346esac
0107c034 2347
2304df62
AD
2348: general instructions
2349needman=true
2350firsttime=true
760ac839 2351user=`(logname) 2>/dev/null`
dfe9444c
AD
2352case "$user" in
2353'') user=`whoami 2>&1`;;
760ac839 2354esac
2304df62
AD
2355if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
2356 firsttime=false
2357 echo " "
2358 rp='Would you like to see the instructions?'
2359 dflt=n
2360 . ./myread
2361 case "$ans" in
2362 [yY]*) ;;
2363 *) needman=false;;
2364 esac
2365fi
2366if $needman; then
2367 cat <<EOH
4e2a5f63 2368
2304df62 2369This installation shell script will examine your system and ask you questions
a0d0e21e 2370to determine how the perl5 package should be installed. If you get
2304df62
AD
2371stuck on a question, you may use a ! shell escape to start a subshell or
2372execute a command. Many of the questions will have default answers in square
2373brackets; typing carriage return will give you the default.
2374
2375On some of the questions which ask for file or directory names you are allowed
2376to use the ~name construct to specify the login directory belonging to "name",
2377even if you don't have a shell which knows about that. Questions where this is
2378allowed will be marked "(~name ok)".
2379
2380EOH
2381 rp=''
2382 dflt='Type carriage return to continue'
2383 . ./myread
2384 cat <<'EOH'
2385
2386The prompter used in this script allows you to use shell variables and
2387backticks in your answers. You may use $1, $2, etc... to refer to the words
2388in the default answer, as if the default line was a set of arguments given to a
2389script shell. This means you may also use $* to repeat the whole default line,
2390so you do not have to re-type everything to add something to the default.
2391
cd95ead5 2392Every time there is a substitution, you will have to confirm. If there is an
2304df62
AD
2393error (e.g. an unmatched backtick), the default answer will remain unchanged
2394and you will be prompted again.
2395
2396If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
2397the questions and use the computed defaults (or the previous answers if there
2398was already a config.sh file). Type 'Configure -h' for a list of options.
ecfc5424 2399You may also start interactively and then answer '& -d' at any prompt to turn
dfe9444c 2400on the non-interactive behaviour for the remainder of the execution.
2304df62
AD
2401
2402EOH
2403 . ./myread
2404 cat <<EOH
2405
2406Much effort has been expended to ensure that this shell script will run on any
2407Unix system. If despite that it blows up on yours, your best bet is to edit
40000a8c
AD
2408Configure and run it again. If you can't run Configure for some reason,
2409you'll have to generate a config.sh file by hand. Whatever problems you
7f2de2d2 2410have, let me (perlbug@perl.org) know how I blew it.
2304df62
AD
2411
2412This installation script affects things in two ways:
2413
24141) it may do direct variable substitutions on some of the files included
2415 in this kit.
24162) it builds a config.h file for inclusion in C programs. You may edit
2417 any of these files as the need arises after running this script.
2418
2419If you make a mistake on a question, there is no easy way to back up to it
2420currently. The easiest thing to do is to edit config.sh and rerun all the SH
2421files. Configure will offer to let you do this before it runs the SH files.
2422
2423EOH
2424 dflt='Type carriage return to continue'
2425 . ./myread
2426 case "$firsttime" in
2427 true) echo $user >>../.config/instruct;;
2428 esac
2429fi
2430
56b575b9
MB
2431: Set 'sysroot' to change the logical root directory to your headers and libraries see man gcc
2432: This is primarily meant for cross-compile environments, and may fail to be useful in other cases
2433if test "X$sysroot" = X; then
2434 sysroot=""
2435else
2436 case "$cc" in
2437 *gcc*|*g++*)
2438 echo "Using $sysroot to find your headers and libraries, adding to ccflags"
2439 # _sysroot is used in places where we need --sysroot=foo
2440 # but using the rest of the flags could cause issues.
2441 _sysroot="--sysroot=$sysroot";
2442 case "$ccflags" in
2443 *sysroot*) ;;
2444 'undef'|*)
2445 ccflags="$ccflags $_sysroot"
2446 esac
2447 case "$ldflags" in
2448 *sysroot*) ;;
2449 'undef'|*)
2450 ldflags="$ldflags $_sysroot"
2451 esac
2452 case "$cppflags" in
2453 *sysroot*) ;;
2454 'undef'|*)
2455 cppflags="$cppflags $_sysroot"
2456 esac
2457 # lddlflags updated below in lddlflags section;
2458 # same with cccdlflags
2459 ;;
2460 esac
2461
2462 # Adjust some defaults to also use $sysroot
2463 for var in xlibpth loclibpth locincpth glibpth; do
2464 eval xxx=\$$var
2465 eval $var=''
2466 for path in $xxx; do
2467 eval $var=\"\$$var $sysroot$path\"
2468 done
2469 done
2470
2471fi
2472
2304df62
AD
2473: find out where common programs are
2474echo " "
2475echo "Locating common programs..." >&4
2476cat <<EOSC >loc
2477$startsh
2478case \$# in
24790) exit 1;;
2480esac
2481thing=\$1
2482shift
2483dflt=\$1
2484shift
2485for dir in \$*; do
2486 case "\$thing" in
2487 .)
2488 if test -d \$dir/\$thing; then
2489 echo \$dir
2490 exit 0
2491 fi
2492 ;;
2493 *)
a0d0e21e 2494 for thisthing in \$dir/\$thing; do
ecfc5424 2495 : just loop through to pick last item
a0d0e21e 2496 done
25f94b33 2497 if test -f \$thisthing; then
a0d0e21e 2498 echo \$thisthing
2304df62 2499 exit 0
a5a94ea5
JH
2500 elif test "X$_exe" != X -a -f \$thisthing$_exe; then
2501 echo \$thisthing
776a38e3 2502 exit 0
2304df62 2503 elif test -f \$dir/\$thing.exe; then
c4f23d77
AD
2504 if test -n "$DJGPP"; then
2505 echo \$dir/\$thing.exe
b921d661 2506 elif test "$eunicefix" != ":"; then
c4f23d77
AD
2507 : on Eunice apparently
2508 echo \$dir/\$thing
2509 fi
2d736872 2510 exit 0
2304df62
AD
2511 fi
2512 ;;
2513 esac
2514done
2515echo \$dflt
2516exit 1
2517EOSC
2518chmod +x loc
2519$eunicefix loc
2520loclist="
2521awk
2522cat
f8006fac 2523chmod
b4eb6b3d
JH
2524comm
2525cp
2304df62
AD
2526echo
2527expr
2528grep
a0d0e21e 2529ls
b4eb6b3d 2530mkdir
2304df62
AD
2531rm
2532sed
b4eb6b3d 2533sort
85e6fe83 2534touch
2304df62 2535tr
b4eb6b3d 2536uniq
2304df62
AD
2537"
2538trylist="
dfe9444c 2539ar
3659ebf1 2540bison
b4eb6b3d 2541byacc
2304df62 2542cpp
b4eb6b3d 2543csh
2304df62
AD
2544date
2545egrep
1fef16b3 2546gmake
8ff267be 2547gzip
b4eb6b3d 2548less
8ff267be 2549ln
3c728e00 2550make
b4eb6b3d 2551more
693762b4 2552nm
b4eb6b3d 2553nroff
b8677e3b 2554perl
b4eb6b3d 2555pg
2304df62
AD
2556test
2557uname
8ff267be 2558zip
2304df62 2559"
8e07c86e 2560pth=`echo $PATH | sed -e "s/$p_/ /g"`
98b12e44 2561pth="$pth $sysroot/lib $sysroot/usr/lib"
2304df62 2562for file in $loclist; do
dfe9444c
AD
2563 eval xxx=\$$file
2564 case "$xxx" in
2565 /*|?:[\\/]*)
2566 if test -f "$xxx"; then
2567 : ok
2568 else
2569 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2570 xxx=`./loc $file $file $pth`
2571 fi
2572 ;;
2573 '') xxx=`./loc $file $file $pth`;;
2574 *) xxx=`./loc $xxx $xxx $pth`;;
2575 esac
a5a94ea5 2576 eval $file=$xxx$_exe
2304df62
AD
2577 eval _$file=$xxx
2578 case "$xxx" in
2579 /*)
2580 echo $file is in $xxx.
2581 ;;
8e07c86e
AD
2582 ?:[\\/]*)
2583 echo $file is in $xxx.
2584 ;;
2304df62 2585 *)
25f94b33
AD
2586 echo "I don't know where '$file' is, and my life depends on it." >&4
2587 echo "Go find a public domain implementation or fix your PATH setting!" >&4
4633a7c4 2588 exit 1
2304df62
AD
2589 ;;
2590 esac
2591done
2592echo " "
2593echo "Don't worry if any of the following aren't found..."
2594say=offhand
2595for file in $trylist; do
dfe9444c
AD
2596 eval xxx=\$$file
2597 case "$xxx" in
2598 /*|?:[\\/]*)
2599 if test -f "$xxx"; then
2600 : ok
2601 else
2602 echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
2603 xxx=`./loc $file $file $pth`
2604 fi
2605 ;;
2606 '') xxx=`./loc $file $file $pth`;;
2607 *) xxx=`./loc $xxx $xxx $pth`;;
2608 esac
306a8474 2609 eval $file=$xxx$_exe
2304df62
AD
2610 eval _$file=$xxx
2611 case "$xxx" in
2612 /*)
2613 echo $file is in $xxx.
2614 ;;
8e07c86e
AD
2615 ?:[\\/]*)
2616 echo $file is in $xxx.
2617 ;;
2304df62
AD
2618 *)
2619 echo "I don't see $file out there, $say."
2620 say=either
2621 ;;
2622 esac
2623done
2624case "$egrep" in
1fef16b3 2625egrep)
2304df62
AD
2626 echo "Substituting grep for egrep."
2627 egrep=$grep
868439a2 2628 _egrep=$grep
2304df62
AD
2629 ;;
2630esac
3141af47
MB
2631case "$less" in
2632'') ;;
a872f748 2633*) if $less -R </dev/null >/dev/null 2>&1; then
3141af47
MB
2634 echo "Substituting less -R for less."
2635 less="$less -R"
2636 _less=$less
2637 fi
2638 ;;
2639esac
8ff267be 2640case "$ln" in
1fef16b3 2641ln)
8ff267be
PP
2642 echo "Substituting cp for ln."
2643 ln=$cp
868439a2 2644 _ln=$cp
8ff267be
PP
2645 ;;
2646esac
2e26f1d5 2647case "$make" in
613d6c3e 2648make)
2e26f1d5
JH
2649 case "$gmake" in
2650 gmake)
2651 echo "I can't find make or gmake, and my life depends on it." >&4
2652 echo "Go find a public domain implementation or fix your PATH setting!" >&4
2653 exit 1
2654 ;;
2655 esac
2656 ;;
613d6c3e 2657esac
2e26f1d5
JH
2658case "$gmake" in
2659gmake) ;;
2660*) # We can't have osname yet.
1fef16b3
JH
2661 if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
2662 # Assume that gmake, if found, is definitely GNU make
2663 # and prefer it over the system make.
2664 echo "Substituting gmake for make."
2665 make=$gmake
868439a2 2666 _make=$gmake
1fef16b3
JH
2667 fi
2668 ;;
a5a94ea5 2669esac
2304df62
AD
2670case "$test" in
2671test)
2672 echo "Hopefully test is built into your sh."
2673 ;;
2674*)
73614538 2675 if `sh -c "PATH= test true" >/dev/null 2>&1`; then
5d644a95 2676 echo "Using the test built into your sh."
2304df62
AD
2677 test=test
2678 _test=test
2679 fi
2680 ;;
2681esac
2682case "$echo" in
2683echo)
2684 echo "Hopefully echo is built into your sh."
2685 ;;
2686'') ;;
2687*)
2688 echo " "
2689echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
2690 $echo $n "hi there$c" >foo1
2691 echo $n "hi there$c" >foo2
2692 if cmp foo1 foo2 >/dev/null 2>&1; then
2693 echo "They are compatible. In fact, they may be identical."
2694 else
2695 case "$n" in
2696 '-n') n='' c='\c';;
2697 *) n='-n' c='';;
2698 esac
2699 cat <<FOO
2700They are not compatible! You are probably running ksh on a non-USG system.
2701I'll have to use $echo instead of the builtin, since Bourne shell doesn't
2702have echo built in and we may have to run some Bourne shell scripts. That
2703means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
2704
2705FOO
2706 $echo $n "The star should be here-->$c"
2707 $echo "*"
2708 fi
2709 $rm -f foo1 foo2
2710 ;;
2711esac
2712
2f88d857
MB
2713# This question was auctioned at YAPC::Europe-2007 in Vienna
2714# I never promised you could answer it. I only auctioned the question.
2715cat <<FOO
2716The following message is sponsored by
2717
2718 Dresden.pm<--The stars should be here.
2719
2720Dear Perl user, system administrator or package
2721maintainer, the Perl community sends greetings to
2722you. Do you (emblematical) greet back [Y/n]? n
2723
2724FOO
2725
613d6c3e 2726: Check what type of C compiler we use
6b769f8f 2727cat <<EOS >trygcc
2573c5f9
JH
2728$startsh
2729EOS
6b769f8f 2730cat <<'EOSC' >>trygcc
2573c5f9
JH
2731case "$cc" in
2732'') ;;
2733*) $rm -f try try.*
2734 $cat >try.c <<EOM
2735int main(int argc, char *argv[]) {
2736 return 0;
2737}
2738EOM
e4778687 2739 if $cc -o try $ccflags $ldflags try.c; then
2573c5f9
JH
2740 :
2741 else
2742 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2743 despair=yes
2744 trygcc=yes
2745 case "$cc" in
2746 *gcc*) trygcc=no ;;
2747 esac
dce40316
AD
2748 # Skip this test because it gives a false match on output like:
2749 # ./trygcc: line 23: cc: command not found
2750 # case "`$cc -v -c try.c 2>&1`" in
2751 # *gcc*) trygcc=no ;;
2752 # esac
2573c5f9
JH
2753 if $test X"$trygcc" = Xyes; then
2754 if gcc -o try -c try.c; then
2755 echo " "
2756 echo "You seem to have a working gcc, though." >&4
dce40316
AD
2757 # Switching compilers may undo the work of hints files.
2758 # The most common problem is -D_REENTRANT for threads.
2759 # This heuristic catches that case, but gets false positives
2760 # if -Dusethreads was not actually specified. Better to
d0166596 2761 # bail out here with a useful message than fail
dce40316
AD
2762 # mysteriously later. Should we perhaps just try to
2763 # re-invoke Configure -Dcc=gcc config_args ?
2764 if $test -f usethreads.cbu; then
d0166596 2765 $cat >&4 <<EOM
dce40316
AD
2766
2767*** However, any setting of the C compiler flags (e.g. for thread support)
2768*** will be lost. It may be necessary for you to restart Configure and
2769*** add -Dcc=gcc to your Configure command line.
2770
2771EOM
2772 rp="Would you like to go ahead and try gcc anyway?"
2773 dflt=n
2774 else
2775 rp="Would you like to use it?"
2776 dflt=y
2777 fi
2573c5f9
JH
2778 if $test -f myread; then
2779 . ./myread
2780 else
2781 if $test -f UU/myread; then
2782 . ./UU/myread
2783 else
2784 echo "Cannot find myread, sorry. Aborting." >&2
2785 exit 1
2786 fi
d0166596 2787 fi
2573c5f9 2788 case "$ans" in
6371411c 2789 [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
2573c5f9
JH
2790 esac
2791 fi
2792 fi
6b769f8f
RB
2793 fi
2794 $rm -f try try.*
2795 ;;
2796esac
2797EOSC
2798
2799cat <<EOS >checkcc
2800$startsh
2801EOS
2802cat <<'EOSC' >>checkcc
d0166596 2803case "$cc" in
6b769f8f 2804'') ;;
d0166596 2805*) $rm -f try try.*
6b769f8f
RB
2806 $cat >try.c <<EOM
2807int main(int argc, char *argv[]) {
2808 return 0;
2809}
2810EOM
2811 if $cc -o try $ccflags $ldflags try.c; then
2812 :
2813 else
2573c5f9 2814 if $test X"$despair" = Xyes; then
6b769f8f
RB
2815 echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
2816 fi
d0166596 2817 $cat >&4 <<EOM
5dd4fbdf
MB
2818You need to find a working C compiler.
2819Either (purchase and) install the C compiler supplied by your OS vendor,
2820or for a free C compiler try http://gcc.gnu.org/
2821I cannot continue any further, aborting.
2822EOM
6b769f8f 2823 exit 1
2573c5f9
JH
2824 fi
2825 $rm -f try try.*
2826 ;;
2827esac
2828EOSC
2829
a0d0e21e
LW
2830: determine whether symbolic links are supported
2831echo " "
2832$touch blurfl
2833if $ln -s blurfl sym > /dev/null 2>&1 ; then
2834 echo "Symbolic links are supported." >&4
818f00be 2835 lns="$ln -s"
a0d0e21e
LW
2836else
2837 echo "Symbolic links are NOT supported." >&4
2838 lns="$ln"
2839fi
2840$rm -f blurfl sym
2841
dafca956
JH
2842: determine whether symbolic links are supported
2843echo " "
2844case "$lns" in
18ea2752 2845*"ln"*" -s")
dafca956
JH
2846 echo "Checking how to test for symbolic links..." >&4
2847 $lns blurfl sym
4b661809 2848 if $test "X$issymlink" = X; then
2e2a97a6
JH
2849 case "$newsh" in
2850 '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2851 *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
2852 esac
5d644a95
MB
2853 if test $? = 0; then
2854 issymlink="test -h"
2e2a97a6
JH
2855 else
2856 echo "Your builtin 'test -h' may be broken." >&4
2857 case "$test" in
2858 /*) ;;
2859 *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
2860 for p in $pth
2861 do
2862 if test -f "$p/$test"; then
2863 test="$p/$test"
2864 break
2865 fi
2866 done
2867 ;;
2868 esac
2869 case "$test" in
2870 /*)
2871 echo "Trying external '$test -h'." >&4
2872 issymlink="$test -h"
2873 if $test ! -h sym >/dev/null 2>&1; then
3c728e00 2874 echo "External '$test -h' is broken, too." >&4
2e2a97a6
JH
2875 issymlink=''
2876 fi
2877 ;;
2878 *) issymlink='' ;;
2879 esac
1332606d 2880 fi
5d644a95 2881 fi
4b661809 2882 if $test "X$issymlink" = X; then
dafca956 2883 if $test -L sym 2>/dev/null; then
5d644a95 2884 issymlink="$test -L"
2e2a97a6 2885 echo "The builtin '$test -L' worked." >&4
dafca956
JH
2886 fi
2887 fi
4b661809 2888 if $test "X$issymlink" != X; then
5d644a95 2889 echo "You can test for symbolic links with '$issymlink'." >&4
dafca956
JH
2890 else
2891 echo "I do not know how you can test for symbolic links." >&4
2892 fi
2893 $rm -f blurfl sym
2894 ;;
2895*) echo "No symbolic links, so not testing for their testing..." >&4
2896 ;;
2897esac
2898echo " "
2899
34f1896b 2900: Make symlinks util
dafca956
JH
2901case "$mksymlinks" in
2902$define|true|[yY]*)
2903 case "$src" in
2904 ''|'.') echo "Cannot create symlinks in the original directory." >&4
2905 exit 1
2906 ;;
4b661809 2907 *) case "$lns:$issymlink" in
f314eb9f 2908 *"ln"*" -s:"*"test -"?)
dafca956 2909 echo "Creating the symbolic links..." >&4
dafca956 2910 cd ..
7191ba82
AF
2911 awk '{print $1}' $src/MANIFEST | sed -e 's:/\([^/]*\)$: \1:' |
2912 awk 'NF == 1 {
2913 dir=".";
2914 file=$1 "";
2915 }
2916 NF == 2 {
2917 dir=$1 "";
2918 file=$2 "";
2919 }
2920 {
2921 print "# dir = ", dir, "file = ", file
f40bbcbf 2922 mf[dir] = mf[dir]" "source"/"dir"/"file;
7191ba82
AF
2923 } END {
2924 for (d in mf) {
2925 if (d != ".") { print("mkdir -p "d) }
2926 print("ln -sf "mf[d]" "d);
2927 }
f40bbcbf 2928 }' source="$src" > UU/mksymlinks.$$
7191ba82
AF
2929 sh UU/mksymlinks.$$
2930 rm UU/mksymlinks.$$
dafca956
JH
2931 # Sanity check 1.
2932 if test ! -d t/base; then
2933 echo "Failed to create the subdirectories. Aborting." >&4
2934 exit 1
2935 fi
dafca956 2936 # Sanity check 2.
a0d24b8a
JH
2937 if test ! -f t/base/lex.t; then
2938 echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
dafca956
JH
2939 exit 1
2940 fi
7191ba82
AF
2941 if test ! -f win32/win32.c; then
2942 echo "Failed to create the symlinks (win32/win32.c missing). Aborting." >&4
2943 exit 1
2944 fi
dafca956
JH
2945 cd UU
2946 ;;
2947 *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
2948 ;;
2949 esac
2950 ;;
2951 esac
2952 ;;
2953esac
2954
613d6c3e 2955: Check for Cross-Compilation
56b575b9
MB
2956if $test "X$targethost" = "X"; then
2957 targethost=""
2958fi
f53a6e0e
MB
2959if $test "X$targetenv" = "X"; then
2960 targetenv=""
2961fi
5440bc8e
JH
2962case "$usecrosscompile" in
2963$define|true|[yY]*)
93bc48fa 2964 $echo "Cross-compiling..."
56b575b9
MB
2965 croak=''
2966 case "$cc" in
2967 *-gcc*|*-g++*) # A cross-compiling gcc, probably.
2968 # arm-linux-androideabi-gcc -> arm-linux-androideabi
2969 # x86_64-w64-mingw32-gcc.exe -> x86_64-w64-mingw32
2970 targetarch=`$echo $cc|$sed 's/-g[c\+][c\+].*$//'`
2971 ar=`$echo $cc|$sed 's/-g[c\+][c\+]/-ar/'`
2972 # leave out ld, choosing it is more complex
2973 nm=`$echo $cc|$sed 's/-g[c\+][c\+]/-nm/'`
2974 ranlib=`$echo $cc|$sed 's/-g[c\+][c\+]/-ranlib/'`
2975 # We are in a weird spot. Just before us, some values
2976 # were 'saved', to be restored after the hints are
2977 # run. This means that the changes we made to ar,
2978 # nm and ranlib will get reverted.
2979 # To avoid that, we hijack the saving mechanism and
2980 # have it save our new values.
2981 for file in ar nm ranlib; do
2982 eval xxx=\$$file
2983 eval $file=$xxx$_exe
2984 eval _$file=$xxx
2985 done
2986 ;;
5440bc8e
JH
2987 esac
2988 case "$targetarch" in
93bc48fa 2989 '') echo "Targetarch not defined." >&4; croak=y ;;
56b575b9 2990 *) echo "Using targetarch $targetarch." >&4 ;;
5440bc8e 2991 esac
93bc48fa 2992 case "$targethost" in
23695c07 2993 '') echo "Targethost not defined." >&4; croak=n ;;
56b575b9 2994 *) echo "Using targethost $targethost." >&4
5440bc8e 2995 esac
93bc48fa
JH
2996 locincpth=' '
2997 loclibpth=' '
5440bc8e 2998 case "$croak" in
93bc48fa 2999 y) echo "Cannot continue, aborting." >&4; exit 1 ;;
5440bc8e 3000 esac
b98f6b80
JR
3001 : compile a host miniperl and generate_uudmap, unless we got passed them
3002 if $test "X$hostperl" = X; then
3003 echo "Building host miniperl and generate_uudmap binaries" >&4
4346df8f 3004 before_host=`pwd`
b98f6b80 3005 cd ..
4346df8f
BF
3006 cd $src
3007 src=`pwd`
f53a6e0e
MB
3008 rm -rf $src/host
3009 mkdir $src/host
3010 cd $src/host
4346df8f 3011 $src/Configure -des -Dusedevel -Dmksymlinks
1ca484ac
BF
3012 $make miniperl
3013 case "$hostgenerate" in
3014 '') $make generate_uudmap
f53a6e0e 3015 hostgenerate=$src/host/generate_uudmap
1ca484ac
BF
3016 ;;
3017 "$undef") hostgenerate=''
3018 ;;
3019 esac
4346df8f 3020 hostperl=$src/host/miniperl
4346df8f 3021 cd $before_host
b98f6b80 3022 fi
b36f1e2d 3023 hostosname=`$hostperl -le 'print $^O'`
cb87e003
JR
3024 ;;
3025*)
b75b1e25 3026 usecrosscompile="$undef"
cb87e003
JR
3027 ;;
3028esac
3029
3030: Define -Dtargethost=somecomputer to run compiled tests on another machine
0eafc8c9 3031case "$targethost" in
97076f2d
NW
3032 '') echo "Checking for cross-compile" >&4
3033 case "$usecrosscompile$multiarch" in
dbb1f24e 3034 *$define*) echo "Skipping the try tests in the rest of Configure as no targethost was defined when cross-compiling" >&4
97076f2d
NW
3035 if [ -f Makefile ]; then
3036 echo " "
3037 echo "Now you must ensure config.sh, config.h and the generated headers exist and run a $make."
3038 else
3039 echo "Configure done."
3040 fi
3041 exit 0
3042 ;;
97076f2d 3043 *) echo "No targethost for running compiler tests against defined, running locally" >&4
0eafc8c9
JR
3044 run=''
3045 to=:
3046 from=:
3047 ;;
dbb1f24e
NW
3048 esac
3049 ;;
0eafc8c9 3050 *) echo "Using targethost $targethost." >&4
5440bc8e
JH
3051 case "$src" in
3052 /*) run=$src/Cross/run
93c0359c 3053 targetmkdir=$src/Cross/mkdir
5440bc8e
JH
3054 to=$src/Cross/to
3055 from=$src/Cross/from
3056 ;;
93bc48fa 3057 *) pwd=`$test -f ../Configure & cd ..; pwd`
5440bc8e 3058 run=$pwd/Cross/run
f8006fac 3059 targetmkdir=$pwd/Cross/mkdir
5440bc8e
JH
3060 to=$pwd/Cross/to
3061 from=$pwd/Cross/from
3062 ;;
3063 esac
3064 case "$targetrun" in
3065 '') targetrun=ssh ;;
3066 esac
3067 case "$targetto" in
3068 '') targetto=scp ;;
3069 esac
3070 case "$targetfrom" in
3071 '') targetfrom=scp ;;
3072 esac
56b575b9
MB
3073 run=$run-$targetrun
3074 to=$to-$targetto
3075 from=$from-$targetfrom
93bc48fa
JH
3076 case "$targetdir" in
3077 '') targetdir=/tmp
56b575b9
MB
3078 echo "Guessing targetdir $targetdir." >&4
3079 ;;
93bc48fa 3080 esac
5440bc8e 3081 case "$targetuser" in
93bc48fa 3082 '') targetuser=root
56b575b9
MB
3083 echo "Guessing targetuser $targetuser." >&4
3084 ;;
5440bc8e 3085 esac
dad780ec
JR
3086 case "$targetport" in
3087 '') targetport=22
56b575b9
MB
3088 echo "Guessing targetport $targetport." >&4
3089 ;;
dad780ec 3090 esac
5440bc8e
JH
3091 case "$targetfrom" in
3092 scp) q=-q ;;
3093 *) q='' ;;
3094 esac
3095 case "$targetrun" in
3096 ssh|rsh)
3097 cat >$run <<EOF
3098#!/bin/sh
d1739b52 3099env=''
93c0359c
JH
3100case "\$1" in
3101-cwd)
3102 shift
3103 cwd=\$1
3104 shift
3105 ;;
3106esac
d1739b52
BF
3107case "\$1" in
3108-env)
3109 shift
3110 env=\$1
3111 shift
3112 ;;
3113esac
93c0359c
JH
3114case "\$cwd" in
3115'') cwd=$targetdir ;;
3116esac
5440bc8e
JH
3117exe=\$1
3118shift
dad780ec 3119$to \$exe
03deea9f 3120$targetrun -p $targetport -l $targetuser $targethost "cd \$cwd && \$env \$exe \$@"
5440bc8e
JH
3121EOF
3122 ;;
e9867f21
BF
3123 adb)
3124 $touch $run
3125 ;;
93bc48fa 3126 *) echo "Unknown targetrun '$targetrun'" >&4
5440bc8e
JH
3127 exit 1
3128 ;;
3129 esac
93c0359c
JH
3130 case "$targetmkdir" in
3131 */Cross/mkdir)
3132 cat >$targetmkdir <<EOF
3133#!/bin/sh
dad780ec 3134$targetrun -p $targetport -l $targetuser $targethost "mkdir -p \$@"
93c0359c 3135EOF
f8006fac 3136 $chmod a+rx $targetmkdir
93c0359c
JH
3137 ;;
3138 *) echo "Unknown targetmkdir '$targetmkdir'" >&4
3139 exit 1
3140 ;;
3141 esac
5440bc8e
JH
3142 case "$targetto" in
3143 scp|rcp)
3144 cat >$to <<EOF
3145#!/bin/sh
3146for f in \$@
3147do
93c0359c
JH
3148 case "\$f" in
3149 /*)
3150 $targetmkdir \`dirname \$f\`
f53a6e0e 3151 $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f 2>/dev/null || exit 1
93c0359c
JH
3152 ;;
3153 *)
3154 $targetmkdir $targetdir/\`dirname \$f\`
f53a6e0e 3155 $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f 2>/dev/null || exit 1
93c0359c
JH
3156 ;;
3157 esac
5440bc8e
JH
3158done
3159exit 0
3160EOF
3161 ;;
3162 cp) cat >$to <<EOF
3163#!/bin/sh
93c0359c
JH
3164for f in \$@
3165do
3166 case "\$f" in
3167 /*)
3168 $mkdir -p $targetdir/\`dirname \$f\`
3169 $cp \$f $targetdir/\$f || exit 1
3170 ;;
3171 *)
3172 $targetmkdir $targetdir/\`dirname \$f\`
3173 $cp \$f $targetdir/\$f || exit 1
3174 ;;
3175 esac
3176done
3177exit 0
5440bc8e
JH
3178EOF
3179 ;;
93bc48fa 3180 *) echo "Unknown targetto '$targetto'" >&4
5440bc8e
JH
3181 exit 1
3182 ;;
3183 esac
3184 case "$targetfrom" in
3185 scp|rcp)
3186 cat >$from <<EOF
3187#!/bin/sh
3188for f in \$@
3189do
93c0359c 3190 $rm -f \$f
dad780ec 3191 $targetfrom -P $targetport $q $targetuser@$targethost:$targetdir/\$f . || exit 1
5440bc8e
JH
3192done
3193exit 0
3194EOF
3195 ;;
3196 cp) cat >$from <<EOF
3197#!/bin/sh
3198for f in \$@
3199do
93c0359c 3200 $rm -f \$f
5440bc8e
JH
3201 cp $targetdir/\$f . || exit 1
3202done
3203exit 0
3204EOF
3205 ;;
93bc48fa 3206 *) echo "Unknown targetfrom '$targetfrom'" >&4
5440bc8e
JH
3207 exit 1
3208 ;;
3209 esac
93bc48fa
JH
3210 if $test ! -f $run; then
3211 echo "Target 'run' script '$run' not found." >&4
5440bc8e 3212 else
f8006fac 3213 $chmod a+rx $run
5440bc8e 3214 fi
93bc48fa
JH
3215 if $test ! -f $to; then
3216 echo "Target 'to' script '$to' not found." >&4
5440bc8e 3217 else
f8006fac 3218 $chmod a+rx $to
5440bc8e 3219 fi
93bc48fa
JH
3220 if $test ! -f $from; then
3221 echo "Target 'from' script '$from' not found." >&4
5440bc8e 3222 else
f8006fac 3223 $chmod a+rx $from
5440bc8e 3224 fi
93bc48fa 3225 if $test ! -f $run -o ! -f $to -o ! -f $from; then
5440bc8e
JH
3226 exit 1
3227 fi
3228 cat >&4 <<EOF
f8006fac
JH
3229Using '$run' for remote execution,
3230and '$from' and '$to'
93bc48fa 3231for remote file transfer.
5440bc8e
JH
3232EOF
3233 ;;
3234*) run=''
3235 to=:
3236 from=:
b75b1e25 3237 usecrosscompile="$undef"
5440bc8e
JH
3238 targetarch=''
3239 ;;
3240esac
3241
ecfc5424
AD
3242: see whether [:lower:] and [:upper:] are supported character classes
3243echo " "
e129ac51
AB
3244case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | $tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
3245ABYZ-abyz)
ecfc5424
AD
3246 echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
3247 up='[:upper:]'
3248 low='[:lower:]'
3249 ;;
416d0bea
MB
3250*) # There is a discontinuity in EBCDIC between 'R' and 'S'
3251 # (0xd9 and 0xe2), therefore that is a nice testing point.
3252 if test "X$up" = X -o "X$low" = X; then
3253 case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in
3254 rs) up='[A-Z]'
3255 low='[a-z]'
28e8609d
JH
3256 ;;
3257 esac
416d0bea 3258 fi
28e8609d 3259 if test "X$up" = X -o "X$low" = X; then
416d0bea
MB
3260 case "`echo RS | $tr R-S r-s 2>/dev/null`" in
3261 rs) up='A-Z'
28e8609d
JH
3262 low='a-z'
3263 ;;
3264 esac
416d0bea 3265 fi
28e8609d 3266 if test "X$up" = X -o "X$low" = X; then
416d0bea
MB
3267 case "`echo RS | od -x 2>/dev/null`" in
3268 *D9E2*|*d9e2*)
28e8609d
JH
3269 echo "Hey, this might be EBCDIC." >&4
3270 if test "X$up" = X -o "X$low" = X; then
416d0bea
MB
3271 case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
3272 rs) up='[A-IJ-RS-Z]'
3273 low='[a-ij-rs-z]'
28e8609d
JH
3274 ;;
3275 esac
3276 fi
3277 if test "X$up" = X -o "X$low" = X; then
416d0bea
MB
3278 case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
3279 rs) up='A-IJ-RS-Z'
3280 low='a-ij-rs-z'
28e8609d
JH
3281 ;;
3282 esac
3283 fi
3284 ;;
3285 esac
3286 fi
3287esac
416d0bea
MB
3288case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in
3289rs)
28e8609d
JH
3290 echo "Using $up and $low to convert case." >&4
3291 ;;
ecfc5424 3292*)
28e8609d
JH
3293 echo "I don't know how to translate letters from upper to lower case." >&4
3294 echo "Your tr is not acting any way I know of." >&4
3295 exit 1
3296 ;;
ecfc5424
AD
3297esac
3298: set up the translation script tr, must be called with ./tr of course
3299cat >tr <<EOSC
3300$startsh
3301case "\$1\$2" in
3302'[A-Z][a-z]') exec $tr '$up' '$low';;
3303'[a-z][A-Z]') exec $tr '$low' '$up';;
3304esac
3305exec $tr "\$@"
3306EOSC
3307chmod +x tr
3308$eunicefix tr
3309
2304df62
AD
3310: Try to determine whether config.sh was made on this system
3311case "$config_sh" in
3312'')
43999f95
JH
3313myuname=`$uname -a 2>/dev/null`
3314$test -z "$myuname" && myuname=`hostname 2>/dev/null`
f4dc174a 3315# Downcase everything to avoid ambiguity.
1332606d 3316# Remove slashes and single quotes so we can use parts of this in
f4dc174a
AD
3317# directory and file names.
3318# Remove newlines so myuname is sane to use elsewhere.
28e8609d
JH
3319# tr '[A-Z]' '[a-z]' would not work in EBCDIC
3320# because the A-Z/a-z are not consecutive.
f4dc174a 3321myuname=`echo $myuname | $sed -e "s,['/],,g" | \
3eaeeeae 3322 ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
1aef975c 3323newmyuname="$myuname"
2304df62 3324dflt=n
16d20bd9
AD
3325case "$knowitall" in
3326'')
3327 if test -f ../config.sh; then
3328 if $contains myuname= ../config.sh >/dev/null 2>&1; then
3329 eval "`grep myuname= ../config.sh`"
3330 fi
3331 if test "X$myuname" = "X$newmyuname"; then
3332 dflt=y
3333 fi
2304df62 3334 fi
16d20bd9
AD
3335 ;;
3336*) dflt=y;;
3337esac
2304df62
AD
3338
3339: Get old answers from old config file if Configure was run on the
3340: same system, otherwise use the hints.
3341hint=default
3342cd ..
3343if test -f config.sh; then
16d20bd9
AD
3344 echo " "
3345 rp="I see a config.sh file. Shall I use it to set the defaults?"
2304df62
AD
3346 . UU/myread
3347 case "$ans" in
f83701cd
AD
3348 n*|N*) echo "OK, I'll ignore it."
3349 mv config.sh config.sh.old
3350 myuname="$newmyuname"
3351 ;;
2304df62 3352 *) echo "Fetching default answers from your old config.sh file..." >&4
ecfc5424
AD
3353 tmp_n="$n"
3354 tmp_c="$c"
85cad39c 3355 tmp_sh="$sh"
2304df62
AD
3356 . ./config.sh
3357 cp config.sh UU
ecfc5424
AD
3358 n="$tmp_n"
3359 c="$tmp_c"
85cad39c
PP
3360 : Older versions did not always set $sh. Catch re-use of such
3361 : an old config.sh.
3362 case "$sh" in
3363 '') sh="$tmp_sh" ;;
3364 esac
2304df62
AD
3365 hint=previous
3366 ;;
3367 esac
3368fi
2573c5f9 3369. ./UU/checkcc
2304df62
AD
3370if test ! -f config.sh; then
3371 $cat <<EOM
3372
4e2a5f63
AD
3373First time through, eh? I have some defaults handy for some systems
3374that need some extra help getting the Configure answers right:
2304df62
AD
3375
3376EOM
dfe9444c 3377 (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
2304df62
AD
3378 dflt=''
3379 : Half the following guesses are probably wrong... If you have better
7f2de2d2 3380 : tests or hints, please send them to perlbug@perl.org
2304df62 3381 : The metaconfig authors would also appreciate a copy...
a0d0e21e 3382 $test -f /irix && osname=irix
85e6fe83
LW
3383 $test -f /xenix && osname=sco_xenix
3384 $test -f /dynix && osname=dynix
3385 $test -f /dnix && osname=dnix
5f05dabc
PP
3386 $test -f /lynx.os && osname=lynxos
3387 $test -f /unicos && osname=unicos && osvers=`$uname -r`
c71a9cee 3388 $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
7a4c00b4 3389 $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
85e6fe83 3390 $test -f /bin/mips && /bin/mips && osname=mips
a0d0e21e
LW
3391 $test -d /usr/apollo/bin && osname=apollo
3392 $test -f /etc/saf/_sactab && osname=svr4
0cf583b0 3393 $test -d /usr/include/minix && osname=minix && osvers=`$uname -r`
d54344fc 3394 $test -f /system/gnu_library/bin/ar.pm && osname=vos
dabb2532 3395 $test -f /sys/utilities/MultiView && osname=amigaos
e060872b 3396 if $test -d /MachTen -o -d /MachTen_Folder; then
dfe9444c 3397 osname=machten
4633a7c4 3398 if $test -x /sbin/version; then
dfe9444c 3399 osvers=`/sbin/version | $awk '{print $2}' |
4633a7c4
LW
3400 $sed -e 's/[A-Za-z]$//'`
3401 elif $test -x /usr/etc/version; then
dfe9444c 3402 osvers=`/usr/etc/version | $awk '{print $2}' |
4633a7c4
LW
3403 $sed -e 's/[A-Za-z]$//'`
3404 else
3405 osvers="$2.$3"
3406 fi
3407 fi
aaacdc8b
GS
3408
3409 $test -f /sys/posix.dll &&
3410 $test -f /usr/bin/what &&
3411 set X `/usr/bin/what /sys/posix.dll` &&
3412 $test "$3" = UWIN &&
3413 osname=uwin &&
3414 osvers="$5"
3415
2304df62
AD
3416 if $test -f $uname; then
3417 set X $myuname
3418 shift
3419
2304df62 3420 case "$5" in
85e6fe83 3421 fps*) osname=fps ;;
2304df62
AD
3422 mips*)
3423 case "$4" in
85e6fe83
LW
3424 umips) osname=umips ;;
3425 *) osname=mips ;;
2304df62 3426 esac;;
85e6fe83 3427 [23]100) osname=mips ;;
ecfc5424 3428 i386*)
c6912327
JH
3429 tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
3430 if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
619ffc2b
JH
3431 osname='sco'
3432 osvers=$tmp
3433 elif $test -f /etc/kconfig; then
ecfc5424 3434 osname=isc
bd628c73 3435 if test "$lns" = "$ln -s"; then
a0d0e21e
LW
3436 osvers=4
3437 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
3438 osvers=3
2304df62 3439 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
a0d0e21e 3440 osvers=2
ecfc5424
AD
3441 fi
3442 fi
2000072c 3443 tmp=''
ecfc5424 3444 ;;
c4f23d77
AD
3445 pc*)
3446 if test -n "$DJGPP"; then
3447 osname=dos
3448 osvers=djgpp
3449 fi
3450 ;;
2304df62
AD
3451 esac
3452
3453 case "$1" in
a0d0e21e
LW
3454 aix) osname=aix
3455 tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
3456 case "$tmp" in
e81c5c2a
NC
3457 # oslevel can fail with:
3458 # oslevel: Unable to acquire lock.
3459 *not\ found) osvers="$4"."$3" ;;
a0d0e21e
LW
3460 '<3240'|'<>3240') osvers=3.2.0 ;;
3461 '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
3462 '=3250'|'>3250') osvers=3.2.5 ;;
1aef975c 3463 *) osvers=$tmp;;
a0d0e21e
LW
3464 esac
3465 ;;
287574fe
MB
3466 bitrig) osname=bitrig
3467 osvers="$3"
3468 ;;
aaacdc8b
GS
3469 bsd386) osname=bsd386
3470 osvers=`$uname -r`
3471 ;;
3472 cygwin*) osname=cygwin
3473 osvers="$3"
3474 ;;
23f87696
SZ
3475 *dc.osx) osname=dcosx
3476 osvers="$3"
3477 ;;
a0d0e21e
LW
3478 dnix) osname=dnix
3479 osvers="$3"
3480 ;;
3481 domainos) osname=apollo
3482 osvers="$3"
3483 ;;
a774dfe6
RSG
3484 dgux) osname=dgux
3485 osvers="$3"
3486 ;;
3487 dragonfly) osname=dragonfly
a0d0e21e
LW
3488 osvers="$3"
3489 ;;
760ac839 3490 dynixptx*) osname=dynixptx
e58e581d 3491 osvers=`echo "$4"|sed 's/^v//'`
760ac839 3492 ;;
a774dfe6 3493 freebsd) osname=freebsd
a0d0e21e 3494 osvers="$3" ;;
761ee4e8
BD
3495 genix) osname=genix ;;
3496 gnu) osname=gnu
3497 osvers="$3" ;;
a774dfe6 3498 hp*) osname=hpux
bfb7748a 3499 osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
a0d0e21e 3500 ;;
761ee4e8 3501 irix*) osname=irix
a0d0e21e
LW
3502 case "$3" in
3503 4*) osvers=4 ;;
3504 5*) osvers=5 ;;
ecfc5424 3505 *) osvers="$3" ;;
a0d0e21e
LW
3506 esac
3507 ;;
761ee4e8 3508 linux) osname=linux
a0d0e21e 3509 case "$3" in
a0d0e21e
LW
3510 *) osvers="$3" ;;
3511 esac
78ada538 3512 $test -f /system/lib/libandroid.so && osname=linux-android
a0d0e21e 3513 ;;
761ee4e8 3514 MiNT) osname=mint
28e8609d
JH
3515 ;;
3516 netbsd*) osname=netbsd
ecfc5424
AD
3517 osvers="$3"
3518 ;;
4e81affe
MMIJG
3519 news-os) osvers="$3"
3520 case "$3" in
3521 4*) osname=newsos4 ;;
3522 *) osname=newsos ;;
3523 esac
3524 ;;
28bb1e2c 3525 nonstop-ux) osname=nonstopux ;;
65dc58a1
TM
3526 openbsd) osname=openbsd
3527 osvers="$3"
3528 ;;
5c728af0
IZ
3529 os2) osname=os2
3530 osvers="$4"
3531 ;;
aaacdc8b
GS
3532 POSIX-BC | posix-bc ) osname=posix-bc
3533 osvers="$3"
a0d0e21e 3534 ;;
ae3afa4e
TH
3535 powerux | power_ux | powermax_os | powermaxos | \
3536 powerunix | power_unix) osname=powerux
3537 osvers="$3"
3538 ;;
aaacdc8b
GS
3539 qnx) osname=qnx
3540 osvers="$4"
3541 ;;
a0d0e21e
LW
3542 solaris) osname=solaris
3543 case "$3" in
3544 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
ecfc5424 3545 *) osvers="$3" ;;
a0d0e21e
LW
3546 esac
3547 ;;
85e6fe83
LW
3548 sunos) osname=sunos
3549 case "$3" in
85e6fe83
LW
3550 5*) osname=solaris
3551 osvers=`echo $3 | $sed 's/^5/2/g'` ;;
a0d0e21e 3552 *) osvers="$3" ;;
2304df62
AD
3553 esac
3554 ;;
a0d0e21e 3555 titanos) osname=titanos
85e6fe83 3556 case "$3" in
a0d0e21e
LW
3557 1*) osvers=1 ;;
3558 2*) osvers=2 ;;
3559 3*) osvers=3 ;;
3560 4*) osvers=4 ;;
ecfc5424 3561 *) osvers="$3" ;;
2304df62
AD
3562 esac
3563 ;;
85e6fe83 3564 ultrix) osname=ultrix
ecfc5424 3565 osvers="$3"
2304df62 3566 ;;
28757baa 3567 osf1|mls+) case "$5" in
fed7345c
AD
3568 alpha)
3569 osname=dec_osf
fdd85a03 3570 osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
2aa76180
JH
3571 case "$osvers" in
3572 [1-9].[0-9]*) ;;
3573 *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
3574 esac
ecfc5424
AD
3575 ;;
3576 hp*) osname=hp_osf1 ;;
3577 mips) osname=mips_osf1 ;;
85e6fe83
LW
3578 esac
3579 ;;
af1ff193 3580 # UnixWare 7.1.2 is known as Open UNIX 8
381c1bae 3581 openunix|unixware) osname=svr5
0337d152
A
3582 osvers="$4"
3583 ;;
3c728e00 3584 uts) osname=uts
a0d0e21e
LW
3585 osvers="$3"
3586 ;;
3c728e00
JH
3587 vos) osvers="$3"
3588 ;;
85e6fe83 3589 $2) case "$osname" in
2304df62 3590 *isc*) ;;
a0d0e21e 3591 *freebsd*) ;;
5f05dabc 3592 svr*)
a0d0e21e 3593 : svr4.x or possibly later
a774dfe6 3594 case "svr$3" in
a0d0e21e
LW
3595 ${osname}*)
3596 osname=svr$3
3597 osvers=$4
3598 ;;
3599 esac
3600 case "$osname" in
3601 svr4.0)
3602 : Check for ESIX
3603 if test -f /stand/boot ; then
3604 eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
ecfc5424
AD
3605 if test -n "$INITPROG" -a -f "$INITPROG"; then
3606 isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
3607 if test -n "$isesix"; then
a0d0e21e
LW
3608 osname=esix4
3609 fi
3610 fi
3611 fi
3612 ;;
3613 esac
3614 ;;
2304df62 3615 *) if test -f /etc/systemid; then
a0d0e21e
LW
3616 osname=sco
3617 set `echo $3 | $sed 's/\./ /g'` $4
c4f23d77 3618 if $test -f $src/hints/sco_$1_$2_$3.sh; then
85e6fe83 3619 osvers=$1.$2.$3
c4f23d77 3620 elif $test -f $src/hints/sco_$1_$2.sh; then
85e6fe83 3621 osvers=$1.$2
c4f23d77 3622 elif $test -f $src/hints/sco_$1.sh; then
85e6fe83 3623 osvers=$1
2304df62 3624 fi
a0d0e21e
LW
3625 else
3626 case "$osname" in
3627 '') : Still unknown. Probably a generic Sys V.
3628 osname="sysv"
3629 osvers="$3"
3630 ;;
3631 esac
2304df62
AD
3632 fi
3633 ;;
3634 esac
3635 ;;
a0d0e21e
LW
3636 *) case "$osname" in
3637 '') : Still unknown. Probably a generic BSD.
3638 osname="$1"
3639 osvers="$3"
3640 ;;
3641 esac
3642 ;;
2304df62
AD
3643 esac
3644 else
dfe9444c
AD
3645 if test -f /vmunix -a -f $src/hints/news_os.sh; then
3646 (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
3647 if $contains news-os UU/kernel.what >/dev/null 2>&1; then
3648 osname=news_os
2304df62 3649 fi
dfe9444c 3650 $rm -f UU/kernel.what
5c728af0 3651 elif test -d c:/. -o -n "$is_os2" ; then
8e07c86e
AD
3652 set X $myuname
3653 osname=os2
3654 osvers="$5"
2304df62
AD
3655 fi
3656 fi
a774dfe6 3657
5440bc8e
JH
3658 case "$targetarch" in
3659 '') ;;
3660 *) hostarch=$osname
82643807
BF
3661 case "$targetarch" in
3662 nto*|*-nto-*)
c413f034
BF
3663 # Will load qnx.sh, which should change osname to nto
3664 osname=qnx
0d460bac 3665 osvers=''
82643807
BF
3666 ;;
3667 *linux-android*)
3668 # Catch arm-linux-androideabi, mipsel-linux-android,
3669 # and i686-linux-android
3670 osname=linux-android
0d460bac 3671 osvers=''
82643807 3672 ;;
6f372547
BF
3673 *linux*)
3674 # Something like arm-linux-gnueabihf is really just
3675 # plain linux.
3676 osname=linux
0d460bac
BF
3677 osvers=''
3678 ;;
3679 *solaris*|*sunos*)
3680 osname=solaris
3681 # XXX perhaps we should just assume
3682 # osvers to be 2, or maybe take the value
3683 # from targetarch. Using $run before the
3684 # hints are run is somewhat icky.
3685 set X `$run $uname -a 2>/dev/null`
3686 shift
3687 case "$3" in
3688 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
3689 *) osvers="$3" ;;
3690 esac
6f372547 3691 ;;
82643807 3692 *)
f53a6e0e
MB
3693 osname=`echo $targetarch|sed 's,^[^-]*-,,'`
3694 osvers=''
82643807
BF
3695 ;;
3696 esac
5440bc8e
JH
3697 ;;
3698 esac
3699
a0d0e21e
LW
3700 : Now look for a hint file osname_osvers, unless one has been
3701 : specified already.
3702 case "$hintfile" in
3703 ''|' ')
1e127011 3704 file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
a0d0e21e 3705 : Also try without trailing minor version numbers.
1e127011
DD
3706 xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
3707 xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
3708 xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
3709 xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
a0d0e21e
LW
3710 case "$file" in
3711 '') dflt=none ;;
3712 *) case "$osvers" in
3713 '') dflt=$file
3714 ;;
dfe9444c 3715 *) if $test -f $src/hints/$file.sh ; then
a0d0e21e 3716 dflt=$file
dfe9444c 3717 elif $test -f $src/hints/$xfile.sh ; then
a0d0e21e 3718 dflt=$xfile
dfe9444c 3719 elif $test -f $src/hints/$xxfile.sh ; then
a0d0e21e 3720 dflt=$xxfile
dfe9444c 3721 elif $test -f $src/hints/$xxxfile.sh ; then
a0d0e21e 3722 dflt=$xxxfile
dfe9444c 3723 elif $test -f $src/hints/$xxxxfile.sh ; then
a0d0e21e 3724 dflt=$xxxxfile
dfe9444c 3725 elif $test -f "$src/hints/${osname}.sh" ; then
a0d0e21e
LW
3726 dflt="${osname}"
3727 else
3728 dflt=none
3729 fi
3730 ;;
3731 esac
85e6fe83
LW
3732 ;;
3733 esac
4e2a5f63
AD
3734 if $test -f Policy.sh ; then
3735 case "$dflt" in
3736 *Policy*) ;;
3737 none) dflt="Policy" ;;
3738 *) dflt="Policy $dflt" ;;
3739 esac
3740 fi
85e6fe83 3741 ;;
a0d0e21e 3742 *)
ecfc5424 3743 dflt=`echo $hintfile | $sed 's/\.sh$//'`
a0d0e21e 3744 ;;
2304df62 3745 esac
1aef975c 3746
4e2a5f63
AD
3747 if $test -f Policy.sh ; then
3748 $cat <<EOM
3749
3750There's also a Policy hint file available, which should make the
3751site-specific (policy) questions easier to answer.
3752EOM
3753
3754 fi
3755
2304df62
AD
3756 $cat <<EOM
3757
3758You may give one or more space-separated answers, or "none" if appropriate.
a2d23ec2
MB
3759If you have a handcrafted Policy.sh file or a Policy.sh file generated by a