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