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