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