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