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