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