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