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