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