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