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