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