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