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