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