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 | |
00051dd5 | 31 | # Generated on Wed Apr 9 12:24:24 CEST 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 | 208 | from='' |
f53a6e0e MB |
209 | hostgenerate='' |
210 | hostosname='' | |
211 | hostperl='' | |
5440bc8e JH |
212 | run='' |
213 | targetarch='' | |
82a085a5 | 214 | targetdir='' |
fa142983 | 215 | targetenv='' |
82a085a5 | 216 | targethost='' |
56b575b9 | 217 | targetmkdir='' |
dad780ec | 218 | targetport='' |
5440bc8e JH |
219 | to='' |
220 | usecrosscompile='' | |
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='' |
f53a6e0e | 1170 | targetsh='' |
b4eb6b3d JH |
1171 | sig_count='' |
1172 | sig_name='' | |
1173 | sig_name_init='' | |
1174 | sig_num='' | |
1175 | sig_num_init='' | |
76d3c696 | 1176 | sig_size='' |
f3f1a2d8 | 1177 | d_sitearch='' |
b4eb6b3d JH |
1178 | installsitearch='' |
1179 | sitearch='' | |
1180 | sitearchexp='' | |
1181 | installsitebin='' | |
1182 | sitebin='' | |
1183 | sitebinexp='' | |
8d2cbf27 JH |
1184 | installsitehtml1dir='' |
1185 | sitehtml1dir='' | |
1186 | sitehtml1direxp='' | |
1187 | installsitehtml3dir='' | |
1188 | sitehtml3dir='' | |
1189 | sitehtml3direxp='' | |
b4eb6b3d JH |
1190 | installsitelib='' |
1191 | sitelib='' | |
1192 | sitelib_stem='' | |
1193 | sitelibexp='' | |
91e123a8 JH |
1194 | installsiteman1dir='' |
1195 | siteman1dir='' | |
1196 | siteman1direxp='' | |
1197 | installsiteman3dir='' | |
1198 | siteman3dir='' | |
1199 | siteman3direxp='' | |
b4eb6b3d JH |
1200 | siteprefix='' |
1201 | siteprefixexp='' | |
6e1038e0 MB |
1202 | installsitescript='' |
1203 | sitescript='' | |
1204 | sitescriptexp='' | |
b4eb6b3d JH |
1205 | sizesize='' |
1206 | sizetype='' | |
56b575b9 | 1207 | d_libname_unique='' |
a0d0e21e | 1208 | so='' |
b4eb6b3d | 1209 | socksizetype='' |
2304df62 AD |
1210 | sharpbang='' |
1211 | shsharp='' | |
1212 | spitshell='' | |
dfe9444c | 1213 | src='' |
b4eb6b3d | 1214 | ssizetype='' |
668fdbe1 MB |
1215 | st_ino_sign='' |
1216 | st_ino_size='' | |
b4eb6b3d | 1217 | startperl='' |
2304df62 | 1218 | startsh='' |
b4eb6b3d JH |
1219 | stdchar='' |
1220 | d_stdio_stream_array='' | |
1221 | stdio_stream_array='' | |
1222 | sysman='' | |
81c4fd9e MB |
1223 | sGMTIME_max='' |
1224 | sGMTIME_min='' | |
73e6e416 MB |
1225 | sLOCALTIME_max='' |
1226 | sLOCALTIME_min='' | |
5ff3f7a4 | 1227 | trnl='' |
b4eb6b3d JH |
1228 | uidformat='' |
1229 | uidsign='' | |
1230 | uidsize='' | |
1231 | uidtype='' | |
1232 | archname64='' | |
1233 | use64bitall='' | |
1234 | use64bitint='' | |
34f1896b MB |
1235 | dtrace='' |
1236 | usedtrace='' | |
15b61c98 | 1237 | usefaststdio='' |
d78f9ffa | 1238 | usekernprocpathname='' |
b4eb6b3d JH |
1239 | ccflags_uselargefiles='' |
1240 | ldflags_uselargefiles='' | |
1241 | libswanted_uselargefiles='' | |
1242 | uselargefiles='' | |
1243 | uselongdouble='' | |
1244 | usemorebits='' | |
1245 | usemultiplicity='' | |
2304df62 | 1246 | nm_opt='' |
40a7a20a | 1247 | nm_so_opt='' |
2304df62 AD |
1248 | runnm='' |
1249 | usenm='' | |
ae60cb46 | 1250 | usensgetexecutablepath='' |
b4eb6b3d | 1251 | useperlio='' |
29209bc5 | 1252 | usesocks='' |
b4eb6b3d JH |
1253 | d_oldpthreads='' |
1254 | use5005threads='' | |
1255 | useithreads='' | |
9514c62b | 1256 | usereentrant='' |
b4eb6b3d | 1257 | usethreads='' |
2304df62 | 1258 | incpath='' |
2304df62 AD |
1259 | mips_type='' |
1260 | usrinc='' | |
d03b3b00 | 1261 | vaproto='' |
b4eb6b3d JH |
1262 | d_vendorarch='' |
1263 | installvendorarch='' | |
1264 | vendorarch='' | |
1265 | vendorarchexp='' | |
1266 | d_vendorbin='' | |
1267 | installvendorbin='' | |
1268 | vendorbin='' | |
1269 | vendorbinexp='' | |
8d2cbf27 JH |
1270 | installvendorhtml1dir='' |
1271 | vendorhtml1dir='' | |
1272 | vendorhtml1direxp='' | |
1273 | installvendorhtml3dir='' | |
1274 | vendorhtml3dir='' | |
1275 | vendorhtml3direxp='' | |
b4eb6b3d JH |
1276 | d_vendorlib='' |
1277 | installvendorlib='' | |
1278 | vendorlib='' | |
1279 | vendorlib_stem='' | |
1280 | vendorlibexp='' | |
91e123a8 JH |
1281 | installvendorman1dir='' |
1282 | vendorman1dir='' | |
1283 | vendorman1direxp='' | |
1284 | installvendorman3dir='' | |
1285 | vendorman3dir='' | |
1286 | vendorman3direxp='' | |
b4eb6b3d JH |
1287 | usevendorprefix='' |
1288 | vendorprefix='' | |
1289 | vendorprefixexp='' | |
6e1038e0 MB |
1290 | d_vendorscript='' |
1291 | installvendorscript='' | |
1292 | vendorscript='' | |
1293 | vendorscriptexp='' | |
d56c5707 | 1294 | versiononly='' |
3659ebf1 JH |
1295 | yacc='' |
1296 | yaccflags='' | |
2304df62 AD |
1297 | CONFIG='' |
1298 | ||
34f1896b | 1299 | : Detect odd OSs |
ecfc5424 AD |
1300 | define='define' |
1301 | undef='undef' | |
1302 | smallmach='pdp11 i8086 z8000 i80286 iAPX286' | |
1303 | rmlist='' | |
1304 | ||
1305 | : We must find out about Eunice early | |
1306 | eunicefix=':' | |
1307 | if test -f /etc/unixtovms; then | |
1308 | eunicefix=/etc/unixtovms | |
1309 | fi | |
1310 | if test -f /etc/unixtovms.exe; then | |
1311 | eunicefix=/etc/unixtovms.exe | |
1312 | fi | |
1313 | ||
cfb04860 | 1314 | : Set executable suffix now -- needed before hints available |
6153ba32 PG |
1315 | if test -f "/libs/version.library"; then |
1316 | : Amiga OS | |
1317 | _exe="" | |
1318 | elif test -f "/system/gnu_library/bin/ar.pm"; then | |
1319 | : Stratus VOS | |
cfb04860 | 1320 | _exe=".pm" |
6153ba32 PG |
1321 | elif test -n "$DJGPP"; then |
1322 | : DOS DJGPP | |
cfb04860 | 1323 | _exe=".exe" |
531d75b0 MB |
1324 | elif test -f /kern/cookiejar; then |
1325 | : MiNT | |
1326 | _exe="" | |
5c728af0 | 1327 | elif test -d c:/. -o -n "$is_os2" ; then |
506faf56 | 1328 | : OS/2 or cygwin |
ba863942 JH |
1329 | _exe=".exe" |
1330 | fi | |
868439a2 | 1331 | |
1d8eaf8c | 1332 | groupstype='' |
b4eb6b3d | 1333 | i_whoami='' |
06501368 MB |
1334 | : Trailing extension. Override this in a hint file, if needed. |
1335 | : Extra object files, if any, needed on this platform. | |
1336 | archobjs='' | |
b8677e3b MB |
1337 | archname='' |
1338 | : Possible local include directories to search. | |
1339 | : Set locincpth to "" in a hint file to defeat local include searches. | |
1340 | locincpth="/usr/local/include /opt/local/include /usr/gnu/include" | |
1341 | locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" | |
1342 | : | |
1343 | : no include file wanted by default | |
1344 | inclwanted='' | |
1345 | ||
1346 | : Enable -DEBUGGING and -DDEBUGGING from the command line | |
1347 | EBUGGING='' | |
356123f1 | 1348 | DEBUGGING='' |
b8677e3b | 1349 | |
64615a5e | 1350 | libnames='' |
732c9516 JH |
1351 | : change the next line if compiling for Xenix/286 on Xenix/386 |
1352 | xlibpth='/usr/lib/386 /lib/386' | |
732c9516 JH |
1353 | : Possible local library directories to search. |
1354 | loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" | |
1355 | loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" | |
1356 | ||
1357 | : general looking path for locating libraries | |
5869b1f1 | 1358 | glibpth="/lib /usr/lib $xlibpth" |
732c9516 | 1359 | glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" |
f7dd4e7f JH |
1360 | test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" |
1361 | test -f /shlib/libc.so && glibpth="/shlib $glibpth" | |
faae14e6 | 1362 | test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64" |
732c9516 JH |
1363 | |
1364 | : Private path used by Configure to find libraries. Its value | |
1365 | : is prepended to libpth. This variable takes care of special | |
1366 | : machines, like the mips. Usually, it should be empty. | |
1367 | plibpth='' | |
1368 | ||
1cfa4ec7 GS |
1369 | : default library list |
1370 | libswanted='' | |
921b2963 | 1371 | : some systems want to use only the non-versioned libso:s |
1cfa4ec7 | 1372 | ignore_versioned_solibs='' |
06501368 MB |
1373 | : set usethreads on the Configure command line to enable threads. |
1374 | usereentrant='undef' | |
ed140128 AD |
1375 | ccname='' |
1376 | ccversion='' | |
1377 | perllibs='' | |
1378 | : set useposix=false in your hint file to disable the POSIX extension. | |
1379 | useposix=true | |
1380 | : set useopcode=false in your hint file to disable the Opcode extension. | |
1381 | useopcode=true | |
b4eb6b3d JH |
1382 | archname64='' |
1383 | ccflags_uselargefiles='' | |
1384 | ldflags_uselargefiles='' | |
1385 | libswanted_uselargefiles='' | |
1386 | : set usemultiplicity on the Configure command line to enable multiplicity. | |
29209bc5 | 1387 | : set usesocks on the Configure command line to enable socks. |
ecfc5424 | 1388 | : List of libraries we want. |
15431986 | 1389 | : If anyone needs extra -lxxx, put those in a hint file. |
0b39d4dc | 1390 | libswanted="socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun" |
8119684f | 1391 | libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" |
1aef975c | 1392 | : We probably want to search /usr/shlib before most other libraries. |
94b6baf5 | 1393 | : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. |
ecfc5424 AD |
1394 | glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` |
1395 | glibpth="/usr/shlib $glibpth" | |
1396 | : Do not use vfork unless overridden by a hint file. | |
1397 | usevfork=false | |
1398 | ||
8ff267be PP |
1399 | : Find the basic shell for Bourne shell scripts |
1400 | case "$sh" in | |
1401 | '') | |
8ff267be PP |
1402 | case "$SYSTYPE" in |
1403 | *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";; | |
1404 | *) xxx='/bin/sh';; | |
1405 | esac | |
1406 | if test -f "$xxx"; then | |
1407 | sh="$xxx" | |
1408 | else | |
1409 | : Build up a list and do a single loop so we can 'break' out. | |
1410 | pth=`echo $PATH | sed -e "s/$p_/ /g"` | |
1411 | for xxx in sh bash ksh pdksh ash; do | |
1412 | for p in $pth; do | |
1413 | try="$try ${p}/${xxx}" | |
1414 | done | |
1415 | done | |
1416 | for xxx in $try; do | |
1417 | if test -f "$xxx"; then | |
1418 | sh="$xxx"; | |
8ff267be | 1419 | break |
a5a94ea5 JH |
1420 | elif test "X$_exe" != X -a -f "$xxx$_exe"; then |
1421 | sh="$xxx"; | |
1422 | break | |
8ff267be PP |
1423 | elif test -f "$xxx.exe"; then |
1424 | sh="$xxx"; | |
8ff267be PP |
1425 | break |
1426 | fi | |
1427 | done | |
1428 | fi | |
1429 | ;; | |
1430 | esac | |
1431 | ||
1432 | case "$sh" in | |
a33c94aa | 1433 | '') cat >&2 <<EOM |
1332606d | 1434 | $me: Fatal Error: I can't find a Bourne Shell anywhere. |
dfe9444c | 1435 | |
8ff267be | 1436 | Usually it's in /bin/sh. How did you even get this far? |
1332606d | 1437 | Please contact me (Perl Maintainers) at perlbug@perl.org and |
dfe9444c | 1438 | we'll try to straighten this all out. |
8ff267be PP |
1439 | EOM |
1440 | exit 1 | |
1441 | ;; | |
1442 | esac | |
1443 | ||
871414da JR |
1444 | : When cross-compiling we need to separate the sh-to-run-Configure-with from the sh-to-use-in-Perl |
1445 | : default both to the same thing, cross-compilers can then set targetsh differently if they like | |
1446 | targetsh=$sh | |
1447 | ||
760ac839 | 1448 | : see if sh knows # comments |
73614538 | 1449 | if `$sh -c '#' >/dev/null 2>&1`; then |
760ac839 LW |
1450 | shsharp=true |
1451 | spitshell=cat | |
760ac839 | 1452 | xcat=/bin/cat |
a931254c JH |
1453 | test -f $xcat$_exe || xcat=/usr/bin/cat |
1454 | if test ! -f $xcat$_exe; then | |
4bdb8fb5 | 1455 | for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do |
a931254c | 1456 | if test -f $p/cat$_exe; then |
1deb0a86 | 1457 | xcat=$p/cat |
3c728e00 JH |
1458 | break |
1459 | fi | |
1460 | done | |
1deb0a86 JH |
1461 | if test ! -f $xcat$_exe; then |
1462 | echo "Can't find cat anywhere!" | |
3c728e00 JH |
1463 | exit 1 |
1464 | fi | |
1465 | fi | |
5440bc8e JH |
1466 | echo "#!$xcat" >sharp |
1467 | $eunicefix sharp | |
1468 | chmod +x sharp | |
1d8eaf8c | 1469 | ./sharp > today 2>/dev/null |
760ac839 | 1470 | if test -s today; then |
760ac839 LW |
1471 | sharpbang='#!' |
1472 | else | |
5440bc8e JH |
1473 | echo "#! $xcat" > sharp |
1474 | $eunicefix sharp | |
1475 | chmod +x sharp | |
1d8eaf8c | 1476 | ./sharp > today 2>/dev/null |
760ac839 | 1477 | if test -s today; then |
760ac839 LW |
1478 | sharpbang='#! ' |
1479 | else | |
760ac839 LW |
1480 | sharpbang=': use ' |
1481 | fi | |
1482 | fi | |
1483 | else | |
dfe9444c | 1484 | echo " " |
8ff267be | 1485 | echo "Your $sh doesn't grok # comments--I will strip them later on." |
760ac839 LW |
1486 | shsharp=false |
1487 | cd .. | |
1488 | echo "exec grep -v '^[ ]*#'" >spitshell | |
1489 | chmod +x spitshell | |
1490 | $eunicefix spitshell | |
1491 | spitshell=`pwd`/spitshell | |
1492 | cd UU | |
1493 | echo "I presume that if # doesn't work, #! won't work either!" | |
1494 | sharpbang=': use ' | |
1495 | fi | |
5440bc8e | 1496 | rm -f sharp today |
760ac839 LW |
1497 | |
1498 | : figure out how to guarantee sh startup | |
8ff267be PP |
1499 | case "$startsh" in |
1500 | '') startsh=${sharpbang}${sh} ;; | |
1501 | *) | |
760ac839 | 1502 | esac |
5440bc8e | 1503 | cat >sharp <<EOSS |
760ac839 LW |
1504 | $startsh |
1505 | set abc | |
1506 | test "$?abc" != 1 | |
1507 | EOSS | |
1508 | ||
5440bc8e JH |
1509 | chmod +x sharp |
1510 | $eunicefix sharp | |
1511 | if ./sharp; then | |
8ff267be | 1512 | : echo "Yup, it does." |
760ac839 | 1513 | else |
dfe9444c AD |
1514 | echo "Hmm... '$startsh' does not guarantee sh startup..." |
1515 | echo "You may have to fix up the shell scripts to make sure $sh runs them." | |
760ac839 | 1516 | fi |
5440bc8e | 1517 | rm -f sharp |
760ac839 | 1518 | |
aebf16e7 AD |
1519 | : Save command line options in file UU/cmdline.opt for later use in |
1520 | : generating config.sh. | |
1521 | cat > cmdline.opt <<EOSH | |
613d6c3e | 1522 | : Configure command line arguments. |
aebf16e7 AD |
1523 | config_arg0='$0' |
1524 | config_args='$*' | |
1525 | config_argc=$# | |
1526 | EOSH | |
1527 | argn=1 | |
ee45ea83 IZ |
1528 | args_exp='' |
1529 | args_sep='' | |
aebf16e7 AD |
1530 | for arg in "$@"; do |
1531 | cat >>cmdline.opt <<EOSH | |
1532 | config_arg$argn='$arg' | |
1533 | EOSH | |
ee45ea83 IZ |
1534 | cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt |
1535 | $arg | |
1536 | EOC | |
1537 | arg_exp=`cat cmdl.opt` | |
1538 | args_exp="$args_exp$args_sep'$arg_exp'" | |
aebf16e7 | 1539 | argn=`expr $argn + 1` |
ee45ea83 | 1540 | args_sep=' ' |
aebf16e7 | 1541 | done |
ee45ea83 | 1542 | rm -f cmdl.opt |
aebf16e7 | 1543 | |
2304df62 AD |
1544 | : produce awk script to parse command line options |
1545 | cat >options.awk <<'EOF' | |
1546 | BEGIN { | |
02e93a22 | 1547 | optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification |
2304df62 AD |
1548 | |
1549 | len = length(optstr); | |
1550 | for (i = 1; i <= len; i++) { | |
1551 | c = substr(optstr, i, 1); | |
1552 | if (i < len) a = substr(optstr, i + 1, 1); else a = ""; | |
1553 | if (a == ":") { | |
1554 | arg[c] = 1; | |
1555 | i++; | |
1556 | } | |
1557 | opt[c] = 1; | |
1558 | } | |
1559 | } | |
1560 | { | |
1561 | expect = 0; | |
1562 | str = $0; | |
1563 | if (substr(str, 1, 1) != "-") { | |
1564 | printf("'%s'\n", str); | |
1565 | next; | |
1566 | } | |
1567 | len = length($0); | |
1568 | for (i = 2; i <= len; i++) { | |
1569 | c = substr(str, i, 1); | |
1570 | if (!opt[c]) { | |
1571 | printf("-%s\n", substr(str, i)); | |
1572 | next; | |
1573 | } | |
1574 | printf("-%s\n", c); | |
1575 | if (arg[c]) { | |
1576 | if (i < len) | |
1577 | printf("'%s'\n", substr(str, i + 1)); | |
1578 | else | |
1579 | expect = 1; | |
1580 | next; | |
1581 | } | |
1582 | } | |
1583 | } | |
1584 | END { | |
1585 | if (expect) | |
1586 | print "?"; | |
1587 | } | |
1588 | EOF | |
1589 | ||
1590 | : process the command line options | |
4633a7c4 LW |
1591 | set X `for arg in "$@"; do echo "X$arg"; done | |
1592 | sed -e s/X// | awk -f options.awk` | |
2304df62 AD |
1593 | eval "set $*" |
1594 | shift | |
1595 | rm -f options.awk | |
1596 | ||
1597 | : set up default values | |
1598 | fastread='' | |
1599 | reuseval=false | |
1600 | config_sh='' | |
1601 | alldone='' | |
1602 | error='' | |
1603 | silent='' | |
1604 | extractsh='' | |
ecfc5424 | 1605 | override='' |
16d20bd9 | 1606 | knowitall='' |
02e93a22 | 1607 | rm -f optdef.sh posthint.sh |
28757baa PP |
1608 | cat >optdef.sh <<EOS |
1609 | $startsh | |
1610 | EOS | |
2304df62 | 1611 | |
dfe9444c | 1612 | |
2304df62 AD |
1613 | : option parsing |
1614 | while test $# -gt 0; do | |
1615 | case "$1" in | |
1616 | -d) shift; fastread=yes;; | |
1617 | -e) shift; alldone=cont;; | |
1618 | -f) | |
1619 | shift | |
1620 | cd .. | |
1621 | if test -r "$1"; then | |
1622 | config_sh="$1" | |
1623 | else | |
a0d0e21e | 1624 | echo "$me: cannot read config file $1." >&2 |
2304df62 AD |
1625 | error=true |
1626 | fi | |
1627 | cd UU | |
1628 | shift;; | |
3f30fabf | 1629 | --help|\ |
2304df62 AD |
1630 | -h) shift; error=true;; |
1631 | -r) shift; reuseval=true;; | |
dfe9444c | 1632 | -s) shift; silent=true; realsilent=true;; |
2304df62 | 1633 | -E) shift; alldone=exit;; |
16d20bd9 | 1634 | -K) shift; knowitall=true;; |
ecfc5424 | 1635 | -O) shift; override=true;; |
dfe9444c | 1636 | -S) shift; silent=true; extractsh=true;; |
a0d0e21e LW |
1637 | -D) |
1638 | shift | |
1639 | case "$1" in | |
1640 | *=) | |
1641 | echo "$me: use '-U symbol=', not '-D symbol='." >&2 | |
1642 | echo "$me: ignoring -D $1" >&2 | |
1643 | ;; | |
ecfc5424 | 1644 | *=*) echo "$1" | \ |
1aef975c AD |
1645 | sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; |
1646 | *) echo "$1='define'" >> optdef.sh;; | |
a0d0e21e LW |
1647 | esac |
1648 | shift | |
1649 | ;; | |
1650 | -U) | |
1651 | shift | |
1652 | case "$1" in | |
1aef975c | 1653 | *=) echo "$1" >> optdef.sh;; |
a0d0e21e LW |
1654 | *=*) |
1655 | echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2 | |
1656 | echo "$me: ignoring -U $1" >&2 | |
1657 | ;; | |
1aef975c | 1658 | *) echo "$1='undef'" >> optdef.sh;; |
a0d0e21e LW |
1659 | esac |
1660 | shift | |
1661 | ;; | |
02e93a22 JH |
1662 | -A) |
1663 | shift | |
1664 | xxx='' | |
1665 | yyy="$1" | |
02e93a22 | 1666 | zzz='' |
5f83a3e9 | 1667 | uuu=undef |
02e93a22 | 1668 | case "$yyy" in |
f7c31117 | 1669 | *=*) zzz=`echo "$yyy"|sed 's!=.*!!'` |
5f83a3e9 JH |
1670 | case "$zzz" in |
1671 | *:*) zzz='' ;; | |
1672 | *) xxx=append | |
613d6c3e | 1673 | zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'` |
f7c31117 | 1674 | yyy=`echo "$yyy"|sed 's!=.*!!'` ;; |
5f83a3e9 JH |
1675 | esac |
1676 | ;; | |
1677 | esac | |
1678 | case "$xxx" in | |
1679 | '') case "$yyy" in | |
f7c31117 JH |
1680 | *:*) xxx=`echo "$yyy"|sed 's!:.*!!'` |
1681 | yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` | |
1682 | zzz=`echo "$yyy"|sed 's!^[^=]*=!!'` | |
1683 | yyy=`echo "$yyy"|sed 's!=.*!!'` ;; | |
1684 | *) xxx=`echo "$yyy"|sed 's!:.*!!'` | |
1685 | yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;; | |
5f83a3e9 | 1686 | esac |
613d6c3e | 1687 | ;; |
5f83a3e9 | 1688 | esac |
02e93a22 JH |
1689 | case "$xxx" in |
1690 | append) | |
5f83a3e9 | 1691 | echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;; |
02e93a22 | 1692 | clear) |
5f83a3e9 | 1693 | echo "$yyy=''" >> posthint.sh ;; |
02e93a22 JH |
1694 | define) |
1695 | case "$zzz" in | |
1696 | '') zzz=define ;; | |
1697 | esac | |
5f83a3e9 | 1698 | echo "$yyy='$zzz'" >> posthint.sh ;; |
02e93a22 | 1699 | eval) |
5f83a3e9 | 1700 | echo "eval \"$yyy=$zzz\"" >> posthint.sh ;; |
02e93a22 | 1701 | prepend) |
5f83a3e9 | 1702 | echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;; |
02e93a22 JH |
1703 | undef) |
1704 | case "$zzz" in | |
1705 | '') zzz="$uuu" ;; | |
1706 | esac | |
5f83a3e9 JH |
1707 | echo "$yyy=$zzz" >> posthint.sh ;; |
1708 | *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;; | |
02e93a22 | 1709 | esac |
bde6b06b | 1710 | shift |
02e93a22 | 1711 | ;; |
216dac04 | 1712 | -V) echo "$me generated by metaconfig 3.5 PL0." >&2 |
5f83a3e9 | 1713 | exit 0;; |
2304df62 | 1714 | --) break;; |
a0d0e21e | 1715 | -*) echo "$me: unknown option $1" >&2; shift; error=true;; |
2304df62 AD |
1716 | *) break;; |
1717 | esac | |
1718 | done | |
1719 | ||
1720 | case "$error" in | |
1721 | true) | |
1722 | cat >&2 <<EOM | |
2afac517 | 1723 | Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value] |
02e93a22 | 1724 | [-U symbol] [-U symbol=] [-A command:symbol...] |
2304df62 AD |
1725 | -d : use defaults for all answers. |
1726 | -e : go on without questioning past the production of config.sh. | |
1727 | -f : specify an alternate default configuration file. | |
1728 | -h : print this help message and exit (with an error status). | |
1729 | -r : reuse C symbols value if possible (skips costly nm extraction). | |
1730 | -s : silent mode, only echoes questions and essential information. | |
a0d0e21e LW |
1731 | -D : define symbol to have some value: |
1732 | -D symbol symbol gets the value 'define' | |
1733 | -D symbol=value symbol gets the value 'value' | |
3f30fabf MB |
1734 | common used examples (see INSTALL for more info): |
1735 | -Duse64bitint use 64bit integers | |
b79e0b55 | 1736 | -Duse64bitall use 64bit integers and pointers |
3f30fabf | 1737 | -Dusethreads use thread support |
b79e0b55 | 1738 | -Dinc_version_list=none do not include older perl trees in @INC |
3f30fabf MB |
1739 | -DEBUGGING=none DEBUGGING options |
1740 | -Dcc=gcc choose your compiler | |
1741 | -Dprefix=/opt/perl5 choose your destination | |
2304df62 | 1742 | -E : stop at the end of questions, after having produced config.sh. |
16d20bd9 | 1743 | -K : do not use unless you know what you are doing. |
ecfc5424 | 1744 | -O : let -D and -U override definitions from loaded configuration file. |
2304df62 | 1745 | -S : perform variable substitutions on all .SH files (can mix with -f) |
a0d0e21e LW |
1746 | -U : undefine symbol: |
1747 | -U symbol symbol gets the value 'undef' | |
1748 | -U symbol= symbol gets completely empty | |
3f30fabf | 1749 | e.g.: -Uversiononly |
02e93a22 | 1750 | -A : manipulate symbol after the platform specific hints have been applied: |
2ac814f3 MB |
1751 | -A append:symbol=value append value to symbol |
1752 | -A symbol=value like append:, but with a separating space | |
1753 | -A define:symbol=value define symbol to have value | |
1754 | -A clear:symbol define symbol to be '' | |
1755 | -A define:symbol define symbol to be 'define' | |
1756 | -A eval:symbol=value define symbol to be eval of value | |
1757 | -A prepend:symbol=value prepend value to symbol | |
1758 | -A undef:symbol define symbol to be 'undef' | |
1759 | -A undef:symbol= define symbol to be '' | |
3f30fabf | 1760 | e.g.: -A prepend:libswanted='cl pthread ' |
2ac814f3 | 1761 | -A ccflags=-DSOME_MACRO |
2304df62 AD |
1762 | -V : print version number and exit (with a zero status). |
1763 | EOM | |
1764 | exit 1 | |
1765 | ;; | |
1766 | esac | |
1767 | ||
dfe9444c AD |
1768 | : Sanity checks |
1769 | case "$fastread$alldone" in | |
1770 | yescont|yesexit) ;; | |
1771 | *) | |
aaeb8e51 GS |
1772 | case "$extractsh" in |
1773 | true) ;; | |
1774 | *) | |
1775 | if test ! -t 0; then | |
1776 | echo "Say 'sh Configure', not 'sh <Configure'" | |
1777 | exit 1 | |
1778 | fi | |
1779 | ;; | |
1780 | esac | |
dfe9444c AD |
1781 | ;; |
1782 | esac | |
1783 | ||
2304df62 AD |
1784 | exec 4>&1 |
1785 | case "$silent" in | |
1786 | true) exec 1>/dev/null;; | |
1787 | esac | |
1788 | ||
ecfc5424 | 1789 | : run the defines and the undefines, if any, but leave the file out there... |
1aef975c AD |
1790 | touch optdef.sh |
1791 | . ./optdef.sh | |
02e93a22 JH |
1792 | : create the posthint manipulation script and leave the file out there... |
1793 | touch posthint.sh | |
a0d0e21e | 1794 | |
2304df62 | 1795 | : set package name |
34f1896b | 1796 | package='perl5' |
b4eb6b3d JH |
1797 | first=`echo $package | sed -e 's/^\(.\).*/\1/'` |
1798 | last=`echo $package | sed -e 's/^.\(.*\)/\1/'` | |
1799 | case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in | |
1800 | ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;; | |
1801 | *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;; | |
1802 | esac | |
2304df62 | 1803 | |
2304df62 AD |
1804 | : Some greps do not return status, grrr. |
1805 | echo "grimblepritz" >grimble | |
1806 | if grep blurfldyick grimble >/dev/null 2>&1 ; then | |
1807 | contains=contains | |
1808 | elif grep grimblepritz grimble >/dev/null 2>&1 ; then | |
1809 | contains=grep | |
1810 | else | |
1811 | contains=contains | |
1812 | fi | |
1813 | rm -f grimble | |
1814 | : the following should work in any shell | |
1815 | case "$contains" in | |
1816 | contains*) | |
1817 | echo " " | |
1818 | echo "AGH! Grep doesn't return a status. Attempting remedial action." | |
1819 | cat >contains <<'EOSS' | |
1820 | grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp | |
1821 | EOSS | |
1822 | chmod +x contains | |
1823 | esac | |
1824 | ||
dfe9444c AD |
1825 | : Find the path to the source tree |
1826 | case "$src" in | |
1827 | '') case "$0" in | |
b233458b JH |
1828 | */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` |
1829 | case "$src" in | |
1830 | /*) ;; | |
8504afb7 | 1831 | .) ;; |
b233458b JH |
1832 | *) src=`cd ../$src && pwd` ;; |
1833 | esac | |
1834 | ;; | |
dfe9444c AD |
1835 | *) src='.';; |
1836 | esac;; | |
1837 | esac | |
1838 | case "$src" in | |
1839 | '') src=/ | |
1840 | rsrc=/ | |
1841 | ;; | |
34f1896b MB |
1842 | /*) rsrc="$src";; |
1843 | *) rsrc="../$src";; | |
dfe9444c AD |
1844 | esac |
1845 | if test -f $rsrc/Configure && \ | |
34f1896b | 1846 | $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1 |
dfe9444c AD |
1847 | then |
1848 | : found it, so we are ok. | |
1849 | else | |
1850 | rsrc='' | |
1851 | for src in . .. ../.. ../../.. ../../../..; do | |
1852 | if test -f ../$src/Configure && \ | |
1853 | $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1 | |
1854 | then | |
1855 | rsrc=../$src | |
1856 | break | |
1857 | fi | |
1858 | done | |
1859 | fi | |
1860 | case "$rsrc" in | |
1861 | '') | |
1862 | cat <<EOM >&4 | |
1863 | ||
1864 | Sorry, I can't seem to locate the source dir for $package. Please start | |
1865 | Configure with an explicit path -- i.e. /some/path/Configure. | |
1866 | ||
1867 | EOM | |
1868 | exit 1 | |
1869 | ;; | |
1870 | ../.) rsrc='..';; | |
1871 | *) | |
1872 | echo " " | |
1873 | echo "Sources for $package found in \"$src\"." >&4 | |
1874 | ;; | |
1875 | esac | |
1876 | ||
1877 | : script used to extract .SH files with variable substitutions | |
1878 | cat >extract <<'EOS' | |
a02608de | 1879 | PERL_CONFIG_SH=true |
dfe9444c | 1880 | echo "Doing variable substitutions on .SH files..." |
24ccb310 JH |
1881 | if test -f MANIFEST; then |
1882 | set x `awk '{print $1}' < MANIFEST | grep '\.SH$'` | |
dfe9444c AD |
1883 | else |
1884 | echo "(Looking for .SH files under the source directory.)" | |
6904989c | 1885 | set x `(cd "$src"; find . -name "*.SH" -print)` |
dfe9444c AD |
1886 | fi |
1887 | shift | |
1888 | case $# in | |
6904989c | 1889 | 0) set x `(cd "$src"; echo *.SH)`; shift;; |
dfe9444c | 1890 | esac |
6904989c | 1891 | if test ! -f "$src/$1"; then |
dfe9444c AD |
1892 | shift |
1893 | fi | |
1894 | mkdir_p=' | |
1895 | name=$1; | |
1896 | create=""; | |
1897 | while test $name; do | |
1898 | if test ! -d "$name"; then | |
1899 | create="$name $create"; | |
1900 | name=`echo $name | sed -e "s|^[^/]*$||"`; | |
1901 | name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`; | |
1902 | else | |
1903 | name=""; | |
1904 | fi; | |
1905 | done; | |
1906 | for file in $create; do | |
1907 | mkdir $file; | |
1908 | done | |
1909 | ' | |
1910 | for file in $*; do | |
1911 | case "$src" in | |
1912 | ".") | |
1913 | case "$file" in | |
1914 | */*) | |
1915 | dir=`expr X$file : 'X\(.*\)/'` | |
1916 | file=`expr X$file : 'X.*/\(.*\)'` | |
6904989c | 1917 | (cd "$dir" && . ./$file) |
dfe9444c AD |
1918 | ;; |
1919 | *) | |
1920 | . ./$file | |
1921 | ;; | |
1922 | esac | |
1923 | ;; | |
1924 | *) | |
1925 | case "$file" in | |
1926 | */*) | |
1927 | dir=`expr X$file : 'X\(.*\)/'` | |
1928 | file=`expr X$file : 'X.*/\(.*\)'` | |
1929 | (set x $dir; shift; eval $mkdir_p) | |
6904989c | 1930 | sh <"$src/$dir/$file" |
dfe9444c AD |
1931 | ;; |
1932 | *) | |
6904989c | 1933 | sh <"$src/$file" |
dfe9444c AD |
1934 | ;; |
1935 | esac | |
1936 | ;; | |
1937 | esac | |
1938 | done | |
6904989c | 1939 | if test -f "$src/config_h.SH"; then |
dfe9444c AD |
1940 | if test ! -f config.h; then |
1941 | : oops, they left it out of MANIFEST, probably, so do it anyway. | |
6904989c | 1942 | . "$src/config_h.SH" |
dfe9444c AD |
1943 | fi |
1944 | fi | |
1945 | EOS | |
1946 | ||
1947 | : extract files and exit if asked to do so | |
1948 | case "$extractsh" in | |
1949 | true) | |
1950 | case "$realsilent" in | |
1951 | true) ;; | |
1952 | *) exec 1>&4;; | |
1953 | esac | |
1954 | case "$config_sh" in | |
1955 | '') config_sh='config.sh';; | |
1956 | esac | |
1957 | echo " " | |
1958 | echo "Fetching answers from $config_sh..." | |
1959 | cd .. | |
1960 | . $config_sh | |
1961 | test "$override" && . ./optdef.sh | |
1962 | echo " " | |
1963 | . UU/extract | |
1964 | rm -rf UU | |
24ccb310 | 1965 | echo "Extraction done." |
dfe9444c AD |
1966 | exit 0 |
1967 | ;; | |
1968 | esac | |
1969 | ||
1970 | : Eunice requires " " instead of "", can you believe it | |
1971 | echo " " | |
1972 | : Here we go... | |
1973 | echo "Beginning of configuration questions for $package." | |
1974 | ||
1975 | trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15 | |
1976 | ||
2304df62 AD |
1977 | : first determine how to suppress newline on echo command |
1978 | echo " " | |
1979 | echo "Checking echo to see how to suppress newlines..." | |
1980 | (echo "hi there\c" ; echo " ") >.echotmp | |
1981 | if $contains c .echotmp >/dev/null 2>&1 ; then | |
1982 | echo "...using -n." | |
1983 | n='-n' | |
1984 | c='' | |
1985 | else | |
1986 | cat <<'EOM' | |
1987 | ...using \c | |
1988 | EOM | |
1989 | n='' | |
1990 | c='\c' | |
1991 | fi | |
1992 | echo $n "The star should be here-->$c" | |
1993 | echo '*' | |
1994 | rm -f .echotmp | |
1995 | ||
1996 | : Now test for existence of everything in MANIFEST | |
1997 | echo " " | |
6904989c | 1998 | if test -f "$rsrc/MANIFEST"; then |
2304df62 | 1999 | echo "First let's make sure your kit is complete. Checking..." >&4 |
1d8eaf8c | 2000 | awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \ |
776a38e3 | 2001 | (split -l 50 2>/dev/null || split -50) |
2304df62 | 2002 | rm -f missing |
dfe9444c | 2003 | tmppwd=`pwd` |
2304df62 | 2004 | for filelist in x??; do |
776a38e3 MB |
2005 | (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \ |
2006 | >/dev/null 2>>"$tmppwd/missing") | |
2304df62 AD |
2007 | done |
2008 | if test -s missing; then | |
2009 | cat missing >&4 | |
2010 | cat >&4 <<'EOM' | |
2011 | ||
2012 | THIS PACKAGE SEEMS TO BE INCOMPLETE. | |
2013 | ||
2014 | You have the option of continuing the configuration process, despite the | |
2015 | distinct possibility that your kit is damaged, by typing 'y'es. If you | |
2016 | do, don't blame me if something goes wrong. I advise you to type 'n'o | |
7f2de2d2 | 2017 | and contact the author (perlbug@perl.org). |
2304df62 AD |
2018 | |
2019 | EOM | |
2020 | echo $n "Continue? [n] $c" >&4 | |
2021 | read ans | |
2022 | case "$ans" in | |
2023 | y*) | |
2024 | echo "Continuing..." >&4 | |
2025 | rm -f missing | |
2026 | ;; | |
2027 | *) | |
2028 | echo "ABORTING..." >&4 | |
2029 | kill $$ | |
2030 | ;; | |
2031 | esac | |
2032 | else | |
dfe9444c | 2033 | echo "Looks good..." |
2304df62 AD |
2034 | fi |
2035 | else | |
2036 | echo "There is no MANIFEST file. I hope your kit is complete !" | |
2037 | fi | |
2038 | rm -f missing x?? | |
2039 | ||
5ff3f7a4 | 2040 | : Find the appropriate value for a newline for tr |
613d6c3e | 2041 | echo " " |
5ff3f7a4 GS |
2042 | if test -n "$DJGPP"; then |
2043 | trnl='\012' | |
2044 | fi | |
2045 | if test X"$trnl" = X; then | |
2046 | case "`echo foo|tr '\n' x 2>/dev/null`" in | |
2047 | foox) trnl='\n' ;; | |
2048 | esac | |
2049 | fi | |
2050 | if test X"$trnl" = X; then | |
2051 | case "`echo foo|tr '\012' x 2>/dev/null`" in | |
2052 | foox) trnl='\012' ;; | |
2053 | esac | |
2054 | fi | |
2055 | if test X"$trnl" = X; then | |
8be2c24c JH |
2056 | case "`echo foo|tr '\r\n' xy 2>/dev/null`" in |
2057 | fooxy) trnl='\n\r' ;; | |
2058 | esac | |
2059 | fi | |
2060 | if test X"$trnl" = X; then | |
5ff3f7a4 GS |
2061 | cat <<EOM >&2 |
2062 | ||
2063 | $me: Fatal Error: cannot figure out how to translate newlines with 'tr'. | |
2064 | ||
2065 | EOM | |
2066 | exit 1 | |
2067 | fi | |
2068 | ||
2304df62 AD |
2069 | : compute the number of columns on the terminal for proper question formatting |
2070 | case "$COLUMNS" in | |
2071 | '') COLUMNS='80';; | |
2072 | esac | |
2073 | ||
2074 | : set up the echo used in my read | |
2075 | myecho="case \"\$xxxm\" in | |
2076 | '') echo $n \"\$rp $c\" >&4;; | |
2077 | *) case \"\$rp\" in | |
2078 | '') echo $n \"[\$xxxm] $c\";; | |
2079 | *) | |
2080 | if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then | |
2081 | echo \"\$rp\" >&4 | |
2082 | echo $n \"[\$xxxm] $c\" >&4 | |
2083 | else | |
2084 | echo $n \"\$rp [\$xxxm] $c\" >&4 | |
2085 | fi | |
2086 | ;; | |
2087 | esac;; | |
2088 | esac" | |
2089 | ||
2090 | : now set up to do reads with possible shell escape and default assignment | |
2091 | cat <<EOSC >myread | |
28757baa | 2092 | $startsh |
2304df62 AD |
2093 | xxxm=\$dflt |
2094 | $myecho | |
2095 | ans='!' | |
2096 | case "\$fastread" in | |
2097 | yes) case "\$dflt" in | |
2098 | '') ;; | |
2099 | *) ans=''; | |
2100 | case "\$silent-\$rp" in | |
2101 | true-) ;; | |
2102 | *) echo " " >&4;; | |
2103 | esac;; | |
2104 | esac;; | |
2105 | *) case "\$silent" in | |
2106 | true) case "\$rp" in | |
2107 | '') ans='';; | |
2108 | esac;; | |
2109 | esac;; | |
2110 | esac | |
2111 | while expr "X\$ans" : "X!" >/dev/null; do | |
2112 | read answ | |
2113 | set x \$xxxm | |
2114 | shift | |
dfe9444c | 2115 | aok=''; eval "ans=\\"\$answ\\"" && aok=y |
2304df62 | 2116 | case "\$answ" in |
dfe9444c AD |
2117 | "!") |
2118 | sh 1>&4 | |
2119 | echo " " | |
2120 | $myecho | |
2121 | ;; | |
2122 | !*) | |
2123 | set x \`expr "X\$ans" : "X!\(.*\)\$"\` | |
2124 | shift | |
2125 | sh 1>&4 -c "\$*" | |
2126 | echo " " | |
2127 | $myecho | |
2128 | ;; | |
2304df62 AD |
2129 | "\$ans") |
2130 | case "\$ans" in | |
ecfc5424 AD |
2131 | \\&*) |
2132 | set x \`expr "X\$ans" : "X&\(.*\)\$"\` | |
2133 | shift | |
2134 | case "\$1" in | |
2135 | -d) | |
2136 | fastread=yes | |
40a7a20a | 2137 | echo "(OK, I'll run with -d after this question.)" >&4 |
ecfc5424 AD |
2138 | ;; |
2139 | -*) | |
40a7a20a | 2140 | echo "*** Sorry, \$1 not supported yet." >&4 |
ecfc5424 AD |
2141 | ;; |
2142 | esac | |
2143 | $myecho | |
2144 | ans=! | |
2145 | ;; | |
2304df62 AD |
2146 | esac;; |
2147 | *) | |
2148 | case "\$aok" in | |
2149 | y) | |
2150 | echo "*** Substitution done -- please confirm." | |
2151 | xxxm="\$ans" | |
c9795ab7 | 2152 | ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\` |
2304df62 AD |
2153 | xxxm="\$ans" |
2154 | ans=! | |
2155 | ;; | |
2156 | *) | |
2157 | echo "*** Error -- try again." | |
2158 | ans=! | |
2159 | ;; | |
2160 | esac | |
2161 | $myecho | |
2162 | ;; | |
2163 | esac | |
2164 | case "\$ans\$xxxm\$nostick" in | |
2165 | '') | |
2166 | ans=! | |
2167 | $myecho | |
2168 | ;; | |
2169 | esac | |
2170 | done | |
2171 | case "\$ans" in | |
2172 | '') ans="\$xxxm";; | |
2173 | esac | |
2174 | EOSC | |
2175 | ||
2176 | : create .config dir to save info across Configure sessions | |
2177 | test -d ../.config || mkdir ../.config | |
2178 | cat >../.config/README <<EOF | |
2179 | This directory created by Configure to save information that should | |
dfe9444c | 2180 | persist across sessions for $package. |
2304df62 AD |
2181 | |
2182 | You may safely delete it if you wish. | |
2183 | EOF | |
2184 | ||
613d6c3e | 2185 | : See if we are using a devel version and want that |
9507cadf | 2186 | xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` |
af960fef | 2187 | case "$usedevel" in |
1be1b388 MB |
2188 | $define|true|[yY]*) |
2189 | usedevel="$define" ;; | |
9507cadf | 2190 | *) case "$xversion" in |
0107c034 JH |
2191 | *[13579]) |
2192 | cat >&4 <<EOH | |
2193 | *** WHOA THERE!!! *** | |
2194 | ||
2195 | This is an UNSTABLE DEVELOPMENT release. | |
9507cadf JH |
2196 | The version of this $package distribution is $xversion, that is, odd, |
2197 | (as opposed to even) and that signifies a development release. | |
3d5d58b1 | 2198 | If you want a maintenance release, you want an even-numbered version. |
0107c034 JH |
2199 | |
2200 | Do ***NOT*** install this into production use. | |
2201 | Data corruption and crashes are possible. | |
2202 | ||
2203 | It is most seriously suggested that you do not continue any further | |
2204 | unless you want to help in developing and debugging Perl. | |
2205 | ||
6adc6a45 JH |
2206 | If you *still* want to build perl, you can answer 'y' now, |
2207 | or pass -Dusedevel to Configure. | |
2208 | ||
0107c034 JH |
2209 | EOH |
2210 | rp='Do you really want to continue?' | |
2211 | dflt='n' | |
2212 | . ./myread | |
2213 | case "$ans" in | |
8feeef0e JH |
2214 | [yY]) echo >&4 "Okay, continuing." |
2215 | usedevel="$define" ;; | |
0107c034 JH |
2216 | *) echo >&4 "Okay, bye." |
2217 | exit 1 | |
2218 | ;; | |
2219 | esac | |
2220 | ;; | |
2221 | esac | |
1be1b388 | 2222 | usedevel="$undef" |
0107c034 JH |
2223 | ;; |
2224 | esac | |
8feeef0e JH |
2225 | case "$usedevel" in |
2226 | $define|true|[yY]*) | |
2227 | case "$versiononly" in | |
2228 | '') versiononly="$define" ;; | |
2229 | esac | |
2230 | case "$installusrbinperl" in | |
2231 | '') installusrbinperl="$undef" ;; | |
2232 | esac | |
2233 | ;; | |
2234 | esac | |
0107c034 | 2235 | |
2304df62 AD |
2236 | : general instructions |
2237 | needman=true | |
2238 | firsttime=true | |
760ac839 | 2239 | user=`(logname) 2>/dev/null` |
dfe9444c AD |
2240 | case "$user" in |
2241 | '') user=`whoami 2>&1`;; | |
760ac839 | 2242 | esac |
2304df62 AD |
2243 | if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then |
2244 | firsttime=false | |
2245 | echo " " | |
2246 | rp='Would you like to see the instructions?' | |
2247 | dflt=n | |
2248 | . ./myread | |
2249 | case "$ans" in | |
2250 | [yY]*) ;; | |
2251 | *) needman=false;; | |
2252 | esac | |
2253 | fi | |
2254 | if $needman; then | |
2255 | cat <<EOH | |
4e2a5f63 | 2256 | |
2304df62 | 2257 | This installation shell script will examine your system and ask you questions |
a0d0e21e | 2258 | to determine how the perl5 package should be installed. If you get |
2304df62 AD |
2259 | stuck on a question, you may use a ! shell escape to start a subshell or |
2260 | execute a command. Many of the questions will have default answers in square | |
2261 | brackets; typing carriage return will give you the default. | |
2262 | ||
2263 | On some of the questions which ask for file or directory names you are allowed | |
2264 | to use the ~name construct to specify the login directory belonging to "name", | |
2265 | even if you don't have a shell which knows about that. Questions where this is | |
2266 | allowed will be marked "(~name ok)". | |
2267 | ||
2268 | EOH | |
2269 | rp='' | |
2270 | dflt='Type carriage return to continue' | |
2271 | . ./myread | |
2272 | cat <<'EOH' | |
2273 | ||
2274 | The prompter used in this script allows you to use shell variables and | |
2275 | backticks in your answers. You may use $1, $2, etc... to refer to the words | |
2276 | in the default answer, as if the default line was a set of arguments given to a | |
2277 | script shell. This means you may also use $* to repeat the whole default line, | |
2278 | so you do not have to re-type everything to add something to the default. | |
2279 | ||
cd95ead5 | 2280 | Every time there is a substitution, you will have to confirm. If there is an |
2304df62 AD |
2281 | error (e.g. an unmatched backtick), the default answer will remain unchanged |
2282 | and you will be prompted again. | |
2283 | ||
2284 | If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all | |
2285 | the questions and use the computed defaults (or the previous answers if there | |
2286 | was already a config.sh file). Type 'Configure -h' for a list of options. | |
ecfc5424 | 2287 | You may also start interactively and then answer '& -d' at any prompt to turn |
dfe9444c | 2288 | on the non-interactive behaviour for the remainder of the execution. |
2304df62 AD |
2289 | |
2290 | EOH | |
2291 | . ./myread | |
2292 | cat <<EOH | |
2293 | ||
2294 | Much effort has been expended to ensure that this shell script will run on any | |
2295 | Unix system. If despite that it blows up on yours, your best bet is to edit | |
40000a8c AD |
2296 | Configure and run it again. If you can't run Configure for some reason, |
2297 | you'll have to generate a config.sh file by hand. Whatever problems you | |
7f2de2d2 | 2298 | have, let me (perlbug@perl.org) know how I blew it. |
2304df62 AD |
2299 | |
2300 | This installation script affects things in two ways: | |
2301 | ||
2302 | 1) it may do direct variable substitutions on some of the files included | |
2303 | in this kit. | |
2304 | 2) it builds a config.h file for inclusion in C programs. You may edit | |
2305 | any of these files as the need arises after running this script. | |
2306 | ||
2307 | If you make a mistake on a question, there is no easy way to back up to it | |
2308 | currently. The easiest thing to do is to edit config.sh and rerun all the SH | |
2309 | files. Configure will offer to let you do this before it runs the SH files. | |
2310 | ||
2311 | EOH | |
2312 | dflt='Type carriage return to continue' | |
2313 | . ./myread | |
2314 | case "$firsttime" in | |
2315 | true) echo $user >>../.config/instruct;; | |
2316 | esac | |
2317 | fi | |
2318 | ||
56b575b9 MB |
2319 | : Set 'sysroot' to change the logical root directory to your headers and libraries see man gcc |
2320 | : This is primarily meant for cross-compile environments, and may fail to be useful in other cases | |
2321 | if test "X$sysroot" = X; then | |
2322 | sysroot="" | |
2323 | else | |
2324 | case "$cc" in | |
2325 | *gcc*|*g++*) | |
2326 | echo "Using $sysroot to find your headers and libraries, adding to ccflags" | |
2327 | # _sysroot is used in places where we need --sysroot=foo | |
2328 | # but using the rest of the flags could cause issues. | |
2329 | _sysroot="--sysroot=$sysroot"; | |
2330 | case "$ccflags" in | |
2331 | *sysroot*) ;; | |
2332 | 'undef'|*) | |
2333 | ccflags="$ccflags $_sysroot" | |
2334 | esac | |
2335 | case "$ldflags" in | |
2336 | *sysroot*) ;; | |
2337 | 'undef'|*) | |
2338 | ldflags="$ldflags $_sysroot" | |
2339 | esac | |
2340 | case "$cppflags" in | |
2341 | *sysroot*) ;; | |
2342 | 'undef'|*) | |
2343 | cppflags="$cppflags $_sysroot" | |
2344 | esac | |
2345 | # lddlflags updated below in lddlflags section; | |
2346 | # same with cccdlflags | |
2347 | ;; | |
2348 | esac | |
2349 | ||
2350 | # Adjust some defaults to also use $sysroot | |
2351 | for var in xlibpth loclibpth locincpth glibpth; do | |
2352 | eval xxx=\$$var | |
2353 | eval $var='' | |
2354 | for path in $xxx; do | |
2355 | eval $var=\"\$$var $sysroot$path\" | |
2356 | done | |
2357 | done | |
2358 | ||
2359 | fi | |
2360 | ||
2304df62 AD |
2361 | : find out where common programs are |
2362 | echo " " | |
2363 | echo "Locating common programs..." >&4 | |
2364 | cat <<EOSC >loc | |
2365 | $startsh | |
2366 | case \$# in | |
2367 | 0) exit 1;; | |
2368 | esac | |
2369 | thing=\$1 | |
2370 | shift | |
2371 | dflt=\$1 | |
2372 | shift | |
2373 | for dir in \$*; do | |
2374 | case "\$thing" in | |
2375 | .) | |
2376 | if test -d \$dir/\$thing; then | |
2377 | echo \$dir | |
2378 | exit 0 | |
2379 | fi | |
2380 | ;; | |
2381 | *) | |
a0d0e21e | 2382 | for thisthing in \$dir/\$thing; do |
ecfc5424 | 2383 | : just loop through to pick last item |
a0d0e21e | 2384 | done |
25f94b33 | 2385 | if test -f \$thisthing; then |
a0d0e21e | 2386 | echo \$thisthing |
2304df62 | 2387 | exit 0 |
a5a94ea5 JH |
2388 | elif test "X$_exe" != X -a -f \$thisthing$_exe; then |
2389 | echo \$thisthing | |
776a38e3 | 2390 | exit 0 |
2304df62 | 2391 | elif test -f \$dir/\$thing.exe; then |
c4f23d77 AD |
2392 | if test -n "$DJGPP"; then |
2393 | echo \$dir/\$thing.exe | |
b921d661 | 2394 | elif test "$eunicefix" != ":"; then |
c4f23d77 AD |
2395 | : on Eunice apparently |
2396 | echo \$dir/\$thing | |
2397 | fi | |
2d736872 | 2398 | exit 0 |
2304df62 AD |
2399 | fi |
2400 | ;; | |
2401 | esac | |
2402 | done | |
2403 | echo \$dflt | |
2404 | exit 1 | |
2405 | EOSC | |
2406 | chmod +x loc | |
2407 | $eunicefix loc | |
2408 | loclist=" | |
2409 | awk | |
2410 | cat | |
f8006fac | 2411 | chmod |
b4eb6b3d JH |
2412 | comm |
2413 | cp | |
2304df62 AD |
2414 | echo |
2415 | expr | |
2416 | grep | |
a0d0e21e | 2417 | ls |
b4eb6b3d | 2418 | mkdir |
2304df62 AD |
2419 | rm |
2420 | sed | |
b4eb6b3d | 2421 | sort |
85e6fe83 | 2422 | touch |
2304df62 | 2423 | tr |
b4eb6b3d | 2424 | uniq |
2304df62 AD |
2425 | " |
2426 | trylist=" | |
dfe9444c | 2427 | ar |
3659ebf1 | 2428 | bison |
b4eb6b3d | 2429 | byacc |
2304df62 | 2430 | cpp |
b4eb6b3d | 2431 | csh |
2304df62 AD |
2432 | date |
2433 | egrep | |
1fef16b3 | 2434 | gmake |
8ff267be | 2435 | gzip |
b4eb6b3d | 2436 | less |
8ff267be | 2437 | ln |
3c728e00 | 2438 | make |
b4eb6b3d | 2439 | more |
693762b4 | 2440 | nm |
b4eb6b3d | 2441 | nroff |
b8677e3b | 2442 | perl |
b4eb6b3d | 2443 | pg |
2304df62 AD |
2444 | test |
2445 | uname | |
8ff267be | 2446 | zip |
2304df62 | 2447 | " |
8e07c86e | 2448 | pth=`echo $PATH | sed -e "s/$p_/ /g"` |
98b12e44 | 2449 | pth="$pth $sysroot/lib $sysroot/usr/lib" |
2304df62 | 2450 | for file in $loclist; do |
dfe9444c AD |
2451 | eval xxx=\$$file |
2452 | case "$xxx" in | |
2453 | /*|?:[\\/]*) | |
2454 | if test -f "$xxx"; then | |
2455 | : ok | |
2456 | else | |
2457 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 | |
2458 | xxx=`./loc $file $file $pth` | |
2459 | fi | |
2460 | ;; | |
2461 | '') xxx=`./loc $file $file $pth`;; | |
2462 | *) xxx=`./loc $xxx $xxx $pth`;; | |
2463 | esac | |
a5a94ea5 | 2464 | eval $file=$xxx$_exe |
2304df62 AD |
2465 | eval _$file=$xxx |
2466 | case "$xxx" in | |
2467 | /*) | |
2468 | echo $file is in $xxx. | |
2469 | ;; | |
8e07c86e AD |
2470 | ?:[\\/]*) |
2471 | echo $file is in $xxx. | |
2472 | ;; | |
2304df62 | 2473 | *) |
25f94b33 AD |
2474 | echo "I don't know where '$file' is, and my life depends on it." >&4 |
2475 | echo "Go find a public domain implementation or fix your PATH setting!" >&4 | |
4633a7c4 | 2476 | exit 1 |
2304df62 AD |
2477 | ;; |
2478 | esac | |
2479 | done | |
2480 | echo " " | |
2481 | echo "Don't worry if any of the following aren't found..." | |
2482 | say=offhand | |
2483 | for file in $trylist; do | |
dfe9444c AD |
2484 | eval xxx=\$$file |
2485 | case "$xxx" in | |
2486 | /*|?:[\\/]*) | |
2487 | if test -f "$xxx"; then | |
2488 | : ok | |
2489 | else | |
2490 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 | |
2491 | xxx=`./loc $file $file $pth` | |
2492 | fi | |
2493 | ;; | |
2494 | '') xxx=`./loc $file $file $pth`;; | |
2495 | *) xxx=`./loc $xxx $xxx $pth`;; | |
2496 | esac | |
306a8474 | 2497 | eval $file=$xxx$_exe |
2304df62 AD |
2498 | eval _$file=$xxx |
2499 | case "$xxx" in | |
2500 | /*) | |
2501 | echo $file is in $xxx. | |
2502 | ;; | |
8e07c86e AD |
2503 | ?:[\\/]*) |
2504 | echo $file is in $xxx. | |
2505 | ;; | |
2304df62 AD |
2506 | *) |
2507 | echo "I don't see $file out there, $say." | |
2508 | say=either | |
2509 | ;; | |
2510 | esac | |
2511 | done | |
2512 | case "$egrep" in | |
1fef16b3 | 2513 | egrep) |
2304df62 AD |
2514 | echo "Substituting grep for egrep." |
2515 | egrep=$grep | |
868439a2 | 2516 | _egrep=$grep |
2304df62 AD |
2517 | ;; |
2518 | esac | |
3141af47 MB |
2519 | case "$less" in |
2520 | '') ;; | |
2521 | *) if $less -R </dev/null >/dev/null; then | |
2522 | echo "Substituting less -R for less." | |
2523 | less="$less -R" | |
2524 | _less=$less | |
2525 | fi | |
2526 | ;; | |
2527 | esac | |
8ff267be | 2528 | case "$ln" in |
1fef16b3 | 2529 | ln) |
8ff267be PP |
2530 | echo "Substituting cp for ln." |
2531 | ln=$cp | |
868439a2 | 2532 | _ln=$cp |
8ff267be PP |
2533 | ;; |
2534 | esac | |
2e26f1d5 | 2535 | case "$make" in |
613d6c3e | 2536 | make) |
2e26f1d5 JH |
2537 | case "$gmake" in |
2538 | gmake) | |
2539 | echo "I can't find make or gmake, and my life depends on it." >&4 | |
2540 | echo "Go find a public domain implementation or fix your PATH setting!" >&4 | |
2541 | exit 1 | |
2542 | ;; | |
2543 | esac | |
2544 | ;; | |
613d6c3e | 2545 | esac |
2e26f1d5 JH |
2546 | case "$gmake" in |
2547 | gmake) ;; | |
2548 | *) # We can't have osname yet. | |
1fef16b3 JH |
2549 | if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS |
2550 | # Assume that gmake, if found, is definitely GNU make | |
2551 | # and prefer it over the system make. | |
2552 | echo "Substituting gmake for make." | |
2553 | make=$gmake | |
868439a2 | 2554 | _make=$gmake |
1fef16b3 JH |
2555 | fi |
2556 | ;; | |
a5a94ea5 | 2557 | esac |
2304df62 AD |
2558 | case "$test" in |
2559 | test) | |
2560 | echo "Hopefully test is built into your sh." | |
2561 | ;; | |
2562 | *) | |
73614538 | 2563 | if `sh -c "PATH= test true" >/dev/null 2>&1`; then |
5d644a95 | 2564 | echo "Using the test built into your sh." |
2304df62 AD |
2565 | test=test |
2566 | _test=test | |
2567 | fi | |
2568 | ;; | |
2569 | esac | |
2570 | case "$echo" in | |
2571 | echo) | |
2572 | echo "Hopefully echo is built into your sh." | |
2573 | ;; | |
2574 | '') ;; | |
2575 | *) | |
2576 | echo " " | |
2577 | echo "Checking compatibility between $echo and builtin echo (if any)..." >&4 | |
2578 | $echo $n "hi there$c" >foo1 | |
2579 | echo $n "hi there$c" >foo2 | |
2580 | if cmp foo1 foo2 >/dev/null 2>&1; then | |
2581 | echo "They are compatible. In fact, they may be identical." | |
2582 | else | |
2583 | case "$n" in | |
2584 | '-n') n='' c='\c';; | |
2585 | *) n='-n' c='';; | |
2586 | esac | |
2587 | cat <<FOO | |
2588 | They are not compatible! You are probably running ksh on a non-USG system. | |
2589 | I'll have to use $echo instead of the builtin, since Bourne shell doesn't | |
2590 | have echo built in and we may have to run some Bourne shell scripts. That | |
2591 | means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous. | |
2592 | ||
2593 | FOO | |
2594 | $echo $n "The star should be here-->$c" | |
2595 | $echo "*" | |
2596 | fi | |
2597 | $rm -f foo1 foo2 | |
2598 | ;; | |
2599 | esac | |
2600 | ||
2f88d857 MB |
2601 | # This question was auctioned at YAPC::Europe-2007 in Vienna |
2602 | # I never promised you could answer it. I only auctioned the question. | |
2603 | cat <<FOO | |
2604 | The following message is sponsored by | |
2605 | ||
2606 | Dresden.pm<--The stars should be here. | |
2607 | ||
2608 | Dear Perl user, system administrator or package | |
2609 | maintainer, the Perl community sends greetings to | |
2610 | you. Do you (emblematical) greet back [Y/n]? n | |
2611 | ||
2612 | FOO | |
2613 | ||
613d6c3e | 2614 | : Check what type of C compiler we use |
6b769f8f | 2615 | cat <<EOS >trygcc |
2573c5f9 JH |
2616 | $startsh |
2617 | EOS | |
6b769f8f | 2618 | cat <<'EOSC' >>trygcc |
2573c5f9 JH |
2619 | case "$cc" in |
2620 | '') ;; | |
2621 | *) $rm -f try try.* | |
2622 | $cat >try.c <<EOM | |
2623 | int main(int argc, char *argv[]) { | |
2624 | return 0; | |
2625 | } | |
2626 | EOM | |
e4778687 | 2627 | if $cc -o try $ccflags $ldflags try.c; then |
2573c5f9 JH |
2628 | : |
2629 | else | |
2630 | echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 | |
2631 | despair=yes | |
2632 | trygcc=yes | |
2633 | case "$cc" in | |
2634 | *gcc*) trygcc=no ;; | |
2635 | esac | |
dce40316 AD |
2636 | # Skip this test because it gives a false match on output like: |
2637 | # ./trygcc: line 23: cc: command not found | |
2638 | # case "`$cc -v -c try.c 2>&1`" in | |
2639 | # *gcc*) trygcc=no ;; | |
2640 | # esac | |
2573c5f9 JH |
2641 | if $test X"$trygcc" = Xyes; then |
2642 | if gcc -o try -c try.c; then | |
2643 | echo " " | |
2644 | echo "You seem to have a working gcc, though." >&4 | |
dce40316 AD |
2645 | # Switching compilers may undo the work of hints files. |
2646 | # The most common problem is -D_REENTRANT for threads. | |
2647 | # This heuristic catches that case, but gets false positives | |
2648 | # if -Dusethreads was not actually specified. Better to | |
2649 | # bail out here with a useful message than fail | |
2650 | # mysteriously later. Should we perhaps just try to | |
2651 | # re-invoke Configure -Dcc=gcc config_args ? | |
2652 | if $test -f usethreads.cbu; then | |
2653 | $cat >&4 <<EOM | |
2654 | ||
2655 | *** However, any setting of the C compiler flags (e.g. for thread support) | |
2656 | *** will be lost. It may be necessary for you to restart Configure and | |
2657 | *** add -Dcc=gcc to your Configure command line. | |
2658 | ||
2659 | EOM | |
2660 | rp="Would you like to go ahead and try gcc anyway?" | |
2661 | dflt=n | |
2662 | else | |
2663 | rp="Would you like to use it?" | |
2664 | dflt=y | |
2665 | fi | |
2573c5f9 JH |
2666 | if $test -f myread; then |
2667 | . ./myread | |
2668 | else | |
2669 | if $test -f UU/myread; then | |
2670 | . ./UU/myread | |
2671 | else | |
2672 | echo "Cannot find myread, sorry. Aborting." >&2 | |
2673 | exit 1 | |
2674 | fi | |
2675 | fi | |
2676 | case "$ans" in | |
6371411c | 2677 | [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no; |
2573c5f9 JH |
2678 | esac |
2679 | fi | |
2680 | fi | |
6b769f8f RB |
2681 | fi |
2682 | $rm -f try try.* | |
2683 | ;; | |
2684 | esac | |
2685 | EOSC | |
2686 | ||
2687 | cat <<EOS >checkcc | |
2688 | $startsh | |
2689 | EOS | |
2690 | cat <<'EOSC' >>checkcc | |
2691 | case "$cc" in | |
2692 | '') ;; | |
2693 | *) $rm -f try try.* | |
2694 | $cat >try.c <<EOM | |
2695 | int main(int argc, char *argv[]) { | |
2696 | return 0; | |
2697 | } | |
2698 | EOM | |
2699 | if $cc -o try $ccflags $ldflags try.c; then | |
2700 | : | |
2701 | else | |
2573c5f9 | 2702 | if $test X"$despair" = Xyes; then |
6b769f8f RB |
2703 | echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 |
2704 | fi | |
2705 | $cat >&4 <<EOM | |
5dd4fbdf MB |
2706 | You need to find a working C compiler. |
2707 | Either (purchase and) install the C compiler supplied by your OS vendor, | |
2708 | or for a free C compiler try http://gcc.gnu.org/ | |
2709 | I cannot continue any further, aborting. | |
2710 | EOM | |
6b769f8f | 2711 | exit 1 |
2573c5f9 JH |
2712 | fi |
2713 | $rm -f try try.* | |
2714 | ;; | |
2715 | esac | |
2716 | EOSC | |
2717 | ||
a0d0e21e LW |
2718 | : determine whether symbolic links are supported |
2719 | echo " " | |
2720 | $touch blurfl | |
2721 | if $ln -s blurfl sym > /dev/null 2>&1 ; then | |
2722 | echo "Symbolic links are supported." >&4 | |
818f00be | 2723 | lns="$ln -s" |
a0d0e21e LW |
2724 | else |
2725 | echo "Symbolic links are NOT supported." >&4 | |
2726 | lns="$ln" | |
2727 | fi | |
2728 | $rm -f blurfl sym | |
2729 | ||
dafca956 JH |
2730 | : determine whether symbolic links are supported |
2731 | echo " " | |
2732 | case "$lns" in | |
18ea2752 | 2733 | *"ln"*" -s") |
dafca956 JH |
2734 | echo "Checking how to test for symbolic links..." >&4 |
2735 | $lns blurfl sym | |
4b661809 | 2736 | if $test "X$issymlink" = X; then |
2e2a97a6 JH |
2737 | case "$newsh" in |
2738 | '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;; | |
2739 | *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;; | |
2740 | esac | |
5d644a95 MB |
2741 | if test $? = 0; then |
2742 | issymlink="test -h" | |
2e2a97a6 JH |
2743 | else |
2744 | echo "Your builtin 'test -h' may be broken." >&4 | |
2745 | case "$test" in | |
2746 | /*) ;; | |
2747 | *) pth=`echo $PATH | sed -e "s/$p_/ /g"` | |
2748 | for p in $pth | |
2749 | do | |
2750 | if test -f "$p/$test"; then | |
2751 | test="$p/$test" | |
2752 | break | |
2753 | fi | |
2754 | done | |
2755 | ;; | |
2756 | esac | |
2757 | case "$test" in | |
2758 | /*) | |
2759 | echo "Trying external '$test -h'." >&4 | |
2760 | issymlink="$test -h" | |
2761 | if $test ! -h sym >/dev/null 2>&1; then | |
3c728e00 | 2762 | echo "External '$test -h' is broken, too." >&4 |
2e2a97a6 JH |
2763 | issymlink='' |
2764 | fi | |
2765 | ;; | |
2766 | *) issymlink='' ;; | |
2767 | esac | |
1332606d | 2768 | fi |
5d644a95 | 2769 | fi |
4b661809 | 2770 | if $test "X$issymlink" = X; then |
dafca956 | 2771 | if $test -L sym 2>/dev/null; then |
5d644a95 | 2772 | issymlink="$test -L" |
2e2a97a6 | 2773 | echo "The builtin '$test -L' worked." >&4 |
dafca956 JH |
2774 | fi |
2775 | fi | |
4b661809 | 2776 | if $test "X$issymlink" != X; then |
5d644a95 | 2777 | echo "You can test for symbolic links with '$issymlink'." >&4 |
dafca956 JH |
2778 | else |
2779 | echo "I do not know how you can test for symbolic links." >&4 | |
2780 | fi | |
2781 | $rm -f blurfl sym | |
2782 | ;; | |
2783 | *) echo "No symbolic links, so not testing for their testing..." >&4 | |
2784 | ;; | |
2785 | esac | |
2786 | echo " " | |
2787 | ||
34f1896b | 2788 | : Make symlinks util |
dafca956 JH |
2789 | case "$mksymlinks" in |
2790 | $define|true|[yY]*) | |
2791 | case "$src" in | |
2792 | ''|'.') echo "Cannot create symlinks in the original directory." >&4 | |
2793 | exit 1 | |
2794 | ;; | |
4b661809 | 2795 | *) case "$lns:$issymlink" in |
f314eb9f | 2796 | *"ln"*" -s:"*"test -"?) |
dafca956 JH |
2797 | echo "Creating the symbolic links..." >&4 |
2798 | echo "(First creating the subdirectories...)" >&4 | |
2799 | cd .. | |
2800 | awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do | |
2801 | read directory | |
2802 | test -z "$directory" && break | |
2803 | mkdir -p $directory | |
2804 | done | |
2805 | # Sanity check 1. | |
2806 | if test ! -d t/base; then | |
2807 | echo "Failed to create the subdirectories. Aborting." >&4 | |
2808 | exit 1 | |
2809 | fi | |
2810 | echo "(Then creating the symlinks...)" >&4 | |
2811 | awk '{print $1}' $src/MANIFEST | while true; do | |
2812 | read filename | |
2813 | test -z "$filename" && break | |
2814 | if test -f $filename; then | |
5d644a95 | 2815 | if $issymlink $filename; then |
dafca956 JH |
2816 | rm -f $filename |
2817 | fi | |
2818 | fi | |
2819 | if test -f $filename; then | |
2820 | echo "$filename already exists, not symlinking." | |
2821 | else | |
2822 | ln -s $src/$filename $filename | |
2823 | fi | |
2824 | done | |
2825 | # Sanity check 2. | |
a0d24b8a JH |
2826 | if test ! -f t/base/lex.t; then |
2827 | echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4 | |
dafca956 JH |
2828 | exit 1 |
2829 | fi | |
2830 | cd UU | |
2831 | ;; | |
2832 | *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4 | |
2833 | ;; | |
2834 | esac | |
2835 | ;; | |
2836 | esac | |
2837 | ;; | |
2838 | esac | |
2839 | ||
613d6c3e | 2840 | : Check for Cross-Compilation |
56b575b9 MB |
2841 | if $test "X$targethost" = "X"; then |
2842 | targethost="" | |
2843 | fi | |
f53a6e0e MB |
2844 | if $test "X$targetenv" = "X"; then |
2845 | targetenv="" | |
2846 | fi | |
5440bc8e JH |
2847 | case "$usecrosscompile" in |
2848 | $define|true|[yY]*) | |
93bc48fa | 2849 | $echo "Cross-compiling..." |
56b575b9 MB |
2850 | croak='' |
2851 | case "$cc" in | |
2852 | *-gcc*|*-g++*) # A cross-compiling gcc, probably. | |
2853 | # arm-linux-androideabi-gcc -> arm-linux-androideabi | |
2854 | # x86_64-w64-mingw32-gcc.exe -> x86_64-w64-mingw32 | |
2855 | targetarch=`$echo $cc|$sed 's/-g[c\+][c\+].*$//'` | |
2856 | ar=`$echo $cc|$sed 's/-g[c\+][c\+]/-ar/'` | |
2857 | # leave out ld, choosing it is more complex | |
2858 | nm=`$echo $cc|$sed 's/-g[c\+][c\+]/-nm/'` | |
2859 | ranlib=`$echo $cc|$sed 's/-g[c\+][c\+]/-ranlib/'` | |
2860 | # We are in a weird spot. Just before us, some values | |
2861 | # were 'saved', to be restored after the hints are | |
2862 | # run. This means that the changes we made to ar, | |
2863 | # nm and ranlib will get reverted. | |
2864 | # To avoid that, we hijack the saving mechanism and | |
2865 | # have it save our new values. | |
2866 | for file in ar nm ranlib; do | |
2867 | eval xxx=\$$file | |
2868 | eval $file=$xxx$_exe | |
2869 | eval _$file=$xxx | |
2870 | done | |
2871 | ;; | |
5440bc8e JH |
2872 | esac |
2873 | case "$targetarch" in | |
93bc48fa | 2874 | '') echo "Targetarch not defined." >&4; croak=y ;; |
56b575b9 | 2875 | *) echo "Using targetarch $targetarch." >&4 ;; |
5440bc8e | 2876 | esac |
93bc48fa JH |
2877 | case "$targethost" in |
2878 | '') echo "Targethost not defined." >&4; croak=y ;; | |
56b575b9 | 2879 | *) echo "Using targethost $targethost." >&4 |
5440bc8e | 2880 | esac |
93bc48fa JH |
2881 | locincpth=' ' |
2882 | loclibpth=' ' | |
5440bc8e | 2883 | case "$croak" in |
93bc48fa | 2884 | y) echo "Cannot continue, aborting." >&4; exit 1 ;; |
5440bc8e | 2885 | esac |
b98f6b80 JR |
2886 | : compile a host miniperl and generate_uudmap, unless we got passed them |
2887 | if $test "X$hostperl" = X; then | |
2888 | echo "Building host miniperl and generate_uudmap binaries" >&4 | |
4346df8f | 2889 | before_host=`pwd` |
b98f6b80 | 2890 | cd .. |
4346df8f BF |
2891 | cd $src |
2892 | src=`pwd` | |
f53a6e0e MB |
2893 | rm -rf $src/host |
2894 | mkdir $src/host | |
2895 | cd $src/host | |
4346df8f | 2896 | $src/Configure -des -Dusedevel -Dmksymlinks |
1ca484ac BF |
2897 | $make miniperl |
2898 | case "$hostgenerate" in | |
2899 | '') $make generate_uudmap | |
f53a6e0e | 2900 | hostgenerate=$src/host/generate_uudmap |
1ca484ac BF |
2901 | ;; |
2902 | "$undef") hostgenerate='' | |
2903 | ;; | |
2904 | esac | |
4346df8f | 2905 | hostperl=$src/host/miniperl |
4346df8f | 2906 | cd $before_host |
b98f6b80 | 2907 | fi |
b36f1e2d | 2908 | hostosname=`$hostperl -le 'print $^O'` |
cb87e003 JR |
2909 | ;; |
2910 | *) | |
b75b1e25 | 2911 | usecrosscompile="$undef" |
cb87e003 JR |
2912 | ;; |
2913 | esac | |
2914 | ||
2915 | : Define -Dtargethost=somecomputer to run compiled tests on another machine | |
0eafc8c9 | 2916 | case "$targethost" in |
97076f2d NW |
2917 | '') echo "Checking for cross-compile" >&4 |
2918 | case "$usecrosscompile$multiarch" in | |
dbb1f24e | 2919 | *$define*) echo "Skipping the try tests in the rest of Configure as no targethost was defined when cross-compiling" >&4 |
97076f2d NW |
2920 | if [ -f Makefile ]; then |
2921 | echo " " | |
2922 | echo "Now you must ensure config.sh, config.h and the generated headers exist and run a $make." | |
2923 | else | |
2924 | echo "Configure done." | |
2925 | fi | |
2926 | exit 0 | |
2927 | ;; | |
97076f2d | 2928 | *) echo "No targethost for running compiler tests against defined, running locally" >&4 |
0eafc8c9 JR |
2929 | run='' |
2930 | to=: | |
2931 | from=: | |
2932 | ;; | |
dbb1f24e NW |
2933 | esac |
2934 | ;; | |
0eafc8c9 | 2935 | *) echo "Using targethost $targethost." >&4 |
5440bc8e JH |
2936 | case "$src" in |
2937 | /*) run=$src/Cross/run | |
93c0359c | 2938 | targetmkdir=$src/Cross/mkdir |
5440bc8e JH |
2939 | to=$src/Cross/to |
2940 | from=$src/Cross/from | |
2941 | ;; | |
93bc48fa | 2942 | *) pwd=`$test -f ../Configure & cd ..; pwd` |
5440bc8e | 2943 | run=$pwd/Cross/run |
f8006fac | 2944 | targetmkdir=$pwd/Cross/mkdir |
5440bc8e JH |
2945 | to=$pwd/Cross/to |
2946 | from=$pwd/Cross/from | |
2947 | ;; | |
2948 | esac | |
2949 | case "$targetrun" in | |
2950 | '') targetrun=ssh ;; | |
2951 | esac | |
2952 | case "$targetto" in | |
2953 | '') targetto=scp ;; | |
2954 | esac | |
2955 | case "$targetfrom" in | |
2956 | '') targetfrom=scp ;; | |
2957 | esac | |
56b575b9 MB |
2958 | run=$run-$targetrun |
2959 | to=$to-$targetto | |
2960 | from=$from-$targetfrom | |
93bc48fa JH |
2961 | case "$targetdir" in |
2962 | '') targetdir=/tmp | |
56b575b9 MB |
2963 | echo "Guessing targetdir $targetdir." >&4 |
2964 | ;; | |
93bc48fa | 2965 | esac |
5440bc8e | 2966 | case "$targetuser" in |
93bc48fa | 2967 | '') targetuser=root |
56b575b9 MB |
2968 | echo "Guessing targetuser $targetuser." >&4 |
2969 | ;; | |
5440bc8e | 2970 | esac |
dad780ec JR |
2971 | case "$targetport" in |
2972 | '') targetport=22 | |
56b575b9 MB |
2973 | echo "Guessing targetport $targetport." >&4 |
2974 | ;; | |
dad780ec | 2975 | esac |
5440bc8e JH |
2976 | case "$targetfrom" in |
2977 | scp) q=-q ;; | |
2978 | *) q='' ;; | |
2979 | esac | |
2980 | case "$targetrun" in | |
2981 | ssh|rsh) | |
2982 | cat >$run <<EOF | |
2983 | #!/bin/sh | |
d1739b52 | 2984 | env='' |
93c0359c JH |
2985 | case "\$1" in |
2986 | -cwd) | |
2987 | shift | |
2988 | cwd=\$1 | |
2989 | shift | |
2990 | ;; | |
2991 | esac | |
d1739b52 BF |
2992 | case "\$1" in |
2993 | -env) | |
2994 | shift | |
2995 | env=\$1 | |
2996 | shift | |
2997 | ;; | |
2998 | esac | |
93c0359c JH |
2999 | case "\$cwd" in |
3000 | '') cwd=$targetdir ;; | |
3001 | esac | |
5440bc8e JH |
3002 | exe=\$1 |
3003 | shift | |
dad780ec | 3004 | $to \$exe |
03deea9f | 3005 | $targetrun -p $targetport -l $targetuser $targethost "cd \$cwd && \$env \$exe \$@" |
5440bc8e JH |
3006 | EOF |
3007 | ;; | |
e9867f21 BF |
3008 | adb) |
3009 | $touch $run | |
3010 | ;; | |
93bc48fa | 3011 | *) echo "Unknown targetrun '$targetrun'" >&4 |
5440bc8e JH |
3012 | exit 1 |
3013 | ;; | |
3014 | esac | |
93c0359c JH |
3015 | case "$targetmkdir" in |
3016 | */Cross/mkdir) | |
3017 | cat >$targetmkdir <<EOF | |
3018 | #!/bin/sh | |
dad780ec | 3019 | $targetrun -p $targetport -l $targetuser $targethost "mkdir -p \$@" |
93c0359c | 3020 | EOF |
f8006fac | 3021 | $chmod a+rx $targetmkdir |
93c0359c JH |
3022 | ;; |
3023 | *) echo "Unknown targetmkdir '$targetmkdir'" >&4 | |
3024 | exit 1 | |
3025 | ;; | |
3026 | esac | |
5440bc8e JH |
3027 | case "$targetto" in |
3028 | scp|rcp) | |
3029 | cat >$to <<EOF | |
3030 | #!/bin/sh | |
3031 | for f in \$@ | |
3032 | do | |
93c0359c JH |
3033 | case "\$f" in |
3034 | /*) | |
3035 | $targetmkdir \`dirname \$f\` | |
f53a6e0e | 3036 | $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f 2>/dev/null || exit 1 |
93c0359c JH |
3037 | ;; |
3038 | *) | |
3039 | $targetmkdir $targetdir/\`dirname \$f\` | |
f53a6e0e | 3040 | $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f 2>/dev/null || exit 1 |
93c0359c JH |
3041 | ;; |
3042 | esac | |
5440bc8e JH |
3043 | done |
3044 | exit 0 | |
3045 | EOF | |
3046 | ;; | |
3047 | cp) cat >$to <<EOF | |
3048 | #!/bin/sh | |
93c0359c JH |
3049 | for f in \$@ |
3050 | do | |
3051 | case "\$f" in | |
3052 | /*) | |
3053 | $mkdir -p $targetdir/\`dirname \$f\` | |
3054 | $cp \$f $targetdir/\$f || exit 1 | |
3055 | ;; | |
3056 | *) | |
3057 | $targetmkdir $targetdir/\`dirname \$f\` | |
3058 | $cp \$f $targetdir/\$f || exit 1 | |
3059 | ;; | |
3060 | esac | |
3061 | done | |
3062 | exit 0 | |
5440bc8e JH |
3063 | EOF |
3064 | ;; | |
93bc48fa | 3065 | *) echo "Unknown targetto '$targetto'" >&4 |
5440bc8e JH |
3066 | exit 1 |
3067 | ;; | |
3068 | esac | |
3069 | case "$targetfrom" in | |
3070 | scp|rcp) | |
3071 | cat >$from <<EOF | |
3072 | #!/bin/sh | |
3073 | for f in \$@ | |
3074 | do | |
93c0359c | 3075 | $rm -f \$f |
dad780ec | 3076 | $targetfrom -P $targetport $q $targetuser@$targethost:$targetdir/\$f . || exit 1 |
5440bc8e JH |
3077 | done |
3078 | exit 0 | |
3079 | EOF | |
3080 | ;; | |
3081 | cp) cat >$from <<EOF | |
3082 | #!/bin/sh | |
3083 | for f in \$@ | |
3084 | do | |
93c0359c | 3085 | $rm -f \$f |
5440bc8e JH |
3086 | cp $targetdir/\$f . || exit 1 |
3087 | done | |
3088 | exit 0 | |
3089 | EOF | |
3090 | ;; | |
93bc48fa | 3091 | *) echo "Unknown targetfrom '$targetfrom'" >&4 |
5440bc8e JH |
3092 | exit 1 |
3093 | ;; | |
3094 | esac | |
93bc48fa JH |
3095 | if $test ! -f $run; then |
3096 | echo "Target 'run' script '$run' not found." >&4 | |
5440bc8e | 3097 | else |
f8006fac | 3098 | $chmod a+rx $run |
5440bc8e | 3099 | fi |
93bc48fa JH |
3100 | if $test ! -f $to; then |
3101 | echo "Target 'to' script '$to' not found." >&4 | |
5440bc8e | 3102 | else |
f8006fac | 3103 | $chmod a+rx $to |
5440bc8e | 3104 | fi |
93bc48fa JH |
3105 | if $test ! -f $from; then |
3106 | echo "Target 'from' script '$from' not found." >&4 | |
5440bc8e | 3107 | else |
f8006fac | 3108 | $chmod a+rx $from |
5440bc8e | 3109 | fi |
93bc48fa | 3110 | if $test ! -f $run -o ! -f $to -o ! -f $from; then |
5440bc8e JH |
3111 | exit 1 |
3112 | fi | |
3113 | cat >&4 <<EOF | |
f8006fac JH |
3114 | Using '$run' for remote execution, |
3115 | and '$from' and '$to' | |
93bc48fa | 3116 | for remote file transfer. |
5440bc8e JH |
3117 | EOF |
3118 | ;; | |
3119 | *) run='' | |
3120 | to=: | |
3121 | from=: | |
b75b1e25 | 3122 | usecrosscompile="$undef" |
5440bc8e JH |
3123 | targetarch='' |
3124 | ;; | |
3125 | esac | |
3126 | ||
ecfc5424 AD |
3127 | : see whether [:lower:] and [:upper:] are supported character classes |
3128 | echo " " | |
ecfc5424 AD |
3129 | case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in |
3130 | ABYZ) | |
3131 | echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 | |
3132 | up='[:upper:]' | |
3133 | low='[:lower:]' | |
3134 | ;; | |
416d0bea MB |
3135 | *) # There is a discontinuity in EBCDIC between 'R' and 'S' |
3136 | # (0xd9 and 0xe2), therefore that is a nice testing point. | |
3137 | if test "X$up" = X -o "X$low" = X; then | |
3138 | case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in | |
3139 | rs) up='[A-Z]' | |
3140 | low='[a-z]' | |
28e8609d JH |
3141 | ;; |
3142 | esac | |
416d0bea | 3143 | fi |
28e8609d | 3144 | if test "X$up" = X -o "X$low" = X; then |
416d0bea MB |
3145 | case "`echo RS | $tr R-S r-s 2>/dev/null`" in |
3146 | rs) up='A-Z' | |
28e8609d JH |
3147 | low='a-z' |
3148 | ;; | |
3149 | esac | |
416d0bea | 3150 | fi |
28e8609d | 3151 | if test "X$up" = X -o "X$low" = X; then |
416d0bea MB |
3152 | case "`echo RS | od -x 2>/dev/null`" in |
3153 | *D9E2*|*d9e2*) | |
28e8609d JH |
3154 | echo "Hey, this might be EBCDIC." >&4 |
3155 | if test "X$up" = X -o "X$low" = X; then | |
416d0bea MB |
3156 | case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in |
3157 | rs) up='[A-IJ-RS-Z]' | |
3158 | low='[a-ij-rs-z]' | |
28e8609d JH |
3159 | ;; |
3160 | esac | |
3161 | fi | |
3162 | if test "X$up" = X -o "X$low" = X; then | |
416d0bea MB |
3163 | case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in |
3164 | rs) up='A-IJ-RS-Z' | |
3165 | low='a-ij-rs-z' | |
28e8609d JH |
3166 | ;; |
3167 | esac | |
3168 | fi | |
3169 | ;; | |
3170 | esac | |
3171 | fi | |
3172 | esac | |
416d0bea MB |
3173 | case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in |
3174 | rs) | |
28e8609d JH |
3175 | echo "Using $up and $low to convert case." >&4 |
3176 | ;; | |
ecfc5424 | 3177 | *) |
28e8609d JH |
3178 | echo "I don't know how to translate letters from upper to lower case." >&4 |
3179 | echo "Your tr is not acting any way I know of." >&4 | |
3180 | exit 1 | |
3181 | ;; | |
ecfc5424 AD |
3182 | esac |
3183 | : set up the translation script tr, must be called with ./tr of course | |
3184 | cat >tr <<EOSC | |
3185 | $startsh | |
3186 | case "\$1\$2" in | |
3187 | '[A-Z][a-z]') exec $tr '$up' '$low';; | |
3188 | '[a-z][A-Z]') exec $tr '$low' '$up';; | |
3189 | esac | |
3190 | exec $tr "\$@" | |
3191 | EOSC | |
3192 | chmod +x tr | |
3193 | $eunicefix tr | |
3194 | ||
2304df62 AD |
3195 | : Try to determine whether config.sh was made on this system |
3196 | case "$config_sh" in | |
3197 | '') | |
43999f95 JH |
3198 | myuname=`$uname -a 2>/dev/null` |
3199 | $test -z "$myuname" && myuname=`hostname 2>/dev/null` | |
f4dc174a | 3200 | # Downcase everything to avoid ambiguity. |
1332606d | 3201 | # Remove slashes and single quotes so we can use parts of this in |
f4dc174a AD |
3202 | # directory and file names. |
3203 | # Remove newlines so myuname is sane to use elsewhere. | |
28e8609d JH |
3204 | # tr '[A-Z]' '[a-z]' would not work in EBCDIC |
3205 | # because the A-Z/a-z are not consecutive. | |
f4dc174a | 3206 | myuname=`echo $myuname | $sed -e "s,['/],,g" | \ |
3eaeeeae | 3207 | ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` |
1aef975c | 3208 | newmyuname="$myuname" |
2304df62 | 3209 | dflt=n |
16d20bd9 AD |
3210 | case "$knowitall" in |
3211 | '') | |
3212 | if test -f ../config.sh; then | |
3213 | if $contains myuname= ../config.sh >/dev/null 2>&1; then | |
3214 | eval "`grep myuname= ../config.sh`" | |
3215 | fi | |
3216 | if test "X$myuname" = "X$newmyuname"; then | |
3217 | dflt=y | |
3218 | fi | |
2304df62 | 3219 | fi |
16d20bd9 AD |
3220 | ;; |
3221 | *) dflt=y;; | |
3222 | esac | |
2304df62 AD |
3223 | |
3224 | : Get old answers from old config file if Configure was run on the | |
3225 | : same system, otherwise use the hints. | |
3226 | hint=default | |
3227 | cd .. | |
3228 | if test -f config.sh; then | |
16d20bd9 AD |
3229 | echo " " |
3230 | rp="I see a config.sh file. Shall I use it to set the defaults?" | |
2304df62 AD |
3231 | . UU/myread |
3232 | case "$ans" in | |
f83701cd AD |
3233 | n*|N*) echo "OK, I'll ignore it." |
3234 | mv config.sh config.sh.old | |
3235 | myuname="$newmyuname" | |
3236 | ;; | |
2304df62 | 3237 | *) echo "Fetching default answers from your old config.sh file..." >&4 |
ecfc5424 AD |
3238 | tmp_n="$n" |
3239 | tmp_c="$c" | |
85cad39c | 3240 | tmp_sh="$sh" |
2304df62 AD |
3241 | . ./config.sh |
3242 | cp config.sh UU | |
ecfc5424 AD |
3243 | n="$tmp_n" |
3244 | c="$tmp_c" | |
85cad39c PP |
3245 | : Older versions did not always set $sh. Catch re-use of such |
3246 | : an old config.sh. | |
3247 | case "$sh" in | |
3248 | '') sh="$tmp_sh" ;; | |
3249 | esac | |
2304df62 AD |
3250 | hint=previous |
3251 | ;; | |
3252 | esac | |
3253 | fi | |
2573c5f9 | 3254 | . ./UU/checkcc |
2304df62 AD |
3255 | if test ! -f config.sh; then |
3256 | $cat <<EOM | |
3257 | ||
4e2a5f63 AD |
3258 | First time through, eh? I have some defaults handy for some systems |
3259 | that need some extra help getting the Configure answers right: | |
2304df62 AD |
3260 | |
3261 | EOM | |
dfe9444c | 3262 | (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4 |
2304df62 AD |
3263 | dflt='' |
3264 | : Half the following guesses are probably wrong... If you have better | |
7f2de2d2 | 3265 | : tests or hints, please send them to perlbug@perl.org |
2304df62 | 3266 | : The metaconfig authors would also appreciate a copy... |
a0d0e21e | 3267 | $test -f /irix && osname=irix |
85e6fe83 LW |
3268 | $test -f /xenix && osname=sco_xenix |
3269 | $test -f /dynix && osname=dynix | |
3270 | $test -f /dnix && osname=dnix | |
5f05dabc PP |
3271 | $test -f /lynx.os && osname=lynxos |
3272 | $test -f /unicos && osname=unicos && osvers=`$uname -r` | |
c71a9cee | 3273 | $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r` |
7a4c00b4 | 3274 | $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` |
85e6fe83 | 3275 | $test -f /bin/mips && /bin/mips && osname=mips |
ecfc5424 AD |
3276 | $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ |
3277 | $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 | |
a0d0e21e LW |
3278 | $test -d /usr/apollo/bin && osname=apollo |
3279 | $test -f /etc/saf/_sactab && osname=svr4 | |
85e6fe83 | 3280 | $test -d /usr/include/minix && osname=minix |
d54344fc | 3281 | $test -f /system/gnu_library/bin/ar.pm && osname=vos |
e060872b | 3282 | if $test -d /MachTen -o -d /MachTen_Folder; then |
dfe9444c | 3283 | osname=machten |
4633a7c4 | 3284 | if $test -x /sbin/version; then |
dfe9444c | 3285 | osvers=`/sbin/version | $awk '{print $2}' | |
4633a7c4 LW |
3286 | $sed -e 's/[A-Za-z]$//'` |
3287 | elif $test -x /usr/etc/version; then | |
dfe9444c | 3288 | osvers=`/usr/etc/version | $awk '{print $2}' | |
4633a7c4 LW |
3289 | $sed -e 's/[A-Za-z]$//'` |
3290 | else | |
3291 | osvers="$2.$3" | |
3292 | fi | |
3293 | fi | |
aaacdc8b GS |
3294 | |
3295 | $test -f /sys/posix.dll && | |
3296 | $test -f /usr/bin/what && | |
3297 | set X `/usr/bin/what /sys/posix.dll` && | |
3298 | $test "$3" = UWIN && | |
3299 | osname=uwin && | |
3300 | osvers="$5" | |
3301 | ||
2304df62 AD |
3302 | if $test -f $uname; then |
3303 | set X $myuname | |
3304 | shift | |
3305 | ||
2304df62 | 3306 | case "$5" in |
85e6fe83 | 3307 | fps*) osname=fps ;; |
2304df62 AD |
3308 | mips*) |
3309 | case "$4" in | |
85e6fe83 LW |
3310 | umips) osname=umips ;; |
3311 | *) osname=mips ;; | |
2304df62 | 3312 | esac;; |
85e6fe83 LW |
3313 | [23]100) osname=mips ;; |
3314 | next*) osname=next ;; | |
ecfc5424 | 3315 | i386*) |
c6912327 JH |
3316 | tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'` |
3317 | if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then | |
619ffc2b JH |
3318 | osname='sco' |
3319 | osvers=$tmp | |
3320 | elif $test -f /etc/kconfig; then | |
ecfc5424 | 3321 | osname=isc |
bd628c73 | 3322 | if test "$lns" = "$ln -s"; then |
a0d0e21e LW |
3323 | osvers=4 |
3324 | elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then | |
3325 | osvers=3 | |
2304df62 | 3326 | elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then |
a0d0e21e | 3327 | osvers=2 |
ecfc5424 AD |
3328 | fi |
3329 | fi | |
2000072c | 3330 | tmp='' |
ecfc5424 | 3331 | ;; |
c4f23d77 AD |
3332 | pc*) |
3333 | if test -n "$DJGPP"; then | |
3334 | osname=dos | |
3335 | osvers=djgpp | |
3336 | fi | |
3337 | ;; | |
2304df62 AD |
3338 | esac |
3339 | ||
3340 | case "$1" in | |
a0d0e21e LW |
3341 | aix) osname=aix |
3342 | tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` | |
3343 | case "$tmp" in | |
e81c5c2a NC |
3344 | # oslevel can fail with: |
3345 | # oslevel: Unable to acquire lock. | |
3346 | *not\ found) osvers="$4"."$3" ;; | |
a0d0e21e LW |
3347 | '<3240'|'<>3240') osvers=3.2.0 ;; |
3348 | '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; | |
3349 | '=3250'|'>3250') osvers=3.2.5 ;; | |
1aef975c | 3350 | *) osvers=$tmp;; |
a0d0e21e LW |
3351 | esac |
3352 | ;; | |
287574fe MB |
3353 | bitrig) osname=bitrig |
3354 | osvers="$3" | |
3355 | ;; | |
aaacdc8b GS |
3356 | bsd386) osname=bsd386 |
3357 | osvers=`$uname -r` | |
3358 | ;; | |
3359 | cygwin*) osname=cygwin | |
3360 | osvers="$3" | |
3361 | ;; | |
23f87696 SZ |
3362 | *dc.osx) osname=dcosx |
3363 | osvers="$3" | |
3364 | ;; | |
a0d0e21e LW |
3365 | dnix) osname=dnix |
3366 | osvers="$3" | |
3367 | ;; | |
3368 | domainos) osname=apollo | |
3369 | osvers="$3" | |
3370 | ;; | |
a774dfe6 RSG |
3371 | dgux) osname=dgux |
3372 | osvers="$3" | |
3373 | ;; | |
3374 | dragonfly) osname=dragonfly | |
a0d0e21e LW |
3375 | osvers="$3" |
3376 | ;; | |
760ac839 | 3377 | dynixptx*) osname=dynixptx |
e58e581d | 3378 | osvers=`echo "$4"|sed 's/^v//'` |
760ac839 | 3379 | ;; |
a774dfe6 | 3380 | freebsd) osname=freebsd |
a0d0e21e | 3381 | osvers="$3" ;; |
761ee4e8 BD |
3382 | genix) osname=genix ;; |
3383 | gnu) osname=gnu | |
3384 | osvers="$3" ;; | |
a774dfe6 | 3385 | hp*) osname=hpux |
bfb7748a | 3386 | osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'` |
a0d0e21e | 3387 | ;; |
761ee4e8 | 3388 | irix*) osname=irix |
a0d0e21e LW |
3389 | case "$3" in |
3390 | 4*) osvers=4 ;; | |
3391 | 5*) osvers=5 ;; | |
ecfc5424 | 3392 | *) osvers="$3" ;; |
a0d0e21e LW |
3393 | esac |
3394 | ;; | |
761ee4e8 | 3395 | linux) osname=linux |
a0d0e21e | 3396 | case "$3" in |
a0d0e21e LW |
3397 | *) osvers="$3" ;; |
3398 | esac | |
78ada538 | 3399 | $test -f /system/lib/libandroid.so && osname=linux-android |
a0d0e21e | 3400 | ;; |
761ee4e8 | 3401 | MiNT) osname=mint |
28e8609d JH |
3402 | ;; |
3403 | netbsd*) osname=netbsd | |
ecfc5424 AD |
3404 | osvers="$3" |
3405 | ;; | |
4e81affe MMIJG |
3406 | news-os) osvers="$3" |
3407 | case "$3" in | |
3408 | 4*) osname=newsos4 ;; | |
3409 | *) osname=newsos ;; | |
3410 | esac | |
3411 | ;; | |
aaacdc8b | 3412 | next*) osname=next ;; |
28bb1e2c | 3413 | nonstop-ux) osname=nonstopux ;; |
65dc58a1 TM |
3414 | openbsd) osname=openbsd |
3415 | osvers="$3" | |
3416 | ;; | |
5c728af0 IZ |
3417 | os2) osname=os2 |
3418 | osvers="$4" | |
3419 | ;; | |
aaacdc8b GS |
3420 | POSIX-BC | posix-bc ) osname=posix-bc |
3421 | osvers="$3" | |
a0d0e21e | 3422 | ;; |
ae3afa4e TH |
3423 | powerux | power_ux | powermax_os | powermaxos | \ |
3424 | powerunix | power_unix) osname=powerux | |
3425 | osvers="$3" | |
3426 | ;; | |
aaacdc8b GS |
3427 | qnx) osname=qnx |
3428 | osvers="$4" | |
3429 | ;; | |
a0d0e21e LW |
3430 | solaris) osname=solaris |
3431 | case "$3" in | |
3432 | 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; | |
ecfc5424 | 3433 | *) osvers="$3" ;; |
a0d0e21e LW |
3434 | esac |
3435 | ;; | |
85e6fe83 LW |
3436 | sunos) osname=sunos |
3437 | case "$3" in | |
85e6fe83 LW |
3438 | 5*) osname=solaris |
3439 | osvers=`echo $3 | $sed 's/^5/2/g'` ;; | |
a0d0e21e | 3440 | *) osvers="$3" ;; |
2304df62 AD |
3441 | esac |
3442 | ;; | |
a0d0e21e | 3443 | titanos) osname=titanos |
85e6fe83 | 3444 | case "$3" in |
a0d0e21e LW |
3445 | 1*) osvers=1 ;; |
3446 | 2*) osvers=2 ;; | |
3447 | 3*) osvers=3 ;; | |
3448 | 4*) osvers=4 ;; | |
ecfc5424 | 3449 | *) osvers="$3" ;; |
2304df62 AD |
3450 | esac |
3451 | ;; | |
85e6fe83 | 3452 | ultrix) osname=ultrix |
ecfc5424 | 3453 | osvers="$3" |
2304df62 | 3454 | ;; |
28757baa | 3455 | osf1|mls+) case "$5" in |
fed7345c AD |
3456 | alpha) |
3457 | osname=dec_osf | |
fdd85a03 | 3458 | osvers=`sizer -v | awk -FUNIX '{print $2}' | awk '{print $1}' | tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'` |
2aa76180 JH |
3459 | case "$osvers" in |
3460 | [1-9].[0-9]*) ;; | |
3461 | *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;; | |
3462 | esac | |
ecfc5424 AD |
3463 | ;; |
3464 | hp*) osname=hp_osf1 ;; | |
3465 | mips) osname=mips_osf1 ;; | |
85e6fe83 LW |
3466 | esac |
3467 | ;; | |
af1ff193 | 3468 | # UnixWare 7.1.2 is known as Open UNIX 8 |
381c1bae | 3469 | openunix|unixware) osname=svr5 |
0337d152 A |
3470 | osvers="$4" |
3471 | ;; | |
3c728e00 | 3472 | uts) osname=uts |
a0d0e21e LW |
3473 | osvers="$3" |
3474 | ;; | |
3c728e00 JH |
3475 | vos) osvers="$3" |
3476 | ;; | |
85e6fe83 | 3477 | $2) case "$osname" in |
2304df62 | 3478 | *isc*) ;; |
a0d0e21e | 3479 | *freebsd*) ;; |
5f05dabc | 3480 | svr*) |
a0d0e21e | 3481 | : svr4.x or possibly later |
a774dfe6 | 3482 | case "svr$3" in |
a0d0e21e LW |
3483 | ${osname}*) |
3484 | osname=svr$3 | |
3485 | osvers=$4 | |
3486 | ;; | |
3487 | esac | |
3488 | case "$osname" in | |
3489 | svr4.0) | |
3490 | : Check for ESIX | |
3491 | if test -f /stand/boot ; then | |
3492 | eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot` | |
ecfc5424 AD |
3493 | if test -n "$INITPROG" -a -f "$INITPROG"; then |
3494 | isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'` | |
3495 | if test -n "$isesix"; then | |
a0d0e21e LW |
3496 | osname=esix4 |
3497 | fi | |
3498 | fi | |
3499 | fi | |
3500 | ;; | |
3501 | esac | |
3502 | ;; | |
2304df62 | 3503 | *) if test -f /etc/systemid; then |
a0d0e21e LW |
3504 | osname=sco |
3505 | set `echo $3 | $sed 's/\./ /g'` $4 | |
c4f23d77 | 3506 | if $test -f $src/hints/sco_$1_$2_$3.sh; then |
85e6fe83 | 3507 | osvers=$1.$2.$3 |
c4f23d77 | 3508 | elif $test -f $src/hints/sco_$1_$2.sh; then |
85e6fe83 | 3509 | osvers=$1.$2 |
c4f23d77 | 3510 | elif $test -f $src/hints/sco_$1.sh; then |
85e6fe83 | 3511 | osvers=$1 |
2304df62 | 3512 | fi |
a0d0e21e LW |
3513 | else |
3514 | case "$osname" in | |
3515 | '') : Still unknown. Probably a generic Sys V. | |
3516 | osname="sysv" | |
3517 | osvers="$3" | |
3518 | ;; | |
3519 | esac | |
2304df62 AD |
3520 | fi |
3521 | ;; | |
3522 | esac | |
3523 | ;; | |
a0d0e21e LW |
3524 | *) case "$osname" in |
3525 | '') : Still unknown. Probably a generic BSD. | |
3526 | osname="$1" | |
3527 | osvers="$3" | |
3528 | ;; | |
3529 | esac | |
3530 | ;; | |
2304df62 AD |
3531 | esac |
3532 | else | |
dfe9444c AD |
3533 | if test -f /vmunix -a -f $src/hints/news_os.sh; then |
3534 | (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1 | |
3535 | if $contains news-os UU/kernel.what >/dev/null 2>&1; then | |
3536 | osname=news_os | |
2304df62 | 3537 | fi |
dfe9444c | 3538 | $rm -f UU/kernel.what |
5c728af0 | 3539 | elif test -d c:/. -o -n "$is_os2" ; then |
8e07c86e AD |
3540 | set X $myuname |
3541 | osname=os2 | |
3542 | osvers="$5" | |
2304df62 AD |
3543 | fi |
3544 | fi | |
a774dfe6 | 3545 | |
5440bc8e JH |
3546 | case "$targetarch" in |
3547 | '') ;; | |
3548 | *) hostarch=$osname | |
82643807 BF |
3549 | case "$targetarch" in |
3550 | nto*|*-nto-*) | |
c413f034 BF |
3551 | # Will load qnx.sh, which should change osname to nto |
3552 | osname=qnx | |
0d460bac | 3553 | osvers='' |
82643807 BF |
3554 | ;; |
3555 | *linux-android*) | |
3556 | # Catch arm-linux-androideabi, mipsel-linux-android, | |
3557 | # and i686-linux-android | |
3558 | osname=linux-android | |
0d460bac | 3559 | osvers='' |
82643807 | 3560 | ;; |
6f372547 BF |
3561 | *linux*) |
3562 | # Something like arm-linux-gnueabihf is really just | |
3563 | # plain linux. | |
3564 | osname=linux | |
0d460bac BF |
3565 | osvers='' |
3566 | ;; | |
3567 | *solaris*|*sunos*) | |
3568 | osname=solaris | |
3569 | # XXX perhaps we should just assume | |
3570 | # osvers to be 2, or maybe take the value | |
3571 | # from targetarch. Using $run before the | |
3572 | # hints are run is somewhat icky. | |
3573 | set X `$run $uname -a 2>/dev/null` | |
3574 | shift | |
3575 | case "$3" in | |
3576 | 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; | |
3577 | *) osvers="$3" ;; | |
3578 | esac | |
6f372547 | 3579 | ;; |
82643807 | 3580 | *) |
f53a6e0e MB |
3581 | osname=`echo $targetarch|sed 's,^[^-]*-,,'` |
3582 | osvers='' | |
82643807 BF |
3583 | ;; |
3584 | esac | |
5440bc8e JH |
3585 | ;; |
3586 | esac | |
3587 | ||
a0d0e21e LW |
3588 | : Now look for a hint file osname_osvers, unless one has been |
3589 | : specified already. | |
3590 | case "$hintfile" in | |
3591 | ''|' ') | |
1e127011 | 3592 | file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'` |
a0d0e21e | 3593 | : Also try without trailing minor version numbers. |
1e127011 DD |
3594 | xfile=`echo $file | $sed -e 's%_[^_]*$%%'` |
3595 | xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'` | |
3596 | xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'` | |
3597 | xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'` | |
a0d0e21e LW |
3598 | case "$file" in |
3599 | '') dflt=none ;; | |
3600 | *) case "$osvers" in | |
3601 | '') dflt=$file | |
3602 | ;; | |
dfe9444c | 3603 | *) if $test -f $src/hints/$file.sh ; then |
a0d0e21e | 3604 | dflt=$file |
dfe9444c | 3605 | elif $test -f $src/hints/$xfile.sh ; then |
a0d0e21e | 3606 | dflt=$xfile |
dfe9444c | 3607 | elif $test -f $src/hints/$xxfile.sh ; then |
a0d0e21e | 3608 | dflt=$xxfile |
dfe9444c | 3609 | elif $test -f $src/hints/$xxxfile.sh ; then |
a0d0e21e | 3610 | dflt=$xxxfile |
dfe9444c | 3611 | elif $test -f $src/hints/$xxxxfile.sh ; then |
a0d0e21e | 3612 | dflt=$xxxxfile |
dfe9444c | 3613 | elif $test -f "$src/hints/${osname}.sh" ; then |
a0d0e21e LW |
3614 | dflt="${osname}" |
3615 | else | |
3616 | dflt=none | |
3617 | fi | |
3618 | ;; | |
3619 | esac | |
85e6fe83 LW |
3620 | ;; |
3621 | esac | |
4e2a5f63 AD |
3622 | if $test -f Policy.sh ; then |
3623 | case "$dflt" in | |
3624 | *Policy*) ;; | |
3625 | none) dflt="Policy" ;; | |
3626 | *) dflt="Policy $dflt" ;; | |
3627 | esac | |
3628 | fi | |
85e6fe83 | 3629 | ;; |
a0d0e21e | 3630 | *) |
ecfc5424 | 3631 | dflt=`echo $hintfile | $sed 's/\.sh$//'` |
a0d0e21e | 3632 | ;; |
2304df62 | 3633 | esac |
1aef975c | 3634 | |
4e2a5f63 AD |
3635 | if $test -f Policy.sh ; then |
3636 | $cat <<EOM | |
3637 | ||
3638 | There's also a Policy hint file available, which should make the | |
3639 | site-specific (policy) questions easier to answer. | |
3640 | EOM | |
3641 | ||
3642 | fi | |
3643 | ||
2304df62 AD |
3644 | $cat <<EOM |
3645 | ||
3646 | You may give one or more space-separated answers, or "none" if appropriate. | |
a2d23ec2 MB |
3647 | If you have a handcrafted Policy.sh file or a Policy.sh file generated by a |
3648 | previous run of Configure, you may specify it as well as or instead of | |
3649 | OS-specific hints. If hints are provided for your OS, you should use them: | |
3650 | although Perl can probably be built without hints on many platforms, using | |
3651 | hints often improve performance and may enable features that Configure can't | |
3652 | set up on its own. If there are no hints that match your OS, specify "none"; | |
3653 | DO NOT give a wrong version or a wrong OS. | |
2304df62 AD |
3654 | |
3655 | EOM | |
4e2a5f63 | 3656 | |
2304df62 | 3657 | rp="Which of these apply, if any?" |
dfe9444c | 3658 | . UU/myread |
85e6fe83 LW |
3659 | tans=$ans |
3660 | for file in $tans; do | |
4e2a5f63 AD |
3661 | if $test X$file = XPolicy -a -f Policy.sh; then |
3662 | . Policy.sh | |
3663 | $cat Policy.sh >> UU/config.sh | |
3664 | elif $test -f $src/hints/$file.sh; then | |
dfe9444c AD |
3665 | . $src/hints/$file.sh |
3666 | $cat $src/hints/$file.sh >> UU/config.sh | |
5440bc8e | 3667 | elif $test X"$tans" = X -o X"$tans" = Xnone ; then |
2304df62 AD |
3668 | : nothing |
3669 | else | |
85e6fe83 LW |
3670 | : Give one chance to correct a possible typo. |
3671 | echo "$file.sh does not exist" | |
3672 | dflt=$file | |
3673 | rp="hint to use instead?" | |
dfe9444c | 3674 | . UU/myread |
85e6fe83 | 3675 | for file in $ans; do |
dfe9444c AD |
3676 | if $test -f "$src/hints/$file.sh"; then |
3677 | . $src/hints/$file.sh | |
3678 | $cat $src/hints/$file.sh >> UU/config.sh | |
85e6fe83 LW |
3679 | elif $test X$ans = X -o X$ans = Xnone ; then |
3680 | : nothing | |
3681 | else | |
3682 | echo "$file.sh does not exist -- ignored." | |
3683 | fi | |
3684 | done | |
2304df62 AD |
3685 | fi |
3686 | done | |
85e6fe83 | 3687 | |
2304df62 | 3688 | hint=recommended |
85e6fe83 | 3689 | : Remember our hint file for later. |
dfe9444c | 3690 | if $test -f "$src/hints/$file.sh" ; then |
a0d0e21e | 3691 | hintfile="$file" |
85e6fe83 | 3692 | else |
a0d0e21e | 3693 | hintfile='' |
85e6fe83 | 3694 | fi |
2304df62 AD |
3695 | fi |
3696 | cd UU | |
3697 | ;; | |
3698 | *) | |
3699 | echo " " | |
3700 | echo "Fetching default answers from $config_sh..." >&4 | |
ecfc5424 AD |
3701 | tmp_n="$n" |
3702 | tmp_c="$c" | |
2304df62 AD |
3703 | cd .. |
3704 | cp $config_sh config.sh 2>/dev/null | |
a78b0d02 | 3705 | chmod +w config.sh |
2304df62 AD |
3706 | . ./config.sh |
3707 | cd UU | |
3708 | cp ../config.sh . | |
ecfc5424 AD |
3709 | n="$tmp_n" |
3710 | c="$tmp_c" | |
2304df62 AD |
3711 | hint=previous |
3712 | ;; | |
3713 | esac | |
1aef975c | 3714 | test "$override" && . ./optdef.sh |
2304df62 AD |
3715 | |
3716 | : Restore computed paths | |
3717 | for file in $loclist $trylist; do | |
3718 | eval $file="\$_$file" | |
3719 | done | |
3720 | ||
85e6fe83 | 3721 | cat << EOM |
a0d0e21e | 3722 | |
85e6fe83 | 3723 | Configure uses the operating system name and version to set some defaults. |
ecfc5424 AD |
3724 | The default value is probably right if the name rings a bell. Otherwise, |
3725 | since spelling matters for me, either accept the default or answer "none" | |
3726 | to leave it blank. | |
a0d0e21e | 3727 | |
85e6fe83 | 3728 | EOM |
85e6fe83 | 3729 | case "$osname" in |
a0d0e21e | 3730 | ''|' ') |
85e6fe83 | 3731 | case "$hintfile" in |
a0d0e21e | 3732 | ''|' '|none) dflt=none ;; |
ecfc5424 | 3733 | *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;; |
85e6fe83 LW |
3734 | esac |
3735 | ;; | |
3736 | *) dflt="$osname" ;; | |
3737 | esac | |
3738 | rp="Operating system name?" | |
3739 | . ./myread | |
3740 | case "$ans" in | |
ecfc5424 AD |
3741 | none) osname='' ;; |
3742 | *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;; | |
85e6fe83 | 3743 | esac |
8ff267be PP |
3744 | echo " " |
3745 | case "$osvers" in | |
3746 | ''|' ') | |
3747 | case "$hintfile" in | |
3748 | ''|' '|none) dflt=none ;; | |
3749 | *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'` | |
3750 | dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'` | |
3751 | case "$dflt" in | |
3752 | ''|' ') dflt=none ;; | |
3753 | esac | |
3754 | ;; | |
3755 | esac | |
3756 | ;; | |
3757 | *) dflt="$osvers" ;; | |
3758 | esac | |
3759 | rp="Operating system version?" | |
3760 | . ./myread | |
3761 | case "$ans" in | |
3762 | none) osvers='' ;; | |
3763 | *) osvers="$ans" ;; | |
3764 | esac | |
3765 | ||
02e93a22 JH |
3766 | |
3767 | . ./posthint.sh | |
3768 | ||
2304df62 | 3769 | : who configured the system |
59b83a6f | 3770 | cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` |
dfe9444c AD |
3771 | case "$cf_by" in |
3772 | "") | |
7c04078e | 3773 | cf_by=`(logname) 2>/dev/null` |
dfe9444c | 3774 | case "$cf_by" in |
7c04078e GA |
3775 | "") |
3776 | cf_by=`(whoami) 2>/dev/null` | |
3777 | case "$cf_by" in | |
3778 | "") cf_by=unknown ;; | |
3779 | esac ;; | |
8ff267be PP |
3780 | esac ;; |
3781 | esac | |
2304df62 | 3782 | |
f3f1a2d8 MB |
3783 | : decide how portable to be. Allow command line overrides. |
3784 | case "$d_portable" in | |
3785 | "$undef") ;; | |
3786 | *) d_portable="$define" ;; | |
b4eb6b3d | 3787 | esac |
b4eb6b3d | 3788 | |
f3f1a2d8 MB |
3789 | : set up shell script to do ~ expansion |
3790 | cat >filexp <<EOSS | |
3791 | $startsh | |
3792 | : expand filename | |
3793 | case "\$1" in | |
f16e9d76 | 3794 | \~/*|\~) |
f3f1a2d8 MB |
3795 | echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|" |
3796 | ;; | |
4137585d | 3797 | \~*) |
f3f1a2d8 MB |
3798 | if $test -f /bin/csh; then |
3799 | /bin/csh -f -c "glob \$1" | |
3800 | failed=\$? | |
3801 | echo "" | |
3802 | exit \$failed | |
3803 | else | |
3804 | name=\`$expr x\$1 : '..\([^/]*\)'\` | |
3805 | dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\` | |
3806 | if $test ! -d "\$dir"; then | |
3807 | me=\`basename \$0\` | |
3808 | echo "\$me: can't locate home directory for: \$name" >&2 | |
3809 | exit 1 | |
3810 | fi | |
3811 | case "\$1" in | |
3812 | */*) | |
3813 | echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` | |
3814 | ;; | |
3815 | *) | |
3816 | echo \$dir | |