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 | # |
2685328b | 29 | # Generated on Mon Oct 8 10:22:27 CEST 2007 [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='' |
10bc17b6 | 843 | i_crypt='' |
b4eb6b3d JH |
844 | db_hashtype='' |
845 | db_prefixtype='' | |
640374d0 JH |
846 | db_version_major='' |
847 | db_version_minor='' | |
848 | db_version_patch='' | |
b4eb6b3d JH |
849 | i_db='' |
850 | i_dbm='' | |
851 | i_rpcsvcdbm='' | |
852 | d_dirnamlen='' | |
853 | direntrytype='' | |
854 | i_dirent='' | |
a0d0e21e | 855 | i_dld='' |
b4eb6b3d JH |
856 | i_dlfcn='' |
857 | i_fcntl='' | |
858 | i_float='' | |
758a5d79 JH |
859 | i_fp='' |
860 | i_fp_class='' | |
b4eb6b3d JH |
861 | i_gdbm='' |
862 | d_grpasswd='' | |
863 | i_grp='' | |
b4eb6b3d JH |
864 | i_ieeefp='' |
865 | i_inttypes='' | |
2765b840 | 866 | i_langinfo='' |
b4eb6b3d JH |
867 | i_libutil='' |
868 | i_limits='' | |
869 | i_locale='' | |
870 | i_machcthr='' | |
871 | i_malloc='' | |
872 | i_math='' | |
873 | i_memory='' | |
874 | i_mntent='' | |
875 | i_ndbm='' | |
876 | i_netdb='' | |
877 | i_neterrno='' | |
878 | i_netinettcp='' | |
879 | i_niin='' | |
880 | i_sysin='' | |
881 | i_poll='' | |
882 | i_prot='' | |
883 | i_pthread='' | |
884 | d_pwage='' | |
885 | d_pwchange='' | |
886 | d_pwclass='' | |
887 | d_pwcomment='' | |
888 | d_pwexpire='' | |
889 | d_pwgecos='' | |
890 | d_pwpasswd='' | |
891 | d_pwquota='' | |
892 | i_pwd='' | |
893 | i_sfio='' | |
894 | i_shadow='' | |
895 | i_socks='' | |
896 | i_stddef='' | |
897 | i_stdlib='' | |
898 | i_string='' | |
899 | strings='' | |
900 | i_sunmath='' | |
901 | i_sysaccess='' | |
902 | i_sysdir='' | |
903 | i_sysfile='' | |
904 | d_voidtty='' | |
905 | i_bsdioctl='' | |
906 | i_sysfilio='' | |
907 | i_sysioctl='' | |
908 | i_syssockio='' | |
909 | i_syslog='' | |
910 | i_sysmman='' | |
911 | i_sysmode='' | |
912 | i_sysmount='' | |
913 | i_sysndir='' | |
914 | i_sysparam='' | |
915 | i_sysresrc='' | |
916 | i_syssecrt='' | |
917 | i_sysselct='' | |
918 | i_sysstat='' | |
919 | i_sysstatfs='' | |
920 | i_sysstatvfs='' | |
921 | i_systimes='' | |
922 | i_systypes='' | |
923 | i_sysuio='' | |
924 | i_sysun='' | |
925 | i_sysutsname='' | |
926 | i_sysvfs='' | |
927 | i_syswait='' | |
928 | i_sgtty='' | |
929 | i_termio='' | |
930 | i_termios='' | |
14b90194 JH |
931 | d_tm_tm_gmtoff='' |
932 | d_tm_tm_zone='' | |
b4eb6b3d JH |
933 | i_systime='' |
934 | i_systimek='' | |
935 | i_time='' | |
936 | timeincl='' | |
937 | i_unistd='' | |
938 | i_ustat='' | |
939 | i_utime='' | |
940 | i_values='' | |
941 | i_stdarg='' | |
942 | i_varargs='' | |
943 | i_varhdr='' | |
944 | i_vfork='' | |
f3f1a2d8 | 945 | d_inc_version_list='' |
b4eb6b3d JH |
946 | inc_version_list='' |
947 | inc_version_list_init='' | |
948 | installprefix='' | |
949 | installprefixexp='' | |
950 | installstyle='' | |
951 | installusrbinperl='' | |
952 | intsize='' | |
953 | longsize='' | |
954 | shortsize='' | |
4b661809 | 955 | issymlink='' |
2304df62 | 956 | libc='' |
b4eb6b3d JH |
957 | ldlibpthname='' |
958 | libperl='' | |
959 | shrpenv='' | |
960 | useshrplib='' | |
a0d0e21e | 961 | glibpth='' |
2304df62 | 962 | libpth='' |
8e07c86e | 963 | loclibpth='' |
2304df62 AD |
964 | plibpth='' |
965 | xlibpth='' | |
1cfa4ec7 | 966 | ignore_versioned_solibs='' |
2304df62 | 967 | libs='' |
43999f95 JH |
968 | libsdirs='' |
969 | libsfiles='' | |
970 | libsfound='' | |
13b3f787 | 971 | libspath='' |
85e6fe83 | 972 | lns='' |
b4eb6b3d JH |
973 | d_PRIEUldbl='' |
974 | d_PRIFUldbl='' | |
975 | d_PRIGUldbl='' | |
976 | d_PRIeldbl='' | |
977 | d_PRIfldbl='' | |
978 | d_PRIgldbl='' | |
979 | d_SCNfldbl='' | |
980 | sPRIEUldbl='' | |
981 | sPRIFUldbl='' | |
982 | sPRIGUldbl='' | |
983 | sPRIeldbl='' | |
984 | sPRIfldbl='' | |
985 | sPRIgldbl='' | |
986 | sSCNfldbl='' | |
987 | lseeksize='' | |
988 | lseektype='' | |
d620c7b3 | 989 | mad='' |
00e74f14 NC |
990 | madlyh='' |
991 | madlyobj='' | |
992 | madlysrc='' | |
f3f1a2d8 MB |
993 | make_set_make='' |
994 | d_mymalloc='' | |
995 | freetype='' | |
b4eb6b3d JH |
996 | mallocobj='' |
997 | mallocsrc='' | |
998 | malloctype='' | |
9df442c2 | 999 | usemallocwrap='' |
b4eb6b3d JH |
1000 | usemymalloc='' |
1001 | installman1dir='' | |
1002 | man1dir='' | |
1003 | man1direxp='' | |
1004 | man1ext='' | |
1005 | installman3dir='' | |
1006 | man3dir='' | |
1007 | man3direxp='' | |
1008 | man3ext='' | |
1009 | modetype='' | |
1010 | multiarch='' | |
1011 | mydomain='' | |
1012 | myhostname='' | |
1013 | phostname='' | |
2304df62 AD |
1014 | c='' |
1015 | n='' | |
b4eb6b3d JH |
1016 | d_eofnblk='' |
1017 | eagain='' | |
1018 | o_nonblock='' | |
1019 | rd_nodata='' | |
2cc61e15 | 1020 | need_va_copy='' |
b4eb6b3d JH |
1021 | netdb_hlen_type='' |
1022 | netdb_host_type='' | |
1023 | netdb_name_type='' | |
1024 | netdb_net_type='' | |
1025 | groupcat='' | |
1026 | hostcat='' | |
1027 | passcat='' | |
1028 | orderlib='' | |
1029 | ranlib='' | |
1030 | d_perl_otherlibdirs='' | |
1031 | otherlibdirs='' | |
2304df62 AD |
1032 | package='' |
1033 | spackage='' | |
b4eb6b3d JH |
1034 | pager='' |
1035 | api_revision='' | |
1036 | api_subversion='' | |
1037 | api_version='' | |
1038 | api_versionstring='' | |
1039 | patchlevel='' | |
151e6568 | 1040 | perl_patchlevel='' |
b4eb6b3d JH |
1041 | revision='' |
1042 | subversion='' | |
1043 | version='' | |
861eb78d | 1044 | version_patchlevel_string='' |
b4eb6b3d JH |
1045 | perl5='' |
1046 | perladmin='' | |
1047 | perlpath='' | |
1048 | d_nv_preserves_uv='' | |
f607920a | 1049 | d_nv_zero_is_allbits_zero='' |
b4eb6b3d JH |
1050 | i16size='' |
1051 | i16type='' | |
1052 | i32size='' | |
1053 | i32type='' | |
1054 | i64size='' | |
1055 | i64type='' | |
1056 | i8size='' | |
1057 | i8type='' | |
1058 | ivsize='' | |
1059 | ivtype='' | |
53133ed1 | 1060 | nv_preserves_uv_bits='' |
b4eb6b3d JH |
1061 | nvsize='' |
1062 | nvtype='' | |
1063 | u16size='' | |
1064 | u16type='' | |
1065 | u32size='' | |
1066 | u32type='' | |
1067 | u64size='' | |
1068 | u64type='' | |
1069 | u8size='' | |
1070 | u8type='' | |
1071 | uvsize='' | |
1072 | uvtype='' | |
1073 | ivdformat='' | |
1074 | nvEUformat='' | |
1075 | nvFUformat='' | |
1076 | nvGUformat='' | |
1077 | nveformat='' | |
1078 | nvfformat='' | |
1079 | nvgformat='' | |
1080 | uvXUformat='' | |
1081 | uvoformat='' | |
1082 | uvuformat='' | |
1083 | uvxformat='' | |
1084 | pidtype='' | |
1085 | prefix='' | |
1086 | prefixexp='' | |
1087 | installprivlib='' | |
1088 | privlib='' | |
1089 | privlibexp='' | |
1090 | prototype='' | |
1091 | ptrsize='' | |
1092 | d_PRIXU64='' | |
1093 | d_PRId64='' | |
1094 | d_PRIi64='' | |
1095 | d_PRIo64='' | |
1096 | d_PRIu64='' | |
1097 | d_PRIx64='' | |
1098 | sPRIXU64='' | |
1099 | sPRId64='' | |
1100 | sPRIi64='' | |
1101 | sPRIo64='' | |
1102 | sPRIu64='' | |
1103 | sPRIx64='' | |
1104 | d_quad='' | |
1105 | quadkind='' | |
1106 | quadtype='' | |
1107 | uquadtype='' | |
1108 | drand01='' | |
1109 | randbits='' | |
1110 | randfunc='' | |
1111 | randseedtype='' | |
1112 | seedfunc='' | |
1113 | installscript='' | |
1114 | scriptdir='' | |
1115 | scriptdirexp='' | |
1116 | selectminbits='' | |
1117 | selecttype='' | |
8ff267be | 1118 | sh='' |
b4eb6b3d JH |
1119 | sig_count='' |
1120 | sig_name='' | |
1121 | sig_name_init='' | |
1122 | sig_num='' | |
1123 | sig_num_init='' | |
76d3c696 | 1124 | sig_size='' |
f3f1a2d8 | 1125 | d_sitearch='' |
b4eb6b3d JH |
1126 | installsitearch='' |
1127 | sitearch='' | |
1128 | sitearchexp='' | |
1129 | installsitebin='' | |
1130 | sitebin='' | |
1131 | sitebinexp='' | |
8d2cbf27 JH |
1132 | installsitehtml1dir='' |
1133 | sitehtml1dir='' | |
1134 | sitehtml1direxp='' | |
1135 | installsitehtml3dir='' | |
1136 | sitehtml3dir='' | |
1137 | sitehtml3direxp='' | |
b4eb6b3d JH |
1138 | installsitelib='' |
1139 | sitelib='' | |
1140 | sitelib_stem='' | |
1141 | sitelibexp='' | |
91e123a8 JH |
1142 | installsiteman1dir='' |
1143 | siteman1dir='' | |
1144 | siteman1direxp='' | |
1145 | installsiteman3dir='' | |
1146 | siteman3dir='' | |
1147 | siteman3direxp='' | |
b4eb6b3d JH |
1148 | siteprefix='' |
1149 | siteprefixexp='' | |
6e1038e0 MB |
1150 | installsitescript='' |
1151 | sitescript='' | |
1152 | sitescriptexp='' | |
b4eb6b3d JH |
1153 | sizesize='' |
1154 | sizetype='' | |
a0d0e21e | 1155 | so='' |
b4eb6b3d | 1156 | socksizetype='' |
2304df62 AD |
1157 | sharpbang='' |
1158 | shsharp='' | |
1159 | spitshell='' | |
dfe9444c | 1160 | src='' |
b4eb6b3d JH |
1161 | ssizetype='' |
1162 | startperl='' | |
2304df62 | 1163 | startsh='' |
b4eb6b3d JH |
1164 | stdchar='' |
1165 | d_stdio_stream_array='' | |
1166 | stdio_stream_array='' | |
1167 | sysman='' | |
5ff3f7a4 | 1168 | trnl='' |
b4eb6b3d JH |
1169 | uidformat='' |
1170 | uidsign='' | |
1171 | uidsize='' | |
1172 | uidtype='' | |
1173 | archname64='' | |
1174 | use64bitall='' | |
1175 | use64bitint='' | |
15b61c98 | 1176 | usefaststdio='' |
b4eb6b3d JH |
1177 | ccflags_uselargefiles='' |
1178 | ldflags_uselargefiles='' | |
1179 | libswanted_uselargefiles='' | |
1180 | uselargefiles='' | |
1181 | uselongdouble='' | |
1182 | usemorebits='' | |
1183 | usemultiplicity='' | |
2304df62 | 1184 | nm_opt='' |
40a7a20a | 1185 | nm_so_opt='' |
2304df62 AD |
1186 | runnm='' |
1187 | usenm='' | |
b4eb6b3d | 1188 | useperlio='' |
29209bc5 | 1189 | usesocks='' |
b4eb6b3d JH |
1190 | d_oldpthreads='' |
1191 | use5005threads='' | |
1192 | useithreads='' | |
9514c62b | 1193 | usereentrant='' |
b4eb6b3d | 1194 | usethreads='' |
2304df62 | 1195 | incpath='' |
2304df62 AD |
1196 | mips_type='' |
1197 | usrinc='' | |
b4eb6b3d JH |
1198 | d_vendorarch='' |
1199 | installvendorarch='' | |
1200 | vendorarch='' | |
1201 | vendorarchexp='' | |
1202 | d_vendorbin='' | |
1203 | installvendorbin='' | |
1204 | vendorbin='' | |
1205 | vendorbinexp='' | |
8d2cbf27 JH |
1206 | installvendorhtml1dir='' |
1207 | vendorhtml1dir='' | |
1208 | vendorhtml1direxp='' | |
1209 | installvendorhtml3dir='' | |
1210 | vendorhtml3dir='' | |
1211 | vendorhtml3direxp='' | |
b4eb6b3d JH |
1212 | d_vendorlib='' |
1213 | installvendorlib='' | |
1214 | vendorlib='' | |
1215 | vendorlib_stem='' | |
1216 | vendorlibexp='' | |
91e123a8 JH |
1217 | installvendorman1dir='' |
1218 | vendorman1dir='' | |
1219 | vendorman1direxp='' | |
1220 | installvendorman3dir='' | |
1221 | vendorman3dir='' | |
1222 | vendorman3direxp='' | |
b4eb6b3d JH |
1223 | usevendorprefix='' |
1224 | vendorprefix='' | |
1225 | vendorprefixexp='' | |
6e1038e0 MB |
1226 | d_vendorscript='' |
1227 | installvendorscript='' | |
1228 | vendorscript='' | |
1229 | vendorscriptexp='' | |
d56c5707 | 1230 | versiononly='' |
b4eb6b3d JH |
1231 | defvoidused='' |
1232 | voidflags='' | |
3659ebf1 JH |
1233 | yacc='' |
1234 | yaccflags='' | |
2304df62 AD |
1235 | CONFIG='' |
1236 | ||
ecfc5424 AD |
1237 | define='define' |
1238 | undef='undef' | |
1239 | smallmach='pdp11 i8086 z8000 i80286 iAPX286' | |
1240 | rmlist='' | |
1241 | ||
1242 | : We must find out about Eunice early | |
1243 | eunicefix=':' | |
1244 | if test -f /etc/unixtovms; then | |
1245 | eunicefix=/etc/unixtovms | |
1246 | fi | |
1247 | if test -f /etc/unixtovms.exe; then | |
1248 | eunicefix=/etc/unixtovms.exe | |
1249 | fi | |
1250 | ||
cfb04860 | 1251 | : Set executable suffix now -- needed before hints available |
6153ba32 PG |
1252 | if test -f "/libs/version.library"; then |
1253 | : Amiga OS | |
1254 | _exe="" | |
1255 | elif test -f "/system/gnu_library/bin/ar.pm"; then | |
1256 | : Stratus VOS | |
cfb04860 | 1257 | _exe=".pm" |
6153ba32 PG |
1258 | elif test -n "$DJGPP"; then |
1259 | : DOS DJGPP | |
cfb04860 | 1260 | _exe=".exe" |
5c728af0 | 1261 | elif test -d c:/. -o -n "$is_os2" ; then |
506faf56 | 1262 | : OS/2 or cygwin |
ba863942 JH |
1263 | _exe=".exe" |
1264 | fi | |
868439a2 | 1265 | |
b4eb6b3d | 1266 | i_whoami='' |
9da7673b MB |
1267 | : Trailing extension. Override this in a hint file, if needed. |
1268 | : Extra object files, if any, needed on this platform. | |
1269 | archobjs='' | |
1270 | archname='' | |
b4eb6b3d | 1271 | groupstype='' |
64615a5e | 1272 | libnames='' |
732c9516 JH |
1273 | : change the next line if compiling for Xenix/286 on Xenix/386 |
1274 | xlibpth='/usr/lib/386 /lib/386' | |
732c9516 JH |
1275 | : Possible local library directories to search. |
1276 | loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" | |
1277 | loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" | |
1278 | ||
1279 | : general looking path for locating libraries | |
5869b1f1 | 1280 | glibpth="/lib /usr/lib $xlibpth" |
732c9516 | 1281 | glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" |
f7dd4e7f JH |
1282 | test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" |
1283 | test -f /shlib/libc.so && glibpth="/shlib $glibpth" | |
faae14e6 | 1284 | test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64" |
732c9516 JH |
1285 | |
1286 | : Private path used by Configure to find libraries. Its value | |
1287 | : is prepended to libpth. This variable takes care of special | |
1288 | : machines, like the mips. Usually, it should be empty. | |
1289 | plibpth='' | |
1290 | ||
1cfa4ec7 GS |
1291 | : default library list |
1292 | libswanted='' | |
921b2963 | 1293 | : some systems want to use only the non-versioned libso:s |
1cfa4ec7 | 1294 | ignore_versioned_solibs='' |
9da7673b MB |
1295 | siteman1dir='' |
1296 | siteman3dir='' | |
1297 | sitescript='' | |
ed140128 AD |
1298 | : set usethreads on the Configure command line to enable threads. |
1299 | usereentrant='undef' | |
1300 | : full support for void wanted by default | |
1301 | defvoidused=15 | |
1302 | ||
1303 | : Possible local include directories to search. | |
1304 | : Set locincpth to "" in a hint file to defeat local include searches. | |
1305 | locincpth="/usr/local/include /opt/local/include /usr/gnu/include" | |
1306 | locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" | |
1307 | : | |
1308 | : no include file wanted by default | |
1309 | inclwanted='' | |
1310 | ||
1311 | : Enable -DEBUGGING and -DDEBUGGING from the command line | |
1312 | EBUGGING='' | |
1313 | DEBUGGING=old | |
1314 | ||
1315 | ccname='' | |
1316 | ccversion='' | |
1317 | perllibs='' | |
1318 | : set useposix=false in your hint file to disable the POSIX extension. | |
1319 | useposix=true | |
1320 | : set useopcode=false in your hint file to disable the Opcode extension. | |
1321 | useopcode=true | |
b4eb6b3d JH |
1322 | archname64='' |
1323 | ccflags_uselargefiles='' | |
1324 | ldflags_uselargefiles='' | |
1325 | libswanted_uselargefiles='' | |
1326 | : set usemultiplicity on the Configure command line to enable multiplicity. | |
29209bc5 | 1327 | : set usesocks on the Configure command line to enable socks. |
ecfc5424 | 1328 | : List of libraries we want. |
15431986 | 1329 | : If anyone needs extra -lxxx, put those in a hint file. |
6bdd71ef AB |
1330 | libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun" |
1331 | libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" | |
1aef975c | 1332 | : We probably want to search /usr/shlib before most other libraries. |
94b6baf5 | 1333 | : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. |
ecfc5424 AD |
1334 | glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` |
1335 | glibpth="/usr/shlib $glibpth" | |
1336 | : Do not use vfork unless overridden by a hint file. | |
1337 | usevfork=false | |
1338 | ||
8ff267be | 1339 | : Find the basic shell for Bourne shell scripts |
1340 | case "$sh" in | |
1341 | '') | |
8ff267be | 1342 | case "$SYSTYPE" in |
1343 | *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";; | |
1344 | *) xxx='/bin/sh';; | |
1345 | esac | |
1346 | if test -f "$xxx"; then | |
1347 | sh="$xxx" | |
1348 | else | |
1349 | : Build up a list and do a single loop so we can 'break' out. | |
1350 | pth=`echo $PATH | sed -e "s/$p_/ /g"` | |
1351 | for xxx in sh bash ksh pdksh ash; do | |
1352 | for p in $pth; do | |
1353 | try="$try ${p}/${xxx}" | |
1354 | done | |
1355 | done | |
1356 | for xxx in $try; do | |
1357 | if test -f "$xxx"; then | |
1358 | sh="$xxx"; | |
8ff267be | 1359 | break |
a5a94ea5 JH |
1360 | elif test "X$_exe" != X -a -f "$xxx$_exe"; then |
1361 | sh="$xxx"; | |
1362 | break | |
8ff267be | 1363 | elif test -f "$xxx.exe"; then |
1364 | sh="$xxx"; | |
8ff267be | 1365 | break |
1366 | fi | |
1367 | done | |
1368 | fi | |
1369 | ;; | |
1370 | esac | |
1371 | ||
1372 | case "$sh" in | |
a33c94aa | 1373 | '') cat >&2 <<EOM |
8ff267be | 1374 | $me: Fatal Error: I can't find a Bourne Shell anywhere. |
dfe9444c | 1375 | |
8ff267be | 1376 | Usually it's in /bin/sh. How did you even get this far? |
7f2de2d2 | 1377 | Please contact me (Perl Maintainers) at perlbug@perl.org and |
dfe9444c | 1378 | we'll try to straighten this all out. |
8ff267be | 1379 | EOM |
1380 | exit 1 | |
1381 | ;; | |
1382 | esac | |
1383 | ||
760ac839 | 1384 | : see if sh knows # comments |
73614538 | 1385 | if `$sh -c '#' >/dev/null 2>&1`; then |
760ac839 LW |
1386 | shsharp=true |
1387 | spitshell=cat | |
760ac839 | 1388 | xcat=/bin/cat |
a931254c JH |
1389 | test -f $xcat$_exe || xcat=/usr/bin/cat |
1390 | if test ! -f $xcat$_exe; then | |
4bdb8fb5 | 1391 | for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do |
a931254c | 1392 | if test -f $p/cat$_exe; then |
1deb0a86 | 1393 | xcat=$p/cat |
3c728e00 JH |
1394 | break |
1395 | fi | |
1396 | done | |
1deb0a86 JH |
1397 | if test ! -f $xcat$_exe; then |
1398 | echo "Can't find cat anywhere!" | |
3c728e00 JH |
1399 | exit 1 |
1400 | fi | |
1401 | fi | |
5440bc8e JH |
1402 | echo "#!$xcat" >sharp |
1403 | $eunicefix sharp | |
1404 | chmod +x sharp | |
1405 | ./sharp > today | |
760ac839 | 1406 | if test -s today; then |
760ac839 LW |
1407 | sharpbang='#!' |
1408 | else | |
5440bc8e JH |
1409 | echo "#! $xcat" > sharp |
1410 | $eunicefix sharp | |
1411 | chmod +x sharp | |
1412 | ./sharp > today | |
760ac839 | 1413 | if test -s today; then |
760ac839 LW |
1414 | sharpbang='#! ' |
1415 | else | |
760ac839 LW |
1416 | sharpbang=': use ' |
1417 | fi | |
1418 | fi | |
1419 | else | |
dfe9444c | 1420 | echo " " |
8ff267be | 1421 | echo "Your $sh doesn't grok # comments--I will strip them later on." |
760ac839 LW |
1422 | shsharp=false |
1423 | cd .. | |
1424 | echo "exec grep -v '^[ ]*#'" >spitshell | |
1425 | chmod +x spitshell | |
1426 | $eunicefix spitshell | |
1427 | spitshell=`pwd`/spitshell | |
1428 | cd UU | |
1429 | echo "I presume that if # doesn't work, #! won't work either!" | |
1430 | sharpbang=': use ' | |
1431 | fi | |
5440bc8e | 1432 | rm -f sharp today |
760ac839 LW |
1433 | |
1434 | : figure out how to guarantee sh startup | |
8ff267be | 1435 | case "$startsh" in |
1436 | '') startsh=${sharpbang}${sh} ;; | |
1437 | *) | |
760ac839 | 1438 | esac |
5440bc8e | 1439 | cat >sharp <<EOSS |
760ac839 LW |
1440 | $startsh |
1441 | set abc | |
1442 | test "$?abc" != 1 | |
1443 | EOSS | |
1444 | ||
5440bc8e JH |
1445 | chmod +x sharp |
1446 | $eunicefix sharp | |
1447 | if ./sharp; then | |
8ff267be | 1448 | : echo "Yup, it does." |
760ac839 | 1449 | else |
dfe9444c AD |
1450 | echo "Hmm... '$startsh' does not guarantee sh startup..." |
1451 | echo "You may have to fix up the shell scripts to make sure $sh runs them." | |
760ac839 | 1452 | fi |
5440bc8e | 1453 | rm -f sharp |
760ac839 | 1454 | |
aebf16e7 AD |
1455 | |
1456 | : Save command line options in file UU/cmdline.opt for later use in | |
1457 | : generating config.sh. | |
1458 | cat > cmdline.opt <<EOSH | |
1459 | # Configure command line arguments. | |
1460 | config_arg0='$0' | |
1461 | config_args='$*' | |
1462 | config_argc=$# | |
1463 | EOSH | |
1464 | argn=1 | |
ee45ea83 IZ |
1465 | args_exp='' |
1466 | args_sep='' | |
aebf16e7 AD |
1467 | for arg in "$@"; do |
1468 | cat >>cmdline.opt <<EOSH | |
1469 | config_arg$argn='$arg' | |
1470 | EOSH | |
ee45ea83 IZ |
1471 | # Extreme backslashitis: replace each ' by '"'"' |
1472 | cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt | |
1473 | $arg | |
1474 | EOC | |
1475 | arg_exp=`cat cmdl.opt` | |
1476 | args_exp="$args_exp$args_sep'$arg_exp'" | |
aebf16e7 | 1477 | argn=`expr $argn + 1` |
ee45ea83 | 1478 | args_sep=' ' |
aebf16e7 | 1479 | done |
ee45ea83 IZ |
1480 | # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@" |
1481 | # used by ./hints/os2.sh | |
1482 | rm -f cmdl.opt | |
aebf16e7 | 1483 | |
2304df62 AD |
1484 | : produce awk script to parse command line options |
1485 | cat >options.awk <<'EOF' | |
1486 | BEGIN { | |
02e93a22 | 1487 | optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification |
2304df62 AD |
1488 | |
1489 | len = length(optstr); | |
1490 | for (i = 1; i <= len; i++) { | |
1491 | c = substr(optstr, i, 1); | |
1492 | if (i < len) a = substr(optstr, i + 1, 1); else a = ""; | |
1493 | if (a == ":") { | |
1494 | arg[c] = 1; | |
1495 | i++; | |
1496 | } | |
1497 | opt[c] = 1; | |
1498 | } | |
1499 | } | |
1500 | { | |
1501 | expect = 0; | |
1502 | str = $0; | |
1503 | if (substr(str, 1, 1) != "-") { | |
1504 | printf("'%s'\n", str); | |
1505 | next; | |
1506 | } | |
1507 | len = length($0); | |
1508 | for (i = 2; i <= len; i++) { | |
1509 | c = substr(str, i, 1); | |
1510 | if (!opt[c]) { | |
1511 | printf("-%s\n", substr(str, i)); | |
1512 | next; | |
1513 | } | |
1514 | printf("-%s\n", c); | |
1515 | if (arg[c]) { | |
1516 | if (i < len) | |
1517 | printf("'%s'\n", substr(str, i + 1)); | |
1518 | else | |
1519 | expect = 1; | |
1520 | next; | |
1521 | } | |
1522 | } | |
1523 | } | |
1524 | END { | |
1525 | if (expect) | |
1526 | print "?"; | |
1527 | } | |
1528 | EOF | |
1529 | ||
1530 | : process the command line options | |
4633a7c4 LW |
1531 | set X `for arg in "$@"; do echo "X$arg"; done | |
1532 | sed -e s/X// | awk -f options.awk` | |
2304df62 AD |
1533 | eval "set $*" |
1534 | shift | |
1535 | rm -f options.awk | |
1536 | ||
1537 | : set up default values | |
1538 | fastread='' | |
1539 | reuseval=false | |
1540 | config_sh='' | |
1541 | alldone='' | |
1542 | error='' | |
1543 | silent='' | |
1544 | extractsh='' | |
ecfc5424 | 1545 | override='' |
16d20bd9 | 1546 | knowitall='' |
02e93a22 | 1547 | rm -f optdef.sh posthint.sh |
28757baa | 1548 | cat >optdef.sh <<EOS |
1549 | $startsh | |
1550 | EOS | |
2304df62 | 1551 | |
dfe9444c | 1552 | |
2304df62 AD |
1553 | : option parsing |
1554 | while test $# -gt 0; do | |
1555 | case "$1" in | |
1556 | -d) shift; fastread=yes;; | |
1557 | -e) shift; alldone=cont;; | |
1558 | -f) | |
1559 | shift | |
1560 | cd .. | |
1561 | if test -r "$1"; then | |
1562 | config_sh="$1" | |
1563 | else | |
a0d0e21e | 1564 | echo "$me: cannot read config file $1." >&2 |
2304df62 AD |
1565 | error=true |
1566 | fi | |
1567 | cd UU | |
1568 | shift;; | |
3f30fabf | 1569 | --help|\ |
2304df62 AD |
1570 | -h) shift; error=true;; |
1571 | -r) shift; reuseval=true;; | |
dfe9444c | 1572 | -s) shift; silent=true; realsilent=true;; |
2304df62 | 1573 | -E) shift; alldone=exit;; |
16d20bd9 | 1574 | -K) shift; knowitall=true;; |
ecfc5424 | 1575 | -O) shift; override=true;; |
dfe9444c | 1576 | -S) shift; silent=true; extractsh=true;; |
a0d0e21e LW |
1577 | -D) |
1578 | shift | |
1579 | case "$1" in | |
1580 | *=) | |
1581 | echo "$me: use '-U symbol=', not '-D symbol='." >&2 | |
1582 | echo "$me: ignoring -D $1" >&2 | |
1583 | ;; | |
ecfc5424 | 1584 | *=*) echo "$1" | \ |
1aef975c AD |
1585 | sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; |
1586 | *) echo "$1='define'" >> optdef.sh;; | |
a0d0e21e LW |
1587 | esac |
1588 | shift | |
1589 | ;; | |
1590 | -U) | |
1591 | shift | |
1592 | case "$1" in | |
1aef975c | 1593 | *=) echo "$1" >> optdef.sh;; |
a0d0e21e LW |
1594 | *=*) |
1595 | echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2 | |
1596 | echo "$me: ignoring -U $1" >&2 | |
1597 | ;; | |
1aef975c | 1598 | *) echo "$1='undef'" >> optdef.sh;; |
a0d0e21e LW |
1599 | esac |
1600 | shift | |
1601 | ;; | |
02e93a22 JH |
1602 | -A) |
1603 | shift | |
1604 | xxx='' | |
1605 | yyy="$1" | |
02e93a22 | 1606 | zzz='' |
5f83a3e9 | 1607 | uuu=undef |
02e93a22 | 1608 | case "$yyy" in |
f7c31117 | 1609 | *=*) zzz=`echo "$yyy"|sed 's!=.*!!'` |
5f83a3e9 JH |
1610 | case "$zzz" in |
1611 | *:*) zzz='' ;; | |
1612 | *) xxx=append | |
f7c31117 JH |
1613 | zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'` |
1614 | yyy=`echo "$yyy"|sed 's!=.*!!'` ;; | |
5f83a3e9 JH |
1615 | esac |
1616 | ;; | |
1617 | esac | |
1618 | case "$xxx" in | |
1619 | '') case "$yyy" in | |
f7c31117 JH |
1620 | *:*) xxx=`echo "$yyy"|sed 's!:.*!!'` |
1621 | yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` | |
1622 | zzz=`echo "$yyy"|sed 's!^[^=]*=!!'` | |
1623 | yyy=`echo "$yyy"|sed 's!=.*!!'` ;; | |
1624 | *) xxx=`echo "$yyy"|sed 's!:.*!!'` | |
1625 | yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;; | |
5f83a3e9 JH |
1626 | esac |
1627 | ;; | |
1628 | esac | |
02e93a22 JH |
1629 | case "$xxx" in |
1630 | append) | |
5f83a3e9 | 1631 | echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;; |
02e93a22 | 1632 | clear) |
5f83a3e9 | 1633 | echo "$yyy=''" >> posthint.sh ;; |
02e93a22 JH |
1634 | define) |
1635 | case "$zzz" in | |
1636 | '') zzz=define ;; | |
1637 | esac | |
5f83a3e9 | 1638 | echo "$yyy='$zzz'" >> posthint.sh ;; |
02e93a22 | 1639 | eval) |
5f83a3e9 | 1640 | echo "eval \"$yyy=$zzz\"" >> posthint.sh ;; |
02e93a22 | 1641 | prepend) |
5f83a3e9 | 1642 | echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;; |
02e93a22 JH |
1643 | undef) |
1644 | case "$zzz" in | |
1645 | '') zzz="$uuu" ;; | |
1646 | esac | |
5f83a3e9 JH |
1647 | echo "$yyy=$zzz" >> posthint.sh ;; |
1648 | *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;; | |
02e93a22 | 1649 | esac |
bde6b06b | 1650 | shift |
02e93a22 | 1651 | ;; |
dfe9444c | 1652 | -V) echo "$me generated by metaconfig 3.0 PL70." >&2 |
5f83a3e9 | 1653 | exit 0;; |
2304df62 | 1654 | --) break;; |
a0d0e21e | 1655 | -*) echo "$me: unknown option $1" >&2; shift; error=true;; |
2304df62 AD |
1656 | *) break;; |
1657 | esac | |
1658 | done | |
1659 | ||
1660 | case "$error" in | |
1661 | true) | |
1662 | cat >&2 <<EOM | |
2afac517 | 1663 | Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value] |
02e93a22 | 1664 | [-U symbol] [-U symbol=] [-A command:symbol...] |
2304df62 AD |
1665 | -d : use defaults for all answers. |
1666 | -e : go on without questioning past the production of config.sh. | |
1667 | -f : specify an alternate default configuration file. | |
1668 | -h : print this help message and exit (with an error status). | |
1669 | -r : reuse C symbols value if possible (skips costly nm extraction). | |
1670 | -s : silent mode, only echoes questions and essential information. | |
a0d0e21e LW |
1671 | -D : define symbol to have some value: |
1672 | -D symbol symbol gets the value 'define' | |
1673 | -D symbol=value symbol gets the value 'value' | |
3f30fabf MB |
1674 | common used examples (see INSTALL for more info): |
1675 | -Duse64bitint use 64bit integers | |
b79e0b55 | 1676 | -Duse64bitall use 64bit integers and pointers |
3f30fabf | 1677 | -Dusethreads use thread support |
b79e0b55 | 1678 | -Dinc_version_list=none do not include older perl trees in @INC |
3f30fabf MB |
1679 | -DEBUGGING=none DEBUGGING options |
1680 | -Dcc=gcc choose your compiler | |
1681 | -Dprefix=/opt/perl5 choose your destination | |
2304df62 | 1682 | -E : stop at the end of questions, after having produced config.sh. |
16d20bd9 | 1683 | -K : do not use unless you know what you are doing. |
ecfc5424 | 1684 | -O : let -D and -U override definitions from loaded configuration file. |
2304df62 | 1685 | -S : perform variable substitutions on all .SH files (can mix with -f) |
a0d0e21e LW |
1686 | -U : undefine symbol: |
1687 | -U symbol symbol gets the value 'undef' | |
1688 | -U symbol= symbol gets completely empty | |
3f30fabf | 1689 | e.g.: -Uversiononly |
02e93a22 | 1690 | -A : manipulate symbol after the platform specific hints have been applied: |
2ac814f3 MB |
1691 | -A append:symbol=value append value to symbol |
1692 | -A symbol=value like append:, but with a separating space | |
1693 | -A define:symbol=value define symbol to have value | |
1694 | -A clear:symbol define symbol to be '' | |
1695 | -A define:symbol define symbol to be 'define' | |
1696 | -A eval:symbol=value define symbol to be eval of value | |
1697 | -A prepend:symbol=value prepend value to symbol | |
1698 | -A undef:symbol define symbol to be 'undef' | |
1699 | -A undef:symbol= define symbol to be '' | |
3f30fabf | 1700 | e.g.: -A prepend:libswanted='cl pthread ' |
2ac814f3 | 1701 | -A ccflags=-DSOME_MACRO |
2304df62 AD |
1702 | -V : print version number and exit (with a zero status). |
1703 | EOM | |
1704 | exit 1 | |
1705 | ;; | |
1706 | esac | |
1707 | ||
dfe9444c AD |
1708 | : Sanity checks |
1709 | case "$fastread$alldone" in | |
1710 | yescont|yesexit) ;; | |
1711 | *) | |
aaeb8e51 GS |
1712 | case "$extractsh" in |
1713 | true) ;; | |
1714 | *) | |
1715 | if test ! -t 0; then | |
1716 | echo "Say 'sh Configure', not 'sh <Configure'" | |
1717 | exit 1 | |
1718 | fi | |
1719 | ;; | |
1720 | esac | |
dfe9444c AD |
1721 | ;; |
1722 | esac | |
1723 | ||
2304df62 AD |
1724 | exec 4>&1 |
1725 | case "$silent" in | |
1726 | true) exec 1>/dev/null;; | |
1727 | esac | |
1728 | ||
ecfc5424 | 1729 | : run the defines and the undefines, if any, but leave the file out there... |
1aef975c AD |
1730 | touch optdef.sh |
1731 | . ./optdef.sh | |
02e93a22 JH |
1732 | : create the posthint manipulation script and leave the file out there... |
1733 | touch posthint.sh | |
a0d0e21e | 1734 | |
2304df62 | 1735 | : set package name |
85e6fe83 | 1736 | package=perl5 |
b4eb6b3d JH |
1737 | first=`echo $package | sed -e 's/^\(.\).*/\1/'` |
1738 | last=`echo $package | sed -e 's/^.\(.*\)/\1/'` | |
1739 | case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in | |
1740 | ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;; | |
1741 | *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;; | |
1742 | esac | |
2304df62 | 1743 | |
2304df62 AD |
1744 | : Some greps do not return status, grrr. |
1745 | echo "grimblepritz" >grimble | |
1746 | if grep blurfldyick grimble >/dev/null 2>&1 ; then | |
1747 | contains=contains | |
1748 | elif grep grimblepritz grimble >/dev/null 2>&1 ; then | |
1749 | contains=grep | |
1750 | else | |
1751 | contains=contains | |
1752 | fi | |
1753 | rm -f grimble | |
1754 | : the following should work in any shell | |
1755 | case "$contains" in | |
1756 | contains*) | |
1757 | echo " " | |
1758 | echo "AGH! Grep doesn't return a status. Attempting remedial action." | |
1759 | cat >contains <<'EOSS' | |
1760 | grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp | |
1761 | EOSS | |
1762 | chmod +x contains | |
1763 | esac | |
1764 | ||
dfe9444c AD |
1765 | : Find the path to the source tree |
1766 | case "$src" in | |
1767 | '') case "$0" in | |
b233458b JH |
1768 | */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` |
1769 | case "$src" in | |
1770 | /*) ;; | |
8504afb7 | 1771 | .) ;; |
b233458b JH |
1772 | *) src=`cd ../$src && pwd` ;; |
1773 | esac | |
1774 | ;; | |
dfe9444c AD |
1775 | *) src='.';; |
1776 | esac;; | |
1777 | esac | |
1778 | case "$src" in | |
1779 | '') src=/ | |
1780 | rsrc=/ | |
1781 | ;; | |
1782 | /*) rsrc="$src";; | |
1783 | *) rsrc="../$src";; | |
1784 | esac | |
1785 | if test -f $rsrc/Configure && \ | |
1786 | $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1 | |
1787 | then | |
1788 | : found it, so we are ok. | |
1789 | else | |
1790 | rsrc='' | |
1791 | for src in . .. ../.. ../../.. ../../../..; do | |
1792 | if test -f ../$src/Configure && \ | |
1793 | $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1 | |
1794 | then | |
1795 | rsrc=../$src | |
1796 | break | |
1797 | fi | |
1798 | done | |
1799 | fi | |
1800 | case "$rsrc" in | |
1801 | '') | |
1802 | cat <<EOM >&4 | |
1803 | ||
1804 | Sorry, I can't seem to locate the source dir for $package. Please start | |
1805 | Configure with an explicit path -- i.e. /some/path/Configure. | |
1806 | ||
1807 | EOM | |
1808 | exit 1 | |
1809 | ;; | |
1810 | ../.) rsrc='..';; | |
1811 | *) | |
1812 | echo " " | |
1813 | echo "Sources for $package found in \"$src\"." >&4 | |
1814 | ;; | |
1815 | esac | |
1816 | ||
1817 | : script used to extract .SH files with variable substitutions | |
1818 | cat >extract <<'EOS' | |
a02608de | 1819 | PERL_CONFIG_SH=true |
dfe9444c | 1820 | echo "Doing variable substitutions on .SH files..." |
24ccb310 JH |
1821 | if test -f MANIFEST; then |
1822 | set x `awk '{print $1}' < MANIFEST | grep '\.SH$'` | |
dfe9444c AD |
1823 | else |
1824 | echo "(Looking for .SH files under the source directory.)" | |
6904989c | 1825 | set x `(cd "$src"; find . -name "*.SH" -print)` |
dfe9444c AD |
1826 | fi |
1827 | shift | |
1828 | case $# in | |
6904989c | 1829 | 0) set x `(cd "$src"; echo *.SH)`; shift;; |
dfe9444c | 1830 | esac |
6904989c | 1831 | if test ! -f "$src/$1"; then |
dfe9444c AD |
1832 | shift |
1833 | fi | |
1834 | mkdir_p=' | |
1835 | name=$1; | |
1836 | create=""; | |
1837 | while test $name; do | |
1838 | if test ! -d "$name"; then | |
1839 | create="$name $create"; | |
1840 | name=`echo $name | sed -e "s|^[^/]*$||"`; | |
1841 | name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`; | |
1842 | else | |
1843 | name=""; | |
1844 | fi; | |
1845 | done; | |
1846 | for file in $create; do | |
1847 | mkdir $file; | |
1848 | done | |
1849 | ' | |
1850 | for file in $*; do | |
1851 | case "$src" in | |
1852 | ".") | |
1853 | case "$file" in | |
1854 | */*) | |
1855 | dir=`expr X$file : 'X\(.*\)/'` | |
1856 | file=`expr X$file : 'X.*/\(.*\)'` | |
6904989c | 1857 | (cd "$dir" && . ./$file) |
dfe9444c AD |
1858 | ;; |
1859 | *) | |
1860 | . ./$file | |
1861 | ;; | |
1862 | esac | |
1863 | ;; | |
1864 | *) | |
1865 | case "$file" in | |
1866 | */*) | |
1867 | dir=`expr X$file : 'X\(.*\)/'` | |
1868 | file=`expr X$file : 'X.*/\(.*\)'` | |
1869 | (set x $dir; shift; eval $mkdir_p) | |
6904989c | 1870 | sh <"$src/$dir/$file" |
dfe9444c AD |
1871 | ;; |
1872 | *) | |
6904989c | 1873 | sh <"$src/$file" |
dfe9444c AD |
1874 | ;; |
1875 | esac | |
1876 | ;; | |
1877 | esac | |
1878 | done | |
6904989c | 1879 | if test -f "$src/config_h.SH"; then |
dfe9444c AD |
1880 | if test ! -f config.h; then |
1881 | : oops, they left it out of MANIFEST, probably, so do it anyway. | |
6904989c | 1882 | . "$src/config_h.SH" |
dfe9444c AD |
1883 | fi |
1884 | fi | |
1885 | EOS | |
1886 | ||
1887 | : extract files and exit if asked to do so | |
1888 | case "$extractsh" in | |
1889 | true) | |
1890 | case "$realsilent" in | |
1891 | true) ;; | |
1892 | *) exec 1>&4;; | |
1893 | esac | |
1894 | case "$config_sh" in | |
1895 | '') config_sh='config.sh';; | |
1896 | esac | |
1897 | echo " " | |
1898 | echo "Fetching answers from $config_sh..." | |
1899 | cd .. | |
1900 | . $config_sh | |
1901 | test "$override" && . ./optdef.sh | |
1902 | echo " " | |
1903 | . UU/extract | |
1904 | rm -rf UU | |
24ccb310 | 1905 | echo "Extraction done." |
dfe9444c AD |
1906 | exit 0 |
1907 | ;; | |
1908 | esac | |
1909 | ||
1910 | : Eunice requires " " instead of "", can you believe it | |
1911 | echo " " | |
1912 | : Here we go... | |
1913 | echo "Beginning of configuration questions for $package." | |
1914 | ||
1915 | trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15 | |
1916 | ||
2304df62 AD |
1917 | : first determine how to suppress newline on echo command |
1918 | echo " " | |
1919 | echo "Checking echo to see how to suppress newlines..." | |
1920 | (echo "hi there\c" ; echo " ") >.echotmp | |
1921 | if $contains c .echotmp >/dev/null 2>&1 ; then | |
1922 | echo "...using -n." | |
1923 | n='-n' | |
1924 | c='' | |
1925 | else | |
1926 | cat <<'EOM' | |
1927 | ...using \c | |
1928 | EOM | |
1929 | n='' | |
1930 | c='\c' | |
1931 | fi | |
1932 | echo $n "The star should be here-->$c" | |
1933 | echo '*' | |
1934 | rm -f .echotmp | |
1935 | ||
1936 | : Now test for existence of everything in MANIFEST | |
1937 | echo " " | |
6904989c | 1938 | if test -f "$rsrc/MANIFEST"; then |
2304df62 | 1939 | echo "First let's make sure your kit is complete. Checking..." >&4 |
4242830c | 1940 | awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50) |
2304df62 | 1941 | rm -f missing |
dfe9444c | 1942 | tmppwd=`pwd` |
2304df62 | 1943 | for filelist in x??; do |
6904989c | 1944 | (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing") |
2304df62 AD |
1945 | done |
1946 | if test -s missing; then | |
1947 | cat missing >&4 | |
1948 | cat >&4 <<'EOM' | |
1949 | ||
1950 | THIS PACKAGE SEEMS TO BE INCOMPLETE. | |
1951 | ||
1952 | You have the option of continuing the configuration process, despite the | |
1953 | distinct possibility that your kit is damaged, by typing 'y'es. If you | |
1954 | do, don't blame me if something goes wrong. I advise you to type 'n'o | |
7f2de2d2 | 1955 | and contact the author (perlbug@perl.org). |
2304df62 AD |
1956 | |
1957 | EOM | |
1958 | echo $n "Continue? [n] $c" >&4 | |
1959 | read ans | |
1960 | case "$ans" in | |
1961 | y*) | |
1962 | echo "Continuing..." >&4 | |
1963 | rm -f missing | |
1964 | ;; | |
1965 | *) | |
1966 | echo "ABORTING..." >&4 | |
1967 | kill $$ | |
1968 | ;; | |
1969 | esac | |
1970 | else | |
dfe9444c | 1971 | echo "Looks good..." |
2304df62 AD |
1972 | fi |
1973 | else | |
1974 | echo "There is no MANIFEST file. I hope your kit is complete !" | |
1975 | fi | |
1976 | rm -f missing x?? | |
1977 | ||
5ff3f7a4 GS |
1978 | echo " " |
1979 | : Find the appropriate value for a newline for tr | |
1980 | if test -n "$DJGPP"; then | |
1981 | trnl='\012' | |
1982 | fi | |
1983 | if test X"$trnl" = X; then | |
1984 | case "`echo foo|tr '\n' x 2>/dev/null`" in | |
1985 | foox) trnl='\n' ;; | |
1986 | esac | |
1987 | fi | |
1988 | if test X"$trnl" = X; then | |
1989 | case "`echo foo|tr '\012' x 2>/dev/null`" in | |
1990 | foox) trnl='\012' ;; | |
1991 | esac | |
1992 | fi | |
1993 | if test X"$trnl" = X; then | |
8be2c24c JH |
1994 | case "`echo foo|tr '\r\n' xy 2>/dev/null`" in |
1995 | fooxy) trnl='\n\r' ;; | |
1996 | esac | |
1997 | fi | |
1998 | if test X"$trnl" = X; then | |
5ff3f7a4 GS |
1999 | cat <<EOM >&2 |
2000 | ||
2001 | $me: Fatal Error: cannot figure out how to translate newlines with 'tr'. | |
2002 | ||
2003 | EOM | |
2004 | exit 1 | |
2005 | fi | |
2006 | ||
2304df62 AD |
2007 | : compute the number of columns on the terminal for proper question formatting |
2008 | case "$COLUMNS" in | |
2009 | '') COLUMNS='80';; | |
2010 | esac | |
2011 | ||
2012 | : set up the echo used in my read | |
2013 | myecho="case \"\$xxxm\" in | |
2014 | '') echo $n \"\$rp $c\" >&4;; | |
2015 | *) case \"\$rp\" in | |
2016 | '') echo $n \"[\$xxxm] $c\";; | |
2017 | *) | |
2018 | if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then | |
2019 | echo \"\$rp\" >&4 | |
2020 | echo $n \"[\$xxxm] $c\" >&4 | |
2021 | else | |
2022 | echo $n \"\$rp [\$xxxm] $c\" >&4 | |
2023 | fi | |
2024 | ;; | |
2025 | esac;; | |
2026 | esac" | |
2027 | ||
2028 | : now set up to do reads with possible shell escape and default assignment | |
2029 | cat <<EOSC >myread | |
28757baa | 2030 | $startsh |
2304df62 AD |
2031 | xxxm=\$dflt |
2032 | $myecho | |
2033 | ans='!' | |
2034 | case "\$fastread" in | |
2035 | yes) case "\$dflt" in | |
2036 | '') ;; | |
2037 | *) ans=''; | |
2038 | case "\$silent-\$rp" in | |
2039 | true-) ;; | |
2040 | *) echo " " >&4;; | |
2041 | esac;; | |
2042 | esac;; | |
2043 | *) case "\$silent" in | |
2044 | true) case "\$rp" in | |
2045 | '') ans='';; | |
2046 | esac;; | |
2047 | esac;; | |
2048 | esac | |
2049 | while expr "X\$ans" : "X!" >/dev/null; do | |
2050 | read answ | |
2051 | set x \$xxxm | |
2052 | shift | |
dfe9444c | 2053 | aok=''; eval "ans=\\"\$answ\\"" && aok=y |
2304df62 | 2054 | case "\$answ" in |
dfe9444c AD |
2055 | "!") |
2056 | sh 1>&4 | |
2057 | echo " " | |
2058 | $myecho | |
2059 | ;; | |
2060 | !*) | |
2061 | set x \`expr "X\$ans" : "X!\(.*\)\$"\` | |
2062 | shift | |
2063 | sh 1>&4 -c "\$*" | |
2064 | echo " " | |
2065 | $myecho | |
2066 | ;; | |
2304df62 AD |
2067 | "\$ans") |
2068 | case "\$ans" in | |
ecfc5424 AD |
2069 | \\&*) |
2070 | set x \`expr "X\$ans" : "X&\(.*\)\$"\` | |
2071 | shift | |
2072 | case "\$1" in | |
2073 | -d) | |
2074 | fastread=yes | |
40a7a20a | 2075 | echo "(OK, I'll run with -d after this question.)" >&4 |
ecfc5424 AD |
2076 | ;; |
2077 | -*) | |
40a7a20a | 2078 | echo "*** Sorry, \$1 not supported yet." >&4 |
ecfc5424 AD |
2079 | ;; |
2080 | esac | |
2081 | $myecho | |
2082 | ans=! | |
2083 | ;; | |
2304df62 AD |
2084 | esac;; |
2085 | *) | |
2086 | case "\$aok" in | |
2087 | y) | |
2088 | echo "*** Substitution done -- please confirm." | |
2089 | xxxm="\$ans" | |
c9795ab7 | 2090 | ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\` |
2304df62 AD |
2091 | xxxm="\$ans" |
2092 | ans=! | |
2093 | ;; | |
2094 | *) | |
2095 | echo "*** Error -- try again." | |
2096 | ans=! | |
2097 | ;; | |
2098 | esac | |
2099 | $myecho | |
2100 | ;; | |
2101 | esac | |
2102 | case "\$ans\$xxxm\$nostick" in | |
2103 | '') | |
2104 | ans=! | |
2105 | $myecho | |
2106 | ;; | |
2107 | esac | |
2108 | done | |
2109 | case "\$ans" in | |
2110 | '') ans="\$xxxm";; | |
2111 | esac | |
2112 | EOSC | |
2113 | ||
2114 | : create .config dir to save info across Configure sessions | |
2115 | test -d ../.config || mkdir ../.config | |
2116 | cat >../.config/README <<EOF | |
2117 | This directory created by Configure to save information that should | |
dfe9444c | 2118 | persist across sessions for $package. |
2304df62 AD |
2119 | |
2120 | You may safely delete it if you wish. | |
2121 | EOF | |
2122 | ||
9507cadf | 2123 | xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` |
af960fef | 2124 | case "$usedevel" in |
0107c034 | 2125 | $define|true|[yY]*) ;; |
9507cadf | 2126 | *) case "$xversion" in |
0107c034 JH |
2127 | *[13579]) |
2128 | cat >&4 <<EOH | |
2129 | *** WHOA THERE!!! *** | |
2130 | ||
2131 | This is an UNSTABLE DEVELOPMENT release. | |
9507cadf JH |
2132 | The version of this $package distribution is $xversion, that is, odd, |
2133 | (as opposed to even) and that signifies a development release. | |
3d5d58b1 | 2134 | If you want a maintenance release, you want an even-numbered version. |
0107c034 JH |
2135 | |
2136 | Do ***NOT*** install this into production use. | |
2137 | Data corruption and crashes are possible. | |
2138 | ||
2139 | It is most seriously suggested that you do not continue any further | |
2140 | unless you want to help in developing and debugging Perl. | |
2141 | ||
6adc6a45 JH |
2142 | If you *still* want to build perl, you can answer 'y' now, |
2143 | or pass -Dusedevel to Configure. | |
2144 | ||
0107c034 JH |
2145 | EOH |
2146 | rp='Do you really want to continue?' | |
2147 | dflt='n' | |
2148 | . ./myread | |
2149 | case "$ans" in | |
8feeef0e JH |
2150 | [yY]) echo >&4 "Okay, continuing." |
2151 | usedevel="$define" ;; | |
0107c034 JH |
2152 | *) echo >&4 "Okay, bye." |
2153 | exit 1 | |
2154 | ;; | |
2155 | esac | |
2156 | ;; | |
2157 | esac | |
2158 | ;; | |
2159 | esac | |
8feeef0e JH |
2160 | case "$usedevel" in |
2161 | $define|true|[yY]*) | |
2162 | case "$versiononly" in | |
2163 | '') versiononly="$define" ;; | |
2164 | esac | |
2165 | case "$installusrbinperl" in | |
2166 | '') installusrbinperl="$undef" ;; | |
2167 | esac | |
2168 | ;; | |
2169 | esac | |
0107c034 | 2170 | |
2304df62 AD |
2171 | : general instructions |
2172 | needman=true | |
2173 | firsttime=true | |
760ac839 | 2174 | user=`(logname) 2>/dev/null` |
dfe9444c AD |
2175 | case "$user" in |
2176 | '') user=`whoami 2>&1`;; | |
760ac839 | 2177 | esac |
2304df62 AD |
2178 | if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then |
2179 | firsttime=false | |
2180 | echo " " | |
2181 | rp='Would you like to see the instructions?' | |
2182 | dflt=n | |
2183 | . ./myread | |
2184 | case "$ans" in | |
2185 | [yY]*) ;; | |
2186 | *) needman=false;; | |
2187 | esac | |
2188 | fi | |
2189 | if $needman; then | |
2190 | cat <<EOH | |
4e2a5f63 | 2191 | |
2304df62 | 2192 | This installation shell script will examine your system and ask you questions |
a0d0e21e | 2193 | to determine how the perl5 package should be installed. If you get |
2304df62 AD |
2194 | stuck on a question, you may use a ! shell escape to start a subshell or |
2195 | execute a command. Many of the questions will have default answers in square | |
2196 | brackets; typing carriage return will give you the default. | |
2197 | ||
2198 | On some of the questions which ask for file or directory names you are allowed | |
2199 | to use the ~name construct to specify the login directory belonging to "name", | |
2200 | even if you don't have a shell which knows about that. Questions where this is | |
2201 | allowed will be marked "(~name ok)". | |
2202 | ||
2203 | EOH | |
2204 | rp='' | |
2205 | dflt='Type carriage return to continue' | |
2206 | . ./myread | |
2207 | cat <<'EOH' | |
2208 | ||
2209 | The prompter used in this script allows you to use shell variables and | |
2210 | backticks in your answers. You may use $1, $2, etc... to refer to the words | |
2211 | in the default answer, as if the default line was a set of arguments given to a | |
2212 | script shell. This means you may also use $* to repeat the whole default line, | |
2213 | so you do not have to re-type everything to add something to the default. | |
2214 | ||
2215 | Everytime there is a substitution, you will have to confirm. If there is an | |
2216 | error (e.g. an unmatched backtick), the default answer will remain unchanged | |
2217 | and you will be prompted again. | |
2218 | ||
2219 | If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all | |
2220 | the questions and use the computed defaults (or the previous answers if there | |
2221 | was already a config.sh file). Type 'Configure -h' for a list of options. | |
ecfc5424 | 2222 | You may also start interactively and then answer '& -d' at any prompt to turn |
dfe9444c | 2223 | on the non-interactive behaviour for the remainder of the execution. |
2304df62 AD |
2224 | |
2225 | EOH | |
2226 | . ./myread | |
2227 | cat <<EOH | |
2228 | ||
2229 | Much effort has been expended to ensure that this shell script will run on any | |
2230 | Unix system. If despite that it blows up on yours, your best bet is to edit | |
40000a8c AD |
2231 | Configure and run it again. If you can't run Configure for some reason, |
2232 | you'll have to generate a config.sh file by hand. Whatever problems you | |
7f2de2d2 | 2233 | have, let me (perlbug@perl.org) know how I blew it. |
2304df62 AD |
2234 | |
2235 | This installation script affects things in two ways: | |
2236 | ||
2237 | 1) it may do direct variable substitutions on some of the files included | |
2238 | in this kit. | |
2239 | 2) it builds a config.h file for inclusion in C programs. You may edit | |
2240 | any of these files as the need arises after running this script. | |
2241 | ||
2242 | If you make a mistake on a question, there is no easy way to back up to it | |
2243 | currently. The easiest thing to do is to edit config.sh and rerun all the SH | |
2244 | files. Configure will offer to let you do this before it runs the SH files. | |
2245 | ||
2246 | EOH | |
2247 | dflt='Type carriage return to continue' | |
2248 | . ./myread | |
2249 | case "$firsttime" in | |
2250 | true) echo $user >>../.config/instruct;; | |
2251 | esac | |
2252 | fi | |
2253 | ||
2304df62 AD |
2254 | : find out where common programs are |
2255 | echo " " | |
2256 | echo "Locating common programs..." >&4 | |
2257 | cat <<EOSC >loc | |
2258 | $startsh | |
2259 | case \$# in | |
2260 | 0) exit 1;; | |
2261 | esac | |
2262 | thing=\$1 | |
2263 | shift | |
2264 | dflt=\$1 | |
2265 | shift | |
2266 | for dir in \$*; do | |
2267 | case "\$thing" in | |
2268 | .) | |
2269 | if test -d \$dir/\$thing; then | |
2270 | echo \$dir | |
2271 | exit 0 | |
2272 | fi | |
2273 | ;; | |
2274 | *) | |
a0d0e21e | 2275 | for thisthing in \$dir/\$thing; do |
ecfc5424 | 2276 | : just loop through to pick last item |
a0d0e21e | 2277 | done |
25f94b33 | 2278 | if test -f \$thisthing; then |
a0d0e21e | 2279 | echo \$thisthing |
2304df62 | 2280 | exit 0 |
a5a94ea5 JH |
2281 | elif test "X$_exe" != X -a -f \$thisthing$_exe; then |
2282 | echo \$thisthing | |
2283 | exit 0 | |
2304df62 | 2284 | elif test -f \$dir/\$thing.exe; then |
c4f23d77 AD |
2285 | if test -n "$DJGPP"; then |
2286 | echo \$dir/\$thing.exe | |
b921d661 | 2287 | elif test "$eunicefix" != ":"; then |
c4f23d77 AD |
2288 | : on Eunice apparently |
2289 | echo \$dir/\$thing | |
b921d661 | 2290 | exit 0 |
c4f23d77 | 2291 | fi |
2d736872 | 2292 | exit 0 |
2304df62 AD |
2293 | fi |
2294 | ;; | |
2295 | esac | |
2296 | done | |
2297 | echo \$dflt | |
2298 | exit 1 | |
2299 | EOSC | |
2300 | chmod +x loc | |
2301 | $eunicefix loc | |
2302 | loclist=" | |
2303 | awk | |
2304 | cat | |
f8006fac | 2305 | chmod |
b4eb6b3d JH |
2306 | comm |
2307 | cp | |
2304df62 AD |
2308 | echo |
2309 | expr | |
2310 | grep | |
a0d0e21e | 2311 | ls |
b4eb6b3d | 2312 | mkdir |
2304df62 AD |
2313 | rm |
2314 | sed | |
b4eb6b3d | 2315 | sort |
85e6fe83 | 2316 | touch |
2304df62 | 2317 | tr |
b4eb6b3d | 2318 | uniq |
2304df62 AD |
2319 | " |
2320 | trylist=" | |
2321 | Mcc | |
dfe9444c | 2322 | ar |
3659ebf1 | 2323 | bison |
b4eb6b3d | 2324 | byacc |
2304df62 | 2325 | cpp |
b4eb6b3d | 2326 | csh |
2304df62 AD |
2327 | date |
2328 | egrep | |
1fef16b3 | 2329 | gmake |
8ff267be | 2330 | gzip |
b4eb6b3d | 2331 | less |
8ff267be | 2332 | ln |
3c728e00 | 2333 | make |
b4eb6b3d | 2334 | more |
693762b4 | 2335 | nm |
b4eb6b3d JH |
2336 | nroff |
2337 | pg | |
2304df62 AD |
2338 | test |
2339 | uname | |
8ff267be | 2340 | zip |
2304df62 | 2341 | " |
8e07c86e | 2342 | pth=`echo $PATH | sed -e "s/$p_/ /g"` |
2304df62 AD |
2343 | pth="$pth /lib /usr/lib" |
2344 | for file in $loclist; do | |
dfe9444c AD |
2345 | eval xxx=\$$file |
2346 | case "$xxx" in | |
2347 | /*|?:[\\/]*) | |
2348 | if test -f "$xxx"; then | |
2349 | : ok | |
2350 | else | |
2351 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 | |
2352 | xxx=`./loc $file $file $pth` | |
2353 | fi | |
2354 | ;; | |
2355 | '') xxx=`./loc $file $file $pth`;; | |
2356 | *) xxx=`./loc $xxx $xxx $pth`;; | |
2357 | esac | |
a5a94ea5 | 2358 | eval $file=$xxx$_exe |
2304df62 AD |
2359 | eval _$file=$xxx |
2360 | case "$xxx" in | |
2361 | /*) | |
2362 | echo $file is in $xxx. | |
2363 | ;; | |
8e07c86e AD |
2364 | ?:[\\/]*) |
2365 | echo $file is in $xxx. | |
2366 | ;; | |
2304df62 | 2367 | *) |
25f94b33 AD |
2368 | echo "I don't know where '$file' is, and my life depends on it." >&4 |
2369 | echo "Go find a public domain implementation or fix your PATH setting!" >&4 | |
4633a7c4 | 2370 | exit 1 |
2304df62 AD |
2371 | ;; |
2372 | esac | |
2373 | done | |
2374 | echo " " | |
2375 | echo "Don't worry if any of the following aren't found..." | |
2376 | say=offhand | |
2377 | for file in $trylist; do | |
dfe9444c AD |
2378 | eval xxx=\$$file |
2379 | case "$xxx" in | |
2380 | /*|?:[\\/]*) | |
2381 | if test -f "$xxx"; then | |
2382 | : ok | |
2383 | else | |
2384 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 | |
2385 | xxx=`./loc $file $file $pth` | |
2386 | fi | |
2387 | ;; | |
2388 | '') xxx=`./loc $file $file $pth`;; | |
2389 | *) xxx=`./loc $xxx $xxx $pth`;; | |
2390 | esac | |
306a8474 | 2391 | eval $file=$xxx$_exe |
2304df62 AD |
2392 | eval _$file=$xxx |
2393 | case "$xxx" in | |
2394 | /*) | |
2395 | echo $file is in $xxx. | |
2396 | ;; | |
8e07c86e AD |
2397 | ?:[\\/]*) |
2398 | echo $file is in $xxx. | |
2399 | ;; | |
2304df62 AD |
2400 | *) |
2401 | echo "I don't see $file out there, $say." | |
2402 | say=either | |
2403 | ;; | |
2404 | esac | |
2405 | done | |
2406 | case "$egrep" in | |
1fef16b3 | 2407 | egrep) |
2304df62 AD |
2408 | echo "Substituting grep for egrep." |
2409 | egrep=$grep | |
868439a2 | 2410 | _egrep=$grep |
2304df62 AD |
2411 | ;; |
2412 | esac | |
8ff267be | 2413 | case "$ln" in |
1fef16b3 | 2414 | ln) |
8ff267be | 2415 | echo "Substituting cp for ln." |
2416 | ln=$cp | |
868439a2 | 2417 | _ln=$cp |
8ff267be | 2418 | ;; |
2419 | esac | |
2e26f1d5 JH |
2420 | case "$make" in |
2421 | make) | |
2422 | case "$gmake" in | |
2423 | gmake) | |
2424 | echo "I can't find make or gmake, and my life depends on it." >&4 | |
2425 | echo "Go find a public domain implementation or fix your PATH setting!" >&4 | |
2426 | exit 1 | |
2427 | ;; | |
2428 | esac | |
2429 | ;; | |
2430 | esac | |
2431 | case "$gmake" in | |
2432 | gmake) ;; | |
2433 | *) # We can't have osname yet. | |
1fef16b3 JH |
2434 | if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS |
2435 | # Assume that gmake, if found, is definitely GNU make | |
2436 | # and prefer it over the system make. | |
2437 | echo "Substituting gmake for make." | |
2438 | make=$gmake | |
868439a2 | 2439 | _make=$gmake |
1fef16b3 JH |
2440 | fi |
2441 | ;; | |
a5a94ea5 | 2442 | esac |
2304df62 AD |
2443 | case "$test" in |
2444 | test) | |
2445 | echo "Hopefully test is built into your sh." | |
2446 | ;; | |
2447 | *) | |
73614538 | 2448 | if `sh -c "PATH= test true" >/dev/null 2>&1`; then |
5d644a95 | 2449 | echo "Using the test built into your sh." |
2304df62 AD |
2450 | test=test |
2451 | _test=test | |
2452 | fi | |
2453 | ;; | |
2454 | esac | |
2455 | case "$echo" in | |
2456 | echo) | |
2457 | echo "Hopefully echo is built into your sh." | |
2458 | ;; | |
2459 | '') ;; | |
2460 | *) | |
2461 | echo " " | |
2462 | echo "Checking compatibility between $echo and builtin echo (if any)..." >&4 | |
2463 | $echo $n "hi there$c" >foo1 | |
2464 | echo $n "hi there$c" >foo2 | |
2465 | if cmp foo1 foo2 >/dev/null 2>&1; then | |
2466 | echo "They are compatible. In fact, they may be identical." | |
2467 | else | |
2468 | case "$n" in | |
2469 | '-n') n='' c='\c';; | |
2470 | *) n='-n' c='';; | |
2471 | esac | |
2472 | cat <<FOO | |
2473 | They are not compatible! You are probably running ksh on a non-USG system. | |
2474 | I'll have to use $echo instead of the builtin, since Bourne shell doesn't | |
2475 | have echo built in and we may have to run some Bourne shell scripts. That | |
2476 | means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous. | |
2477 | ||
2478 | FOO | |
2479 | $echo $n "The star should be here-->$c" | |
2480 | $echo "*" | |
2481 | fi | |
2482 | $rm -f foo1 foo2 | |
2483 | ;; | |
2484 | esac | |
2485 | ||
2f88d857 MB |
2486 | # This question was auctioned at YAPC::Europe-2007 in Vienna |
2487 | # I never promised you could answer it. I only auctioned the question. | |
2488 | cat <<FOO | |
2489 | The following message is sponsored by | |
2490 | ||
2491 | Dresden.pm<--The stars should be here. | |
2492 | ||
2493 | Dear Perl user, system administrator or package | |
2494 | maintainer, the Perl community sends greetings to | |
2495 | you. Do you (emblematical) greet back [Y/n]? n | |
2496 | ||
2497 | FOO | |
2498 | ||
6b769f8f | 2499 | cat <<EOS >trygcc |
2573c5f9 JH |
2500 | $startsh |
2501 | EOS | |
6b769f8f | 2502 | cat <<'EOSC' >>trygcc |
2573c5f9 JH |
2503 | case "$cc" in |
2504 | '') ;; | |
2505 | *) $rm -f try try.* | |
2506 | $cat >try.c <<EOM | |
2507 | int main(int argc, char *argv[]) { | |
2508 | return 0; | |
2509 | } | |
2510 | EOM | |
e4778687 | 2511 | if $cc -o try $ccflags $ldflags try.c; then |
2573c5f9 JH |
2512 | : |
2513 | else | |
2514 | echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 | |
2515 | despair=yes | |
2516 | trygcc=yes | |
2517 | case "$cc" in | |
2518 | *gcc*) trygcc=no ;; | |
2519 | esac | |
dce40316 AD |
2520 | # Skip this test because it gives a false match on output like: |
2521 | # ./trygcc: line 23: cc: command not found | |
2522 | # case "`$cc -v -c try.c 2>&1`" in | |
2523 | # *gcc*) trygcc=no ;; | |
2524 | # esac | |
2573c5f9 JH |
2525 | if $test X"$trygcc" = Xyes; then |
2526 | if gcc -o try -c try.c; then | |
2527 | echo " " | |
2528 | echo "You seem to have a working gcc, though." >&4 | |
dce40316 AD |
2529 | # Switching compilers may undo the work of hints files. |
2530 | # The most common problem is -D_REENTRANT for threads. | |
2531 | # This heuristic catches that case, but gets false positives | |
2532 | # if -Dusethreads was not actually specified. Better to | |
2533 | # bail out here with a useful message than fail | |
2534 | # mysteriously later. Should we perhaps just try to | |
2535 | # re-invoke Configure -Dcc=gcc config_args ? | |
2536 | if $test -f usethreads.cbu; then | |
2537 | $cat >&4 <<EOM | |
2538 | ||
2539 | *** However, any setting of the C compiler flags (e.g. for thread support) | |
2540 | *** will be lost. It may be necessary for you to restart Configure and | |
2541 | *** add -Dcc=gcc to your Configure command line. | |
2542 | ||
2543 | EOM | |
2544 | rp="Would you like to go ahead and try gcc anyway?" | |
2545 | dflt=n | |
2546 | else | |
2547 | rp="Would you like to use it?" | |
2548 | dflt=y | |
2549 | fi | |
2573c5f9 JH |
2550 | if $test -f myread; then |
2551 | . ./myread | |
2552 | else | |
2553 | if $test -f UU/myread; then | |
2554 | . ./UU/myread | |
2555 | else | |
2556 | echo "Cannot find myread, sorry. Aborting." >&2 | |
2557 | exit 1 | |
2558 | fi | |
2559 | fi | |
2560 | case "$ans" in | |
6371411c | 2561 | [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no; |
2573c5f9 JH |
2562 | esac |
2563 | fi | |
2564 | fi | |
6b769f8f RB |
2565 | fi |
2566 | $rm -f try try.* | |
2567 | ;; | |
2568 | esac | |
2569 | EOSC | |
2570 | ||
2571 | cat <<EOS >checkcc | |
2572 | $startsh | |
2573 | EOS | |
2574 | cat <<'EOSC' >>checkcc | |
2575 | case "$cc" in | |
2576 | '') ;; | |
2577 | *) $rm -f try try.* | |
2578 | $cat >try.c <<EOM | |
2579 | int main(int argc, char *argv[]) { | |
2580 | return 0; | |
2581 | } | |
2582 | EOM | |
2583 | if $cc -o try $ccflags $ldflags try.c; then | |
2584 | : | |
2585 | else | |
2573c5f9 | 2586 | if $test X"$despair" = Xyes; then |
6b769f8f RB |
2587 | echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 |
2588 | fi | |
2589 | $cat >&4 <<EOM | |
5dd4fbdf MB |
2590 | You need to find a working C compiler. |
2591 | Either (purchase and) install the C compiler supplied by your OS vendor, | |
2592 | or for a free C compiler try http://gcc.gnu.org/ | |
2593 | I cannot continue any further, aborting. | |
2594 | EOM | |
6b769f8f | 2595 | exit 1 |
2573c5f9 JH |
2596 | fi |
2597 | $rm -f try try.* | |
2598 | ;; | |
2599 | esac | |
2600 | EOSC | |
2601 | ||
a0d0e21e LW |
2602 | : determine whether symbolic links are supported |
2603 | echo " " | |
2604 | $touch blurfl | |
2605 | if $ln -s blurfl sym > /dev/null 2>&1 ; then | |
2606 | echo "Symbolic links are supported." >&4 | |
818f00be | 2607 | lns="$ln -s" |
a0d0e21e LW |
2608 | else |
2609 | echo "Symbolic links are NOT supported." >&4 | |
2610 | lns="$ln" | |
2611 | fi | |
2612 | $rm -f blurfl sym | |
2613 | ||
dafca956 JH |
2614 | : determine whether symbolic links are supported |
2615 | echo " " | |
2616 | case "$lns" in | |
18ea2752 | 2617 | *"ln"*" -s") |
dafca956 JH |
2618 | echo "Checking how to test for symbolic links..." >&4 |
2619 | $lns blurfl sym | |
4b661809 | 2620 | if $test "X$issymlink" = X; then |
2e2a97a6 JH |
2621 | case "$newsh" in |
2622 | '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;; | |
2623 | *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;; | |
2624 | esac | |
5d644a95 MB |
2625 | if test $? = 0; then |
2626 | issymlink="test -h" | |
2e2a97a6 JH |
2627 | else |
2628 | echo "Your builtin 'test -h' may be broken." >&4 | |
2629 | case "$test" in | |
2630 | /*) ;; | |
2631 | *) pth=`echo $PATH | sed -e "s/$p_/ /g"` | |
2632 | for p in $pth | |
2633 | do | |
2634 | if test -f "$p/$test"; then | |
2635 | test="$p/$test" | |
2636 | break | |
2637 | fi | |
2638 | done | |
2639 | ;; | |
2640 | esac | |
2641 | case "$test" in | |
2642 | /*) | |
2643 | echo "Trying external '$test -h'." >&4 | |
2644 | issymlink="$test -h" | |
2645 | if $test ! -h sym >/dev/null 2>&1; then | |
3c728e00 | 2646 | echo "External '$test -h' is broken, too." >&4 |
2e2a97a6 JH |
2647 | issymlink='' |
2648 | fi | |
2649 | ;; | |
2650 | *) issymlink='' ;; | |
2651 | esac | |
5d644a95 MB |
2652 | fi |
2653 | fi | |
4b661809 | 2654 | if $test "X$issymlink" = X; then |
dafca956 | 2655 | if $test -L sym 2>/dev/null; then |
5d644a95 | 2656 | issymlink="$test -L" |
2e2a97a6 | 2657 | echo "The builtin '$test -L' worked." >&4 |
dafca956 JH |
2658 | fi |
2659 | fi | |
4b661809 | 2660 | if $test "X$issymlink" != X; then |
5d644a95 | 2661 | echo "You can test for symbolic links with '$issymlink'." >&4 |
dafca956 JH |
2662 | else |
2663 | echo "I do not know how you can test for symbolic links." >&4 | |
2664 | fi | |
2665 | $rm -f blurfl sym | |
2666 | ;; | |
2667 | *) echo "No symbolic links, so not testing for their testing..." >&4 | |
2668 | ;; | |
2669 | esac | |
2670 | echo " " | |
2671 | ||
2672 | ||
2673 | case "$mksymlinks" in | |
2674 | $define|true|[yY]*) | |
2675 | case "$src" in | |
2676 | ''|'.') echo "Cannot create symlinks in the original directory." >&4 | |
2677 | exit 1 | |
2678 | ;; | |
4b661809 | 2679 | *) case "$lns:$issymlink" in |
f314eb9f | 2680 | *"ln"*" -s:"*"test -"?) |
dafca956 JH |
2681 | echo "Creating the symbolic links..." >&4 |
2682 | echo "(First creating the subdirectories...)" >&4 | |
2683 | cd .. | |
2684 | awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do | |
2685 | read directory | |
2686 | test -z "$directory" && break | |
2687 | mkdir -p $directory | |
2688 | done | |
2689 | # Sanity check 1. | |
2690 | if test ! -d t/base; then | |
2691 | echo "Failed to create the subdirectories. Aborting." >&4 | |
2692 | exit 1 | |
2693 | fi | |
2694 | echo "(Then creating the symlinks...)" >&4 | |
2695 | awk '{print $1}' $src/MANIFEST | while true; do | |
2696 | read filename | |
2697 | test -z "$filename" && break | |
2698 | if test -f $filename; then | |
5d644a95 | 2699 | if $issymlink $filename; then |
dafca956 JH |
2700 | rm -f $filename |
2701 | fi | |
2702 | fi | |
2703 | if test -f $filename; then | |
2704 | echo "$filename already exists, not symlinking." | |
2705 | else | |
2706 | ln -s $src/$filename $filename | |
2707 | fi | |
2708 | done | |
2709 | # Sanity check 2. | |
a0d24b8a JH |
2710 | if test ! -f t/base/lex.t; then |
2711 | echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4 | |
dafca956 JH |
2712 | exit 1 |
2713 | fi | |
2714 | cd UU | |
2715 | ;; | |
2716 | *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4 | |
2717 | ;; | |
2718 | esac | |
2719 | ;; | |
2720 | esac | |
2721 | ;; | |
2722 | esac | |
2723 | ||
5440bc8e JH |
2724 | |
2725 | case "$usecrosscompile" in | |
2726 | $define|true|[yY]*) | |
93bc48fa | 2727 | $echo "Cross-compiling..." |
5440bc8e JH |
2728 | croak='' |
2729 | case "$cc" in | |
2730 | *-*-gcc) # A cross-compiling gcc, probably. | |
93bc48fa | 2731 | targetarch=`$echo $cc|$sed 's/-gcc$//'` |
5440bc8e JH |
2732 | ar=$targetarch-ar |
2733 | # leave out ld, choosing it is more complex | |
2734 | nm=$targetarch-nm | |
2735 | ranlib=$targetarch-ranlib | |
93bc48fa | 2736 | $echo 'extern int foo;' > try.c |
f8006fac | 2737 | set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'` |
93bc48fa JH |
2738 | shift |
2739 | if $test $# -gt 0; then | |
2740 | incpth="$incpth $*" | |
f8006fac JH |
2741 | incpth="`$echo $incpth|$sed 's/^ //'`" |
2742 | echo "Guessing incpth '$incpth'." >&4 | |
93bc48fa | 2743 | for i in $*; do |
f8006fac | 2744 | j="`$echo $i|$sed 's,/include$,/lib,'`" |
93bc48fa JH |
2745 | if $test -d $j; then |
2746 | libpth="$libpth $j" | |
2747 | fi | |
2748 | done | |
f8006fac JH |
2749 | libpth="`$echo $libpth|$sed 's/^ //'`" |
2750 | echo "Guessing libpth '$libpth'." >&4 | |
93bc48fa JH |
2751 | fi |
2752 | $rm -f try.c | |
5440bc8e JH |
2753 | ;; |
2754 | esac | |
2755 | case "$targetarch" in | |
93bc48fa JH |
2756 | '') echo "Targetarch not defined." >&4; croak=y ;; |
2757 | *) echo "Using targetarch $targetarch." >&4 ;; | |
5440bc8e JH |
2758 | esac |
2759 | case "$incpth" in | |
93bc48fa | 2760 | '') echo "Incpth not defined." >&4; croak=y ;; |
f8006fac | 2761 | *) echo "Using incpth '$incpth'." >&4 ;; |
5440bc8e JH |
2762 | esac |
2763 | case "$libpth" in | |
93bc48fa | 2764 | '') echo "Libpth not defined." >&4; croak=y ;; |
f8006fac | 2765 | *) echo "Using libpth '$libpth'." >&4 ;; |
5440bc8e | 2766 | esac |
93bc48fa JH |
2767 | case "$usrinc" in |
2768 | '') for i in $incpth; do | |
2769 | if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then | |
2770 | usrinc=$i | |
2771 | echo "Guessing usrinc $usrinc." >&4 | |
2772 | break | |
2773 | fi | |
2774 | done | |
2775 | case "$usrinc" in | |
2776 | '') echo "Usrinc not defined." >&4; croak=y ;; | |
2777 | esac | |
2778 | ;; | |
2779 | *) echo "Using usrinc $usrinc." >&4 ;; | |
5440bc8e | 2780 | esac |
93bc48fa JH |
2781 | case "$targethost" in |
2782 | '') echo "Targethost not defined." >&4; croak=y ;; | |
2783 | *) echo "Using targethost $targethost." >&4 | |
5440bc8e | 2784 | esac |
93bc48fa JH |
2785 | locincpth=' ' |
2786 | loclibpth=' ' | |
5440bc8e | 2787 | case "$croak" in |
93bc48fa | 2788 | y) echo "Cannot continue, aborting." >&4; exit 1 ;; |
5440bc8e JH |
2789 | esac |
2790 | case "$src" in | |
2791 | /*) run=$src/Cross/run | |
93c0359c | 2792 | targetmkdir=$src/Cross/mkdir |
5440bc8e JH |
2793 | to=$src/Cross/to |
2794 | from=$src/Cross/from | |
2795 | ;; | |
93bc48fa | 2796 | *) pwd=`$test -f ../Configure & cd ..; pwd` |
5440bc8e | 2797 | run=$pwd/Cross/run |
f8006fac | 2798 | targetmkdir=$pwd/Cross/mkdir |
5440bc8e JH |
2799 | to=$pwd/Cross/to |
2800 | from=$pwd/Cross/from | |
2801 | ;; | |
2802 | esac | |
2803 | case "$targetrun" in | |
2804 | '') targetrun=ssh ;; | |
2805 | esac | |
2806 | case "$targetto" in | |
2807 | '') targetto=scp ;; | |
2808 | esac | |
2809 | case "$targetfrom" in | |
2810 | '') targetfrom=scp ;; | |
2811 | esac | |
2812 | run=$run-$targetrun | |
2813 | to=$to-$targetto | |
2814 | from=$from-$targetfrom | |
93bc48fa JH |
2815 | case "$targetdir" in |
2816 | '') targetdir=/tmp | |
2817 | echo "Guessing targetdir $targetdir." >&4 | |
2818 | ;; | |
2819 | esac | |
5440bc8e | 2820 | case "$targetuser" in |
93bc48fa JH |
2821 | '') targetuser=root |
2822 | echo "Guessing targetuser $targetuser." >&4 | |
2823 | ;; | |
5440bc8e JH |
2824 | esac |
2825 | case "$targetfrom" in | |
2826 | scp) q=-q ;; | |
2827 | *) q='' ;; | |
2828 | esac | |
2829 | case "$targetrun" in | |
2830 | ssh|rsh) | |
2831 | cat >$run <<EOF | |
2832 | #!/bin/sh | |
93c0359c JH |
2833 | case "\$1" in |
2834 | -cwd) | |
2835 | shift | |
2836 | cwd=\$1 | |
2837 | shift | |
2838 | ;; | |
2839 | esac | |
2840 | case "\$cwd" in | |
2841 | '') cwd=$targetdir ;; | |
2842 | esac | |
5440bc8e JH |
2843 | exe=\$1 |
2844 | shift | |
93c0359c JH |
2845 | if $test ! -f \$exe.xok; then |
2846 | $to \$exe | |
2847 | $touch \$exe.xok | |
2848 | fi | |
2849 | $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@" | |
5440bc8e JH |
2850 | EOF |
2851 | ;; | |
93bc48fa | 2852 | *) echo "Unknown targetrun '$targetrun'" >&4 |
5440bc8e JH |
2853 | exit 1 |
2854 | ;; | |
2855 | esac | |
93c0359c JH |
2856 | case "$targetmkdir" in |
2857 | */Cross/mkdir) | |
2858 | cat >$targetmkdir <<EOF | |
2859 | #!/bin/sh | |
2860 | $targetrun -l $targetuser $targethost "mkdir -p \$@" | |
2861 | EOF | |
f8006fac | 2862 | $chmod a+rx $targetmkdir |
93c0359c JH |
2863 | ;; |
2864 | *) echo "Unknown targetmkdir '$targetmkdir'" >&4 | |
2865 | exit 1 | |
2866 | ;; | |
2867 | esac | |
5440bc8e JH |
2868 | case "$targetto" in |
2869 | scp|rcp) | |
2870 | cat >$to <<EOF | |
2871 | #!/bin/sh | |
2872 | for f in \$@ | |
2873 | do | |
93c0359c JH |
2874 | case "\$f" in |
2875 | /*) | |
2876 | $targetmkdir \`dirname \$f\` | |
2877 | $targetto $q \$f $targetuser@$targethost:\$f || exit 1 | |
2878 | ;; | |
2879 | *) | |
2880 | $targetmkdir $targetdir/\`dirname \$f\` | |
2881 | $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1 | |
2882 | ;; | |
2883 | esac | |
5440bc8e JH |
2884 | done |
2885 | exit 0 | |
2886 | EOF | |
2887 | ;; | |
2888 | cp) cat >$to <<EOF | |
2889 | #!/bin/sh | |
93c0359c JH |
2890 | for f in \$@ |
2891 | do | |
2892 | case "\$f" in | |
2893 | /*) | |
2894 | $mkdir -p $targetdir/\`dirname \$f\` | |
2895 | $cp \$f $targetdir/\$f || exit 1 | |
2896 | ;; | |
2897 | *) | |
2898 | $targetmkdir $targetdir/\`dirname \$f\` | |
2899 | $cp \$f $targetdir/\$f || exit 1 | |
2900 | ;; | |
2901 | esac | |
2902 | done | |
2903 | exit 0 | |
5440bc8e JH |
2904 | EOF |
2905 | ;; | |
93bc48fa | 2906 | *) echo "Unknown targetto '$targetto'" >&4 |
5440bc8e JH |
2907 | exit 1 |
2908 | ;; | |
2909 | esac | |
2910 | case "$targetfrom" in | |
2911 | scp|rcp) | |
2912 | cat >$from <<EOF | |
2913 | #!/bin/sh | |
2914 | for f in \$@ | |
2915 | do | |
93c0359c | 2916 | $rm -f \$f |
5440bc8e JH |
2917 | $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1 |
2918 | done | |
2919 | exit 0 | |
2920 | EOF | |
2921 | ;; | |
2922 | cp) cat >$from <<EOF | |
2923 | #!/bin/sh | |
2924 | for f in \$@ | |
2925 | do | |
93c0359c | 2926 | $rm -f \$f |
5440bc8e JH |
2927 | cp $targetdir/\$f . || exit 1 |
2928 | done | |
2929 | exit 0 | |
2930 | EOF | |
2931 | ;; | |
93bc48fa | 2932 | *) echo "Unknown targetfrom '$targetfrom'" >&4 |
5440bc8e JH |
2933 | exit 1 |
2934 | ;; | |
2935 | esac | |
93bc48fa JH |
2936 | if $test ! -f $run; then |
2937 | echo "Target 'run' script '$run' not found." >&4 | |
5440bc8e | 2938 | else |
f8006fac | 2939 | $chmod a+rx $run |
5440bc8e | 2940 | fi |
93bc48fa JH |
2941 | if $test ! -f $to; then |
2942 | echo "Target 'to' script '$to' not found." >&4 | |
5440bc8e | 2943 | else |
f8006fac | 2944 | $chmod a+rx $to |
5440bc8e | 2945 | fi |
93bc48fa JH |
2946 | if $test ! -f $from; then |
2947 | echo "Target 'from' script '$from' not found." >&4 | |
5440bc8e | 2948 | else |
f8006fac | 2949 | $chmod a+rx $from |
5440bc8e | 2950 | fi |
93bc48fa | 2951 | if $test ! -f $run -o ! -f $to -o ! -f $from; then |
5440bc8e JH |
2952 | exit 1 |
2953 | fi | |
2954 | cat >&4 <<EOF | |
f8006fac JH |
2955 | Using '$run' for remote execution, |
2956 | and '$from' and '$to' | |
93bc48fa | 2957 | for remote file transfer. |
5440bc8e JH |
2958 | EOF |
2959 | ;; | |
2960 | *) run='' | |
2961 | to=: | |
2962 | from=: | |
2963 | usecrosscompile='undef' | |
2964 | targetarch='' | |
2965 | ;; | |
2966 | esac | |
2967 | ||
ecfc5424 AD |
2968 | : see whether [:lower:] and [:upper:] are supported character classes |
2969 | echo " " | |
ecfc5424 AD |
2970 | case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in |
2971 | ABYZ) | |
2972 | echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 | |
2973 | up='[:upper:]' | |
2974 | low='[:lower:]' | |
2975 | ;; | |
416d0bea MB |
2976 | *) # There is a discontinuity in EBCDIC between 'R' and 'S' |
2977 | # (0xd9 and 0xe2), therefore that is a nice testing point. | |
2978 | if test "X$up" = X -o "X$low" = X; then | |
2979 | case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in | |
2980 | rs) up='[A-Z]' | |
2981 | low='[a-z]' | |
28e8609d JH |
2982 | ;; |
2983 | esac | |
416d0bea | 2984 | fi |
28e8609d | 2985 | if test "X$up" = X -o "X$low" = X; then |
416d0bea MB |
2986 | case "`echo RS | $tr R-S r-s 2>/dev/null`" in |
2987 | rs) up='A-Z' | |
28e8609d JH |
2988 | low='a-z' |
2989 | ;; | |
2990 | esac | |
416d0bea | 2991 | fi |
28e8609d | 2992 | if test "X$up" = X -o "X$low" = X; then |
416d0bea MB |
2993 | case "`echo RS | od -x 2>/dev/null`" in |
2994 | *D9E2*|*d9e2*) | |
28e8609d JH |
2995 | echo "Hey, this might be EBCDIC." >&4 |
2996 | if test "X$up" = X -o "X$low" = X; then | |
416d0bea MB |
2997 | case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in |
2998 | rs) up='[A-IJ-RS-Z]' | |
2999 | low='[a-ij-rs-z]' | |
28e8609d JH |
3000 | ;; |
3001 | esac | |
3002 | fi | |
3003 | if test "X$up" = X -o "X$low" = X; then | |
416d0bea MB |
3004 | case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in |
3005 | rs) up='A-IJ-RS-Z' | |
3006 | low='a-ij-rs-z' | |
28e8609d JH |
3007 | ;; |
3008 | esac | |
3009 | fi | |
3010 | ;; | |
3011 | esac | |
3012 | fi | |
3013 | esac | |
416d0bea MB |
3014 | case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in |
3015 | rs) | |
28e8609d JH |
3016 | echo "Using $up and $low to convert case." >&4 |
3017 | ;; | |
ecfc5424 | 3018 | *) |
28e8609d JH |
3019 | echo "I don't know how to translate letters from upper to lower case." >&4 |
3020 | echo "Your tr is not acting any way I know of." >&4 | |
3021 | exit 1 | |
3022 | ;; | |
ecfc5424 AD |
3023 | esac |
3024 | : set up the translation script tr, must be called with ./tr of course | |
3025 | cat >tr <<EOSC | |
3026 | $startsh | |
3027 | case "\$1\$2" in | |
3028 | '[A-Z][a-z]') exec $tr '$up' '$low';; | |
3029 | '[a-z][A-Z]') exec $tr '$low' '$up';; | |
3030 | esac | |
3031 | exec $tr "\$@" | |
3032 | EOSC | |
3033 | chmod +x tr | |
3034 | $eunicefix tr | |
3035 | ||
2304df62 AD |
3036 | : Try to determine whether config.sh was made on this system |
3037 | case "$config_sh" in | |
3038 | '') | |
43999f95 JH |
3039 | myuname=`$uname -a 2>/dev/null` |
3040 | $test -z "$myuname" && myuname=`hostname 2>/dev/null` | |
28e8609d JH |
3041 | # tr '[A-Z]' '[a-z]' would not work in EBCDIC |
3042 | # because the A-Z/a-z are not consecutive. | |
34e09935 | 3043 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \ |
3eaeeeae | 3044 | ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` |
1aef975c | 3045 | newmyuname="$myuname" |
2304df62 | 3046 | dflt=n |
16d20bd9 AD |
3047 | case "$knowitall" in |
3048 | '') | |
3049 | if test -f ../config.sh; then | |
3050 | if $contains myuname= ../config.sh >/dev/null 2>&1; then | |
3051 | eval "`grep myuname= ../config.sh`" | |
3052 | fi | |
3053 | if test "X$myuname" = "X$newmyuname"; then | |
3054 | dflt=y | |
3055 | fi | |
2304df62 | 3056 | fi |
16d20bd9 AD |
3057 | ;; |
3058 | *) dflt=y;; | |
3059 | esac | |
2304df62 AD |
3060 | |
3061 | : Get old answers from old config file if Configure was run on the | |
3062 | : same system, otherwise use the hints. | |
3063 | hint=default | |
3064 | cd .. | |
3065 | if test -f config.sh; then | |
16d20bd9 AD |
3066 | echo " " |
3067 | rp="I see a config.sh file. Shall I use it to set the defaults?" | |
2304df62 AD |
3068 | . UU/myread |
3069 | case "$ans" in | |
f83701cd AD |
3070 | n*|N*) echo "OK, I'll ignore it." |
3071 | mv config.sh config.sh.old | |
3072 | myuname="$newmyuname" | |
3073 | ;; | |
2304df62 | 3074 | *) echo "Fetching default answers from your old config.sh file..." >&4 |
ecfc5424 AD |
3075 | tmp_n="$n" |
3076 | tmp_c="$c" | |
85cad39c | 3077 | tmp_sh="$sh" |
2304df62 AD |
3078 | . ./config.sh |
3079 | cp config.sh UU | |
ecfc5424 AD |
3080 | n="$tmp_n" |
3081 | c="$tmp_c" | |
85cad39c | 3082 | : Older versions did not always set $sh. Catch re-use of such |
3083 | : an old config.sh. | |
3084 | case "$sh" in | |
3085 | '') sh="$tmp_sh" ;; | |
3086 | esac | |
2304df62 AD |
3087 | hint=previous |
3088 | ;; | |
3089 | esac | |
3090 | fi | |
2573c5f9 | 3091 | . ./UU/checkcc |
2304df62 AD |
3092 | if test ! -f config.sh; then |
3093 | $cat <<EOM | |
3094 | ||
4e2a5f63 AD |
3095 | First time through, eh? I have some defaults handy for some systems |
3096 | that need some extra help getting the Configure answers right: | |
2304df62 AD |
3097 | |
3098 | EOM | |
dfe9444c | 3099 | (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4 |
2304df62 AD |
3100 | dflt='' |
3101 | : Half the following guesses are probably wrong... If you have better | |
7f2de2d2 | 3102 | : tests or hints, please send them to perlbug@perl.org |
2304df62 | 3103 | : The metaconfig authors would also appreciate a copy... |
a0d0e21e | 3104 | $test -f /irix && osname=irix |
85e6fe83 LW |
3105 | $test -f /xenix && osname=sco_xenix |
3106 | $test -f /dynix && osname=dynix | |
3107 | $test -f /dnix && osname=dnix | |
5f05dabc | 3108 | $test -f /lynx.os && osname=lynxos |
3109 | $test -f /unicos && osname=unicos && osvers=`$uname -r` | |
c71a9cee | 3110 | $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r` |
7a4c00b4 | 3111 | $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` |
85e6fe83 | 3112 | $test -f /bin/mips && /bin/mips && osname=mips |
ecfc5424 AD |
3113 | $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ |
3114 | $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 | |
a0d0e21e LW |
3115 | $test -d /usr/apollo/bin && osname=apollo |
3116 | $test -f /etc/saf/_sactab && osname=svr4 | |
85e6fe83 | 3117 | $test -d /usr/include/minix && osname=minix |
d54344fc | 3118 | $test -f /system/gnu_library/bin/ar.pm && osname=vos |
e060872b | 3119 | if $test -d /MachTen -o -d /MachTen_Folder; then |
dfe9444c | 3120 | osname=machten |
4633a7c4 | 3121 | if $test -x /sbin/version; then |
dfe9444c | 3122 | osvers=`/sbin/version | $awk '{print $2}' | |
4633a7c4 LW |
3123 | $sed -e 's/[A-Za-z]$//'` |
3124 | elif $test -x /usr/etc/version; then | |
dfe9444c | 3125 | osvers=`/usr/etc/version | $awk '{print $2}' | |
4633a7c4 LW |
3126 | $sed -e 's/[A-Za-z]$//'` |
3127 | else | |
3128 | osvers="$2.$3" | |
3129 | fi | |
3130 | fi | |
aaacdc8b GS |
3131 | |
3132 | $test -f /sys/posix.dll && | |
3133 | $test -f /usr/bin/what && | |
3134 | set X `/usr/bin/what /sys/posix.dll` && | |
3135 | $test "$3" = UWIN && | |
3136 | osname=uwin && | |
3137 | osvers="$5" | |
3138 | ||
2304df62 AD |
3139 | if $test -f $uname; then |
3140 | set X $myuname | |
3141 | shift | |
3142 | ||
2304df62 | 3143 | case "$5" in |
85e6fe83 | 3144 | fps*) osname=fps ;; |
2304df62 AD |
3145 | mips*) |
3146 | case "$4" in | |
85e6fe83 LW |
3147 | umips) osname=umips ;; |
3148 | *) osname=mips ;; | |
2304df62 | 3149 | esac;; |
85e6fe83 LW |
3150 | [23]100) osname=mips ;; |
3151 | next*) osname=next ;; | |
ecfc5424 | 3152 | i386*) |
c6912327 JH |
3153 | tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'` |
3154 | if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then | |
619ffc2b JH |
3155 | osname='sco' |
3156 | osvers=$tmp | |
3157 | elif $test -f /etc/kconfig; then | |
ecfc5424 | 3158 | osname=isc |
bd628c73 | 3159 | if test "$lns" = "$ln -s"; then |
a0d0e21e LW |
3160 | osvers=4 |
3161 | elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then | |
3162 | osvers=3 | |
2304df62 | 3163 | elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then |
a0d0e21e | 3164 | osvers=2 |
ecfc5424 AD |
3165 | fi |
3166 | fi | |
2000072c | 3167 | tmp='' |
ecfc5424 | 3168 | ;; |
c4f23d77 AD |
3169 | pc*) |
3170 | if test -n "$DJGPP"; then | |
3171 | osname=dos | |
3172 | osvers=djgpp | |
3173 | fi | |
3174 | ;; | |
2304df62 AD |
3175 | esac |
3176 | ||
3177 | case "$1" in | |
a0d0e21e LW |
3178 | aix) osname=aix |
3179 | tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` | |
3180 | case "$tmp" in | |
e81c5c2a NC |
3181 | # oslevel can fail with: |
3182 | # oslevel: Unable to acquire lock. | |
3183 | *not\ found) osvers="$4"."$3" ;; | |
a0d0e21e LW |
3184 | '<3240'|'<>3240') osvers=3.2.0 ;; |
3185 | '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; | |
3186 | '=3250'|'>3250') osvers=3.2.5 ;; | |
1aef975c | 3187 | *) osvers=$tmp;; |
a0d0e21e LW |
3188 | esac |
3189 | ;; | |
aaacdc8b GS |
3190 | bsd386) osname=bsd386 |
3191 | osvers=`$uname -r` | |
3192 | ;; | |
3193 | cygwin*) osname=cygwin | |
3194 | osvers="$3" | |
3195 | ;; | |
23f87696 SZ |
3196 | *dc.osx) osname=dcosx |
3197 | osvers="$3" | |
3198 | ;; | |
a0d0e21e LW |
3199 | dnix) osname=dnix |
3200 | osvers="$3" | |
3201 | ;; | |
3202 | domainos) osname=apollo | |
3203 | osvers="$3" | |
3204 | ;; | |
a774dfe6 RSG |
3205 | dgux) osname=dgux |
3206 | osvers="$3" | |
3207 | ;; | |
3208 | dragonfly) osname=dragonfly | |
a0d0e21e LW |
3209 | osvers="$3" |
3210 | ;; | |
760ac839 | 3211 | dynixptx*) osname=dynixptx |
e58e581d | 3212 | osvers=`echo "$4"|sed 's/^v//'` |
760ac839 | 3213 | ;; |
a774dfe6 | 3214 | freebsd) osname=freebsd |
a0d0e21e | 3215 | osvers="$3" ;; |
761ee4e8 BD |
3216 | genix) osname=genix ;; |
3217 | gnu) osname=gnu | |
3218 | osvers="$3" ;; | |
a774dfe6 | 3219 | hp*) osname=hpux |
bfb7748a | 3220 | osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'` |
a0d0e21e | 3221 | ;; |
761ee4e8 | 3222 | irix*) osname=irix |
a0d0e21e LW |
3223 | case "$3" in |
3224 | 4*) osvers=4 ;; | |
3225 | 5*) osvers=5 ;; | |
ecfc5424 | 3226 | *) osvers="$3" ;; |
a0d0e21e LW |
3227 | esac |
3228 | ;; | |
761ee4e8 | 3229 | linux) osname=linux |
a0d0e21e | 3230 | case "$3" in |
a0d0e21e LW |
3231 | *) osvers="$3" ;; |
3232 | esac | |
3233 | ;; | |
761ee4e8 | 3234 | MiNT) osname=mint |
28e8609d JH |
3235 | ;; |
3236 | netbsd*) osname=netbsd | |
ecfc5424 AD |
3237 | osvers="$3" |
3238 | ;; | |
4e81affe MM |
3239 | news-os) osvers="$3" |
3240 | case "$3" in | |
3241 | 4*) osname=newsos4 ;; | |
3242 | *) osname=newsos ;; | |
3243 | esac | |
3244 | ;; | |
aaacdc8b | 3245 | next*) osname=next ;; |
28bb1e2c | 3246 | nonstop-ux) osname=nonstopux ;; |
65dc58a1 TM |
3247 | openbsd) osname=openbsd |
3248 | osvers="$3" | |
3249 | ;; | |
5c728af0 IZ |
3250 | os2) osname=os2 |
3251 | osvers="$4" | |
3252 | ;; | |
aaacdc8b GS |
3253 | POSIX-BC | posix-bc ) osname=posix-bc |
3254 | osvers="$3" | |
a0d0e21e | 3255 | ;; |
ae3afa4e TH |
3256 | powerux | power_ux | powermax_os | powermaxos | \ |
3257 | powerunix | power_unix) osname=powerux | |
3258 | osvers="$3" | |
3259 | ;; | |
aaacdc8b GS |
3260 | qnx) osname=qnx |
3261 | osvers="$4" | |
3262 | ;; | |
a0d0e21e LW |
3263 | solaris) osname=solaris |
3264 | case "$3" in | |
3265 | 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; | |
ecfc5424 | 3266 | *) osvers="$3" ;; |
a0d0e21e LW |
3267 | esac |
3268 | ;; | |
85e6fe83 LW |
3269 | sunos) osname=sunos |
3270 | case "$3" in | |
85e6fe83 LW |
3271 | 5*) osname=solaris |
3272 | osvers=`echo $3 | $sed 's/^5/2/g'` ;; | |
a0d0e21e | 3273 | *) osvers="$3" ;; |
2304df62 AD |
3274 | esac |
3275 | ;; | |
a0d0e21e | 3276 | titanos) osname=titanos |
85e6fe83 | 3277 | case "$3" in |
a0d0e21e LW |
3278 | 1*) osvers=1 ;; |
3279 | 2*) osvers=2 ;; | |
3280 | 3*) osvers=3 ;; | |
3281 | 4*) osvers=4 ;; | |
ecfc5424 | 3282 | *) osvers="$3" ;; |
2304df62 AD |
3283 | esac |
3284 | ;; | |
85e6fe83 | 3285 | ultrix) osname=ultrix |
ecfc5424 | 3286 | osvers="$3" |
2304df62 | 3287 | ;; |
28757baa | 3288 | osf1|mls+) case "$5" in |
fed7345c AD |
3289 | alpha) |
3290 | osname=dec_osf | |
fdd85a03 | 3291 | osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'` |
2aa76180 JH |
3292 | case "$osvers" in |
3293 | [1-9].[0-9]*) ;; | |
3294 | *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;; | |
3295 | esac | |
ecfc5424 AD |
3296 | ;; |
3297 | hp*) osname=hp_osf1 ;; | |
3298 | mips) osname=mips_osf1 ;; | |
85e6fe83 LW |
3299 | esac |
3300 | ;; | |
af1ff193 | 3301 | # UnixWare 7.1.2 is known as Open UNIX 8 |
381c1bae | 3302 | openunix|unixware) osname=svr5 |
0337d152 BG |
3303 | osvers="$4" |
3304 | ;; | |
3c728e00 | 3305 | uts) osname=uts |
a0d0e21e LW |
3306 | osvers="$3" |
3307 | ;; | |
3c728e00 JH |
3308 | vos) osvers="$3" |
3309 | ;; | |
85e6fe83 | 3310 | $2) case "$osname" in |
2304df62 | 3311 | *isc*) ;; |
a0d0e21e | 3312 | *freebsd*) ;; |
5f05dabc | 3313 | svr*) |
a0d0e21e | 3314 | : svr4.x or possibly later |
a774dfe6 | 3315 | case "svr$3" in |
a0d0e21e LW |
3316 | ${osname}*) |
3317 | osname=svr$3 | |
3318 | osvers=$4 | |
3319 | ;; | |
3320 | esac | |
3321 | case "$osname" in | |
3322 | svr4.0) | |
3323 | : Check for ESIX | |
3324 | if test -f /stand/boot ; then | |
3325 | eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot` | |
ecfc5424 AD |
3326 | if test -n "$INITPROG" -a -f "$INITPROG"; then |
3327 | isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'` | |
3328 | if test -n "$isesix"; then | |
a0d0e21e LW |
3329 | osname=esix4 |
3330 | fi | |
3331 | fi | |
3332 | fi | |
3333 | ;; | |
3334 | esac | |
3335 | ;; | |
2304df62 | 3336 | *) if test -f /etc/systemid; then |
a0d0e21e LW |
3337 | osname=sco |
3338 | set `echo $3 | $sed 's/\./ /g'` $4 | |
c4f23d77 | 3339 | if $test -f $src/hints/sco_$1_$2_$3.sh; then |
85e6fe83 | 3340 | osvers=$1.$2.$3 |
c4f23d77 | 3341 | elif $test -f $src/hints/sco_$1_$2.sh; then |
85e6fe83 | 3342 | osvers=$1.$2 |
c4f23d77 | 3343 | elif $test -f $src/hints/sco_$1.sh; then |
85e6fe83 | 3344 | osvers=$1 |
2304df62 | 3345 | fi |
a0d0e21e LW |
3346 | else |
3347 | case "$osname" in | |
3348 | '') : Still unknown. Probably a generic Sys V. | |
3349 | osname="sysv" | |
3350 | osvers="$3" | |
3351 | ;; | |
3352 | esac | |
2304df62 AD |
3353 | fi |
3354 | ;; | |
3355 | esac | |
3356 | ;; | |
a0d0e21e LW |
3357 | *) case "$osname" in |
3358 | '') : Still unknown. Probably a generic BSD. | |
3359 | osname="$1" | |
3360 | osvers="$3" | |
3361 | ;; | |
3362 | esac | |
3363 | ;; | |
2304df62 AD |
3364 | esac |
3365 | else | |
dfe9444c AD |
3366 | if test -f /vmunix -a -f $src/hints/news_os.sh; then |
3367 | (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1 | |
3368 | if $contains news-os UU/kernel.what >/dev/null 2>&1; then | |
3369 | osname=news_os | |
2304df62 | 3370 | fi |
dfe9444c | 3371 | $rm -f UU/kernel.what |
5c728af0 | 3372 | elif test -d c:/. -o -n "$is_os2" ; then |
8e07c86e AD |
3373 | set X $myuname |
3374 | osname=os2 | |
3375 | osvers="$5" | |
2304df62 AD |
3376 | fi |
3377 | fi | |
a774dfe6 | 3378 | |
5440bc8e JH |
3379 | case "$targetarch" in |
3380 | '') ;; | |
3381 | *) hostarch=$osname | |
3382 | osname=`echo $targetarch|sed 's,^[^-]*-,,'` | |
3383 | osvers='' | |
3384 | ;; | |
3385 | esac | |
3386 | ||
a0d0e21e LW |
3387 | : Now look for a hint file osname_osvers, unless one has been |
3388 | : specified already. | |
3389 | case "$hintfile" in | |
3390 | ''|' ') | |
1e127011 | 3391 | file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'` |
a0d0e21e | 3392 | : Also try without trailing minor version numbers. |
1e127011 DD |
3393 | xfile=`echo $file | $sed -e 's%_[^_]*$%%'` |
3394 | xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'` | |
3395 | xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'` | |
3396 | xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'` | |
a0d0e21e LW |
3397 | case "$file" in |
3398 | '') dflt=none ;; | |
3399 | *) case "$osvers" in | |
3400 | '') dflt=$file | |
3401 | ;; | |
dfe9444c | 3402 | *) if $test -f $src/hints/$file.sh ; then |
a0d0e21e | 3403 | dflt=$file |
dfe9444c | 3404 | elif $test -f $src/hints/$xfile.sh ; then |
a0d0e21e | 3405 | dflt=$xfile |
dfe9444c | 3406 | elif $test -f $src/hints/$xxfile.sh ; then |
a0d0e21e | 3407 | dflt=$xxfile |
dfe9444c | 3408 | elif $test -f $src/hints/$xxxfile.sh ; then |
a0d0e21e | 3409 | dflt=$xxxfile |
dfe9444c | 3410 | elif $test -f $src/hints/$xxxxfile.sh ; then |
a0d0e21e | 3411 | dflt=$xxxxfile |
dfe9444c | 3412 | elif $test -f "$src/hints/${osname}.sh" ; then |
a0d0e21e LW |
3413 | dflt="${osname}" |
3414 | else | |
3415 | dflt=none | |
3416 | fi | |
3417 | ;; | |
3418 | esac | |
85e6fe83 LW |
3419 | ;; |
3420 | esac | |
4e2a5f63 AD |
3421 | if $test -f Policy.sh ; then |
3422 | case "$dflt" in | |
3423 | *Policy*) ;; | |
3424 | none) dflt="Policy" ;; | |
3425 | *) dflt="Policy $dflt" ;; | |
3426 | esac | |
3427 | fi | |
85e6fe83 | 3428 | ;; |
a0d0e21e | 3429 | *) |
ecfc5424 | 3430 | dflt=`echo $hintfile | $sed 's/\.sh$//'` |
a0d0e21e | 3431 | ;; |
2304df62 | 3432 | esac |
1aef975c | 3433 | |
4e2a5f63 AD |
3434 | if $test -f Policy.sh ; then |
3435 | $cat <<EOM | |
3436 | ||
3437 | There's also a Policy hint file available, which should make the | |
3438 | site-specific (policy) questions easier to answer. | |
3439 | EOM | |
3440 | ||
3441 | fi | |
3442 | ||
2304df62 AD |
3443 | $cat <<EOM |
3444 | ||
3445 | You may give one or more space-separated answers, or "none" if appropriate. | |
a2d23ec2 MB |
3446 | If you have a handcrafted Policy.sh file or a Policy.sh file generated by a |
3447 | previous run of Configure, you may specify it as well as or instead of | |
3448 | OS-specific hints. If hints are provided for your OS, you should use them: | |
3449 | although Perl can probably be built without hints on many platforms, using | |
3450 | hints often improve performance and may enable features that Configure can't | |
3451 | set up on its own. If there are no hints that match your OS, specify "none"; | |
3452 | DO NOT give a wrong version or a wrong OS. | |
2304df62 AD |
3453 | |
3454 | EOM | |
4e2a5f63 | 3455 | |
2304df62 | 3456 | rp="Which of these apply, if any?" |
dfe9444c | 3457 | . UU/myread |
85e6fe83 LW |
3458 | tans=$ans |
3459 | for file in $tans; do | |
4e2a5f63 AD |
3460 | if $test X$file = XPolicy -a -f Policy.sh; then |
3461 | . Policy.sh | |
3462 | $cat Policy.sh >> UU/config.sh | |
3463 | elif $test -f $src/hints/$file.sh; then | |
dfe9444c AD |
3464 | . $src/hints/$file.sh |
3465 | $cat $src/hints/$file.sh >> UU/config.sh | |
5440bc8e | 3466 | elif $test X"$tans" = X -o X"$tans" = Xnone ; then |
2304df62 AD |
3467 | : nothing |
3468 | else | |
85e6fe83 LW |
3469 | : Give one chance to correct a possible typo. |
3470 | echo "$file.sh does not exist" | |
3471 | dflt=$file | |
3472 | rp="hint to use instead?" | |
dfe9444c | 3473 | . UU/myread |
85e6fe83 | 3474 | for file in $ans; do |
dfe9444c AD |
3475 | if $test -f "$src/hints/$file.sh"; then |
3476 | . $src/hints/$file.sh | |
3477 | $cat $src/hints/$file.sh >> UU/config.sh | |
85e6fe83 LW |
3478 | elif $test X$ans = X -o X$ans = Xnone ; then |
3479 | : nothing | |
3480 | else | |
3481 | echo "$file.sh does not exist -- ignored." | |
3482 | fi | |
3483 | done | |
2304df62 AD |
3484 | fi |
3485 | done | |
85e6fe83 | 3486 | |
2304df62 | 3487 | hint=recommended |
85e6fe83 | 3488 | : Remember our hint file for later. |
dfe9444c | 3489 | if $test -f "$src/hints/$file.sh" ; then |
a0d0e21e | 3490 | hintfile="$file" |
85e6fe83 | 3491 | else |
a0d0e21e | 3492 | hintfile='' |
85e6fe83 | 3493 | fi |
2304df62 AD |
3494 | fi |
3495 | cd UU | |
3496 | ;; | |
3497 | *) | |
3498 | echo " " | |
3499 | echo "Fetching default answers from $config_sh..." >&4 | |
ecfc5424 AD |
3500 | tmp_n="$n" |
3501 | tmp_c="$c" | |
2304df62 AD |
3502 | cd .. |
3503 | cp $config_sh config.sh 2>/dev/null | |
a78b0d02 | 3504 | chmod +w config.sh |
2304df62 AD |
3505 | . ./config.sh |
3506 | cd UU | |
3507 | cp ../config.sh . | |
ecfc5424 AD |
3508 | n="$tmp_n" |
3509 | c="$tmp_c" | |
2304df62 AD |
3510 | hint=previous |
3511 | ;; | |
3512 | esac | |
1aef975c | 3513 | test "$override" && . ./optdef.sh |
2304df62 AD |
3514 | |
3515 | : Restore computed paths | |
3516 | for file in $loclist $trylist; do | |
3517 | eval $file="\$_$file" | |
3518 | done | |
3519 | ||
85e6fe83 | 3520 | cat << EOM |
a0d0e21e | 3521 | |
85e6fe83 | 3522 | Configure uses the operating system name and version to set some defaults. |
ecfc5424 AD |
3523 | The default value is probably right if the name rings a bell. Otherwise, |
3524 | since spelling matters for me, either accept the default or answer "none" | |
3525 | to leave it blank. | |
a0d0e21e | 3526 | |
85e6fe83 | 3527 | EOM |
85e6fe83 | 3528 | case "$osname" in |
a0d0e21e | 3529 | ''|' ') |
85e6fe83 | 3530 | case "$hintfile" in |
a0d0e21e | 3531 | ''|' '|none) dflt=none ;; |
ecfc5424 | 3532 | *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;; |
85e6fe83 LW |
3533 | esac |
3534 | ;; | |
3535 | *) dflt="$osname" ;; | |
3536 | esac | |
3537 | rp="Operating system name?" | |
3538 | . ./myread | |
3539 | case "$ans" in | |
ecfc5424 AD |
3540 | none) osname='' ;; |
3541 | *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;; | |
85e6fe83 | 3542 | esac |
8ff267be | 3543 | echo " " |
3544 | case "$osvers" in | |
3545 | ''|' ') | |
3546 | case "$hintfile" in | |
3547 | ''|' '|none) dflt=none ;; | |
3548 | *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'` | |
3549 | dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'` | |
3550 | case "$dflt" in | |
3551 | ''|' ') dflt=none ;; | |
3552 | esac | |
3553 | ;; | |
3554 | esac | |
3555 | ;; | |
3556 | *) dflt="$osvers" ;; | |
3557 | esac | |
3558 | rp="Operating system version?" | |
3559 | . ./myread | |
3560 | case "$ans" in | |
3561 | none) osvers='' ;; | |
3562 | *) osvers="$ans" ;; | |
3563 | esac | |
3564 | ||
02e93a22 JH |
3565 | |
3566 | . ./posthint.sh | |
3567 | ||
2304df62 | 3568 | : who configured the system |
59b83a6f | 3569 | cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` |
dfe9444c AD |
3570 | case "$cf_by" in |
3571 | "") | |
7c04078e | 3572 | cf_by=`(logname) 2>/dev/null` |
dfe9444c | 3573 | case "$cf_by" in |
7c04078e GA |
3574 | "") |
3575 | cf_by=`(whoami) 2>/dev/null` | |
3576 | case "$cf_by" in | |
3577 | "") cf_by=unknown ;; | |
3578 | esac ;; | |
8ff267be | 3579 | esac ;; |
3580 | esac | |
2304df62 | 3581 | |
f3f1a2d8 MB |
3582 | : decide how portable to be. Allow command line overrides. |
3583 | case "$d_portable" in | |
3584 | "$undef") ;; | |
3585 | *) d_portable="$define" ;; | |
b4eb6b3d | 3586 | esac |
b4eb6b3d | 3587 | |
f3f1a2d8 MB |
3588 | : set up shell script to do ~ expansion |
3589 | cat >filexp <<EOSS | |
3590 | $startsh | |
3591 | : expand filename | |
3592 | case "\$1" in | |
3593 | ~/*|~) | |
3594 | echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|" | |
3595 | ;; | |
3596 | ~*) | |
3597 | if $test -f /bin/csh; then | |
3598 | /bin/csh -f -c "glob \$1" | |
3599 | failed=\$? | |
3600 | echo "" | |
3601 | exit \$failed | |
3602 | else | |
3603 | name=\`$expr x\$1 : '..\([^/]*\)'\` | |
3604 | dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\` | |
3605 | if $test ! -d "\$dir"; then | |
3606 | me=\`basename \$0\` | |
3607 | echo "\$me: can't locate home directory for: \$name" >&2 | |
3608 | exit 1 | |
3609 | fi | |
3610 | case "\$1" in | |
3611 | */*) | |
3612 | echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` | |
3613 | ;; | |
3614 | *) | |
3615 | echo \$dir | |
3616 | ;; | |
3617 | esac | |
3618 | fi | |
3619 | ;; | |
3620 | *) | |
3621 | echo \$1 | |
3622 | ;; | |
b29b105d | 3623 | esac |
f3f1a2d8 MB |
3624 | EOSS |
3625 | chmod +x filexp | |
3626 | $eunicefix filexp | |
b29b105d | 3627 | |
f3f1a2d8 MB |
3628 | : now set up to get a file name |
3629 | cat <<EOS >getfile | |
3630 | $startsh | |
3631 | EOS | |
3632 | cat <<'EOSC' >>getfile | |
3633 | tilde='' | |
3634 | fullpath='' | |
3635 | already='' | |
3636 | skip='' | |
3637 | none_ok='' | |
3638 | exp_file='' | |
3639 | nopath_ok='' | |
3640 | orig_rp="$rp" | |
3641 | orig_dflt="$dflt" | |
3642 | case "$gfpth" in | |
3643 | '') gfpth='.' ;; | |
b29b105d | 3644 | esac |
b29b105d | 3645 | |
f3f1a2d8 MB |
3646 | case "$fn" in |
3647 | *\(*) | |
3648 | : getfile will accept an answer from the comma-separated list | |
3649 | : enclosed in parentheses even if it does not meet other criteria. | |
3650 | expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok | |
3651 | fn=`echo $fn | sed 's/(.*)//'` | |
3652 | ;; | |
b29b105d JH |
3653 | esac |
3654 | ||
f3f1a2d8 MB |
3655 | case "$fn" in |
3656 | *:*) | |
3657 | loc_file=`expr $fn : '.*:\(.*\)'` | |
3658 | fn=`expr $fn : '\(.*\):.*'` | |
3659 | ;; | |
b29b105d | 3660 | esac |
b29b105d | 3661 | |
f3f1a2d8 MB |
3662 | case "$fn" in |
3663 | *~*) tilde=true;; | |
3664 | esac | |
3665 | case "$fn" in | |
3666 | */*) fullpath=true;; | |
3667 | esac | |
3668 | case "$fn" in | |
3669 | *+*) skip=true;; | |
3670 | esac | |
3671 | case "$fn" in | |
3672 | *n*) none_ok=true;; | |
3673 | esac | |
3674 | case "$fn" in | |
3675 | *e*) exp_file=true;; | |
3676 | esac | |
3677 | case "$fn" in | |
3678 | *p*) nopath_ok=true;; | |
b29b105d | 3679 | esac |
b29b105d | 3680 | |
f3f1a2d8 MB |
3681 | case "$fn" in |
3682 | *f*) type='File';; | |
3683 | *d*) type='Directory';; | |
3684 | *l*) type='Locate';; | |
3685 | esac | |
b29b105d | 3686 | |
f3f1a2d8 MB |
3687 | what="$type" |
3688 | case "$what" in | |
3689 | Locate) what='File';; | |
3690 | esac | |
b29b105d | 3691 | |
f3f1a2d8 MB |
3692 | case "$exp_file" in |
3693 | '') | |
3694 | case "$d_portable" in | |
3695 | "$define") ;; | |
3696 | *) exp_file=true;; | |
b29b105d JH |
3697 | esac |
3698 | ;; | |
3699 | esac | |
3700 | ||
f3f1a2d8 MB |
3701 | cd .. |
3702 | while test "$type"; do | |
3703 | redo='' | |
3704 | rp="$orig_rp" | |
3705 | dflt="$orig_dflt" | |
3706 | case "$tilde" in | |
3707 | true) rp="$rp (~name ok)";; | |
3708 | esac | |
3709 | . UU/myread | |
3710 | if test -f UU/getfile.ok && \ | |
3711 | $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1 | |
3712 | then | |
3713 | value="$ans" | |
3714 | ansexp="$ans" | |
3715 | break | |
3716 | fi | |
3717 | case "$ans" in | |
3718 | none) | |
3719 | value='' | |
3720 | ansexp='' | |
3721 | case "$none_ok" in | |
3722 | true) type='';; | |
b29b105d JH |
3723 | esac |
3724 | ;; | |
f3f1a2d8 MB |
3725 | *) |
3726 | case "$tilde" in | |
3727 | '') value="$ans" | |
3728 | ansexp="$ans";; | |
3729 | *) | |
3730 | value=`UU/filexp $ans` | |
3731 | case $? in | |
3732 | 0) | |
3733 | if test "$ans" != "$value"; then | |
3734 | echo "(That expands to $value on this system.)" | |
3735 | fi | |
3736 | ;; | |
3737 | *) value="$ans";; | |
3738 | esac | |
3739 | ansexp="$value" | |
3740 | case "$exp_file" in | |
3741 | '') value="$ans";; | |
3742 | esac | |
3743 | ;; | |
3744 | esac | |
3745 | case "$fullpath" in | |
3746 | true) | |
3747 | case "$ansexp" in | |
3748 | /*) value="$ansexp" ;; | |
3749 | [a-zA-Z]:/*) value="$ansexp" ;; | |
3750 | *) | |
3751 | redo=true | |
3752 | case "$already" in | |
3753 | true) | |
3754 | echo "I shall only accept a full path name, as in /bin/ls." >&4 | |
3755 | echo "Use a ! shell escape if you wish to check pathnames." >&4 | |
3756 | ;; | |
3757 | *) | |
3758 | echo "Please give a full path name, starting with slash." >&4 | |
3759 | case "$tilde" in | |
3760 | true) | |
3761 | echo "Note that using ~name is ok provided it expands well." >&4 | |
3762 | already=true | |
3763 | ;; | |
3764 | esac | |
3765 | esac | |
3766 | ;; | |
3767 | esac | |
3768 | ;; | |
3769 | esac | |
3770 | case "$redo" in | |
3771 | '') | |
3772 | case "$type" in | |
3773 | File) | |
3774 | for fp in $gfpth; do | |
3775 | if test "X$fp" = X.; then | |
3776 | pf="$ansexp" | |
3777 | else | |
3778 | pf="$fp/$ansexp" | |
3779 | fi | |
3780 | if test -f "$pf"; then | |
3781 | type='' | |
3782 | elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1 | |
3783 | then | |
3784 | echo "($value is not a plain file, but that's ok.)" | |
3785 | type='' | |
3786 | fi | |
3787 | if test X"$type" = X; then | |
3788 | value="$pf" | |
3789 | break | |
3790 | fi | |
3791 | done | |
3792 | ;; | |
3793 | Directory) | |
3794 | for fp in $gfpth; do | |
3795 | if test "X$fp" = X.; then | |
3796 | dir="$ans" | |
3797 | direxp="$ansexp" | |
3798 | else | |
3799 | dir="$fp/$ansexp" | |
3800 | direxp="$fp/$ansexp" | |
3801 | fi | |
3802 | if test -d "$direxp"; then | |
3803 | type='' | |
3804 | value="$dir" | |
3805 | break | |
3806 | fi | |
3807 | done | |
3808 | ;; | |
3809 | Locate) | |
3810 | if test -d "$ansexp"; then | |
3811 | echo "(Looking for $loc_file in directory $value.)" | |
3812 | value="$value/$loc_file" | |
3813 | ansexp="$ansexp/$loc_file" | |
3814 | fi | |
3815 | if test -f "$ansexp"; then | |
3816 | type='' | |
3817 | fi | |
3818 | case "$nopath_ok" in | |
3819 | true) case "$value" in | |
3820 | */*) ;; | |
3821 | *) echo "Assuming $value will be in people's path." | |
3822 | type='' | |
3823 | ;; | |
3824 | esac | |
3825 | ;; | |
3826 | esac | |
3827 | ;; | |
3828 | esac | |
b4eb6b3d | 3829 | |
f3f1a2d8 MB |
3830 | case "$skip" in |
3831 | true) type=''; | |
3832 | esac | |
3833 | ||
3834 | case "$type" in | |
3835 | '') ;; | |
3836 | *) | |
3837 | if test "$fastread" = yes; then | |
3838 | dflt=y | |
3839 | else | |
3840 | dflt=n | |
3841 | fi | |
3842 | rp="$what $value doesn't exist. Use that name anyway?" | |
3843 | . UU/myread | |
3844 | dflt='' | |
3845 | case "$ans" in | |
3846 | y*) type='';; | |
3847 | *) echo " ";; | |
3848 | esac | |
3849 | ;; | |
3850 | esac | |
3851 | ;; | |
3852 | esac | |
3853 | ;; | |
b4eb6b3d | 3854 | esac |
f3f1a2d8 MB |
3855 | done |
3856 | cd UU | |
3857 | ans="$value" | |
3858 | rp="$orig_rp" | |
3859 | dflt="$orig_dflt" | |
3860 | rm -f getfile.ok | |
3861 | test "X$gfpthkeep" != Xy && gfpth="" | |
3862 | EOSC | |
3863 | ||
3864 | : determine root of directory hierarchy where package will be installed. | |
3865 | case "$prefix" in | |
3866 | '') | |
3867 | dflt=`./loc . /usr/local /usr/local /local /opt /usr` | |
3868 | ;; | |
3869 | *?/) | |
3870 | dflt=`echo "$prefix" | sed 's/.$//'` | |
b4eb6b3d JH |
3871 | ;; |
3872 | *) | |
f3f1a2d8 | 3873 | dflt="$prefix" |
b4eb6b3d JH |
3874 | ;; |
3875 | esac | |
f3f1a2d8 | 3876 | $cat <<EOM |
b4eb6b3d | 3877 | |
f3f1a2d8 MB |
3878 | By default, $package will be installed in $dflt/bin, manual pages |
3879 | under $dflt/man, etc..., i.e. with $dflt as prefix for all | |
3880 | installation directories. Typically this is something like /usr/local. | |
3881 | If you wish to have binaries under /usr/bin but other parts of the | |
3882 | installation under /usr/local, that's ok: you will be prompted | |
3883 | separately for each of the installation directories, the prefix being | |
3884 | only used to set the defaults. | |
c915ce7f JH |
3885 | |
3886 | EOM | |
f3f1a2d8 MB |
3887 | fn=d~ |
3888 | rp='Installation prefix to use?' | |
3889 | . ./getfile | |
3890 | oldprefix='' | |
3891 | case "$prefix" in | |
3892 | '') ;; | |
3893 | *) | |
3894 | case "$ans" in | |
3895 | "$prefix") ;; | |
3896 | *) oldprefix="$prefix";; | |
3897 | esac | |
c915ce7f JH |
3898 | ;; |
3899 | esac | |
f3f1a2d8 MB |
3900 | prefix="$ans" |
3901 | prefixexp="$ansexp" | |
c915ce7f | 3902 | |
f3f1a2d8 MB |
3903 | case "$afsroot" in |
3904 | '') afsroot=/afs ;; | |
3905 | *) afsroot=$afsroot ;; | |
b4eb6b3d | 3906 | esac |
b4eb6b3d | 3907 | |
f3f1a2d8 MB |
3908 | : is AFS running? |
3909 | echo " " | |
3910 | case "$afs" in | |
3911 | $define|true) afs=true ;; | |
3912 | $undef|false) afs=false ;; | |
3913 | *) if test -d $afsroot; then | |
3914 | afs=true | |
3915 | else | |
3916 | afs=false | |
3917 | fi | |
b4eb6b3d | 3918 | ;; |
f3f1a2d8 MB |
3919 | esac |
3920 | if $afs; then | |
3921 | echo "AFS may be running... I'll be extra cautious then..." >&4 | |
3922 | else | |
3923 | echo "AFS does not seem to be running..." >&4 | |
9da7673b | 3924 | fi |
b4eb6b3d | 3925 | |
f3f1a2d8 MB |
3926 | : determine installation prefix for where package is to be installed. |
3927 | if $afs; then | |
3928 | $cat <<EOM | |
3929 | ||
3930 | Since you are running AFS, I need to distinguish the directory in which | |
3931 | files will reside from the directory in which they are installed (and from | |