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