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