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