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 | # |
91fc0aa5 | 23 | # Generated on Thu Feb 26 10:02:07 MET 2004 [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='' | |
8d2cbf27 JH |
1075 | installsitehtml1dir='' |
1076 | sitehtml1dir='' | |
1077 | sitehtml1direxp='' | |
1078 | installsitehtml3dir='' | |
1079 | sitehtml3dir='' | |
1080 | sitehtml3direxp='' | |
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='' | |
8d2cbf27 JH |
1149 | installvendorhtml1dir='' |
1150 | vendorhtml1dir='' | |
1151 | vendorhtml1direxp='' | |
1152 | installvendorhtml3dir='' | |
1153 | vendorhtml3dir='' | |
1154 | vendorhtml3direxp='' | |
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='' | |
3659ebf1 JH |
1176 | yacc='' |
1177 | yaccflags='' | |
2304df62 AD |
1178 | CONFIG='' |
1179 | ||
ecfc5424 AD |
1180 | define='define' |
1181 | undef='undef' | |
1182 | smallmach='pdp11 i8086 z8000 i80286 iAPX286' | |
1183 | rmlist='' | |
1184 | ||
1185 | : We must find out about Eunice early | |
1186 | eunicefix=':' | |
1187 | if test -f /etc/unixtovms; then | |
1188 | eunicefix=/etc/unixtovms | |
1189 | fi | |
1190 | if test -f /etc/unixtovms.exe; then | |
1191 | eunicefix=/etc/unixtovms.exe | |
1192 | fi | |
1193 | ||
cfb04860 | 1194 | : Set executable suffix now -- needed before hints available |
6153ba32 PG |
1195 | if test -f "/libs/version.library"; then |
1196 | : Amiga OS | |
1197 | _exe="" | |
1198 | elif test -f "/system/gnu_library/bin/ar.pm"; then | |
1199 | : Stratus VOS | |
cfb04860 | 1200 | _exe=".pm" |
6153ba32 PG |
1201 | elif test -n "$DJGPP"; then |
1202 | : DOS DJGPP | |
cfb04860 | 1203 | _exe=".exe" |
5c728af0 | 1204 | elif test -d c:/. -o -n "$is_os2" ; then |
506faf56 | 1205 | : OS/2 or cygwin |
ba863942 JH |
1206 | _exe=".exe" |
1207 | fi | |
868439a2 | 1208 | |
b4eb6b3d | 1209 | i_whoami='' |
9da7673b MB |
1210 | ccname='' |
1211 | ccversion='' | |
1212 | perllibs='' | |
1213 | : set useposix=false in your hint file to disable the POSIX extension. | |
1214 | useposix=true | |
1215 | : set useopcode=false in your hint file to disable the Opcode extension. | |
1216 | useopcode=true | |
1217 | : Trailing extension. Override this in a hint file, if needed. | |
1218 | : Extra object files, if any, needed on this platform. | |
1219 | archobjs='' | |
1220 | archname='' | |
ff935051 JH |
1221 | : Possible local include directories to search. |
1222 | : Set locincpth to "" in a hint file to defeat local include searches. | |
1223 | locincpth="/usr/local/include /opt/local/include /usr/gnu/include" | |
1224 | locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" | |
1225 | : | |
1226 | : no include file wanted by default | |
1227 | inclwanted='' | |
1228 | ||
b4eb6b3d | 1229 | groupstype='' |
64615a5e | 1230 | libnames='' |
732c9516 JH |
1231 | : change the next line if compiling for Xenix/286 on Xenix/386 |
1232 | xlibpth='/usr/lib/386 /lib/386' | |
732c9516 JH |
1233 | : Possible local library directories to search. |
1234 | loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" | |
1235 | loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" | |
1236 | ||
1237 | : general looking path for locating libraries | |
5869b1f1 | 1238 | glibpth="/lib /usr/lib $xlibpth" |
732c9516 | 1239 | glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" |
f7dd4e7f JH |
1240 | test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" |
1241 | test -f /shlib/libc.so && glibpth="/shlib $glibpth" | |
732c9516 JH |
1242 | |
1243 | : Private path used by Configure to find libraries. Its value | |
1244 | : is prepended to libpth. This variable takes care of special | |
1245 | : machines, like the mips. Usually, it should be empty. | |
1246 | plibpth='' | |
1247 | ||
1cfa4ec7 GS |
1248 | : default library list |
1249 | libswanted='' | |
921b2963 | 1250 | : some systems want to use only the non-versioned libso:s |
1cfa4ec7 | 1251 | ignore_versioned_solibs='' |
9da7673b MB |
1252 | siteman1dir='' |
1253 | siteman3dir='' | |
1254 | sitescript='' | |
b4eb6b3d JH |
1255 | archname64='' |
1256 | ccflags_uselargefiles='' | |
1257 | ldflags_uselargefiles='' | |
1258 | libswanted_uselargefiles='' | |
1259 | : set usemultiplicity on the Configure command line to enable multiplicity. | |
29209bc5 | 1260 | : set usesocks on the Configure command line to enable socks. |
b4eb6b3d | 1261 | : set usethreads on the Configure command line to enable threads. |
cd040c5e | 1262 | usereentrant='undef' |
9da7673b MB |
1263 | : full support for void wanted by default |
1264 | defvoidused=15 | |
1265 | ||
ecfc5424 | 1266 | : List of libraries we want. |
15431986 | 1267 | : If anyone needs extra -lxxx, put those in a hint file. |
6bdd71ef AB |
1268 | libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun" |
1269 | libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" | |
1aef975c | 1270 | : We probably want to search /usr/shlib before most other libraries. |
94b6baf5 | 1271 | : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. |
ecfc5424 AD |
1272 | glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` |
1273 | glibpth="/usr/shlib $glibpth" | |
1274 | : Do not use vfork unless overridden by a hint file. | |
1275 | usevfork=false | |
1276 | ||
8ff267be PP |
1277 | : Find the basic shell for Bourne shell scripts |
1278 | case "$sh" in | |
1279 | '') | |
8ff267be PP |
1280 | case "$SYSTYPE" in |
1281 | *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";; | |
1282 | *) xxx='/bin/sh';; | |
1283 | esac | |
1284 | if test -f "$xxx"; then | |
1285 | sh="$xxx" | |
1286 | else | |
1287 | : Build up a list and do a single loop so we can 'break' out. | |
1288 | pth=`echo $PATH | sed -e "s/$p_/ /g"` | |
1289 | for xxx in sh bash ksh pdksh ash; do | |
1290 | for p in $pth; do | |
1291 | try="$try ${p}/${xxx}" | |
1292 | done | |
1293 | done | |
1294 | for xxx in $try; do | |
1295 | if test -f "$xxx"; then | |
1296 | sh="$xxx"; | |
8ff267be | 1297 | break |
a5a94ea5 JH |
1298 | elif test "X$_exe" != X -a -f "$xxx$_exe"; then |
1299 | sh="$xxx"; | |
1300 | break | |
8ff267be PP |
1301 | elif test -f "$xxx.exe"; then |
1302 | sh="$xxx"; | |
8ff267be PP |
1303 | break |
1304 | fi | |
1305 | done | |
1306 | fi | |
1307 | ;; | |
1308 | esac | |
1309 | ||
1310 | case "$sh" in | |
a33c94aa | 1311 | '') cat >&2 <<EOM |
8ff267be | 1312 | $me: Fatal Error: I can't find a Bourne Shell anywhere. |
dfe9444c | 1313 | |
8ff267be | 1314 | Usually it's in /bin/sh. How did you even get this far? |
7f2de2d2 | 1315 | Please contact me (Perl Maintainers) at perlbug@perl.org and |
dfe9444c | 1316 | we'll try to straighten this all out. |
8ff267be PP |
1317 | EOM |
1318 | exit 1 | |
1319 | ;; | |
1320 | esac | |
1321 | ||
760ac839 | 1322 | : see if sh knows # comments |
73614538 | 1323 | if `$sh -c '#' >/dev/null 2>&1`; then |
760ac839 LW |
1324 | shsharp=true |
1325 | spitshell=cat | |
760ac839 | 1326 | xcat=/bin/cat |
a931254c JH |
1327 | test -f $xcat$_exe || xcat=/usr/bin/cat |
1328 | if test ! -f $xcat$_exe; then | |
4bdb8fb5 | 1329 | for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do |
a931254c | 1330 | if test -f $p/cat$_exe; then |
1deb0a86 | 1331 | xcat=$p/cat |
3c728e00 JH |
1332 | break |
1333 | fi | |
1334 | done | |
1deb0a86 JH |
1335 | if test ! -f $xcat$_exe; then |
1336 | echo "Can't find cat anywhere!" | |
3c728e00 JH |
1337 | exit 1 |
1338 | fi | |
1339 | fi | |
5440bc8e JH |
1340 | echo "#!$xcat" >sharp |
1341 | $eunicefix sharp | |
1342 | chmod +x sharp | |
1343 | ./sharp > today | |
760ac839 | 1344 | if test -s today; then |
760ac839 LW |
1345 | sharpbang='#!' |
1346 | else | |
5440bc8e JH |
1347 | echo "#! $xcat" > sharp |
1348 | $eunicefix sharp | |
1349 | chmod +x sharp | |
1350 | ./sharp > today | |
760ac839 | 1351 | if test -s today; then |
760ac839 LW |
1352 | sharpbang='#! ' |
1353 | else | |
760ac839 LW |
1354 | sharpbang=': use ' |
1355 | fi | |
1356 | fi | |
1357 | else | |
dfe9444c | 1358 | echo " " |
8ff267be | 1359 | echo "Your $sh doesn't grok # comments--I will strip them later on." |
760ac839 LW |
1360 | shsharp=false |
1361 | cd .. | |
1362 | echo "exec grep -v '^[ ]*#'" >spitshell | |
1363 | chmod +x spitshell | |
1364 | $eunicefix spitshell | |
1365 | spitshell=`pwd`/spitshell | |
1366 | cd UU | |
1367 | echo "I presume that if # doesn't work, #! won't work either!" | |
1368 | sharpbang=': use ' | |
1369 | fi | |
5440bc8e | 1370 | rm -f sharp today |
760ac839 LW |
1371 | |
1372 | : figure out how to guarantee sh startup | |
8ff267be PP |
1373 | case "$startsh" in |
1374 | '') startsh=${sharpbang}${sh} ;; | |
1375 | *) | |
760ac839 | 1376 | esac |
5440bc8e | 1377 | cat >sharp <<EOSS |
760ac839 LW |
1378 | $startsh |
1379 | set abc | |
1380 | test "$?abc" != 1 | |
1381 | EOSS | |
1382 | ||
5440bc8e JH |
1383 | chmod +x sharp |
1384 | $eunicefix sharp | |
1385 | if ./sharp; then | |
8ff267be | 1386 | : echo "Yup, it does." |
760ac839 | 1387 | else |
dfe9444c AD |
1388 | echo "Hmm... '$startsh' does not guarantee sh startup..." |
1389 | echo "You may have to fix up the shell scripts to make sure $sh runs them." | |
760ac839 | 1390 | fi |
5440bc8e | 1391 | rm -f sharp |
760ac839 | 1392 | |
aebf16e7 AD |
1393 | |
1394 | : Save command line options in file UU/cmdline.opt for later use in | |
1395 | : generating config.sh. | |
1396 | cat > cmdline.opt <<EOSH | |
1397 | # Configure command line arguments. | |
1398 | config_arg0='$0' | |
1399 | config_args='$*' | |
1400 | config_argc=$# | |
1401 | EOSH | |
1402 | argn=1 | |
ee45ea83 IZ |
1403 | args_exp='' |
1404 | args_sep='' | |
aebf16e7 AD |
1405 | for arg in "$@"; do |
1406 | cat >>cmdline.opt <<EOSH | |
1407 | config_arg$argn='$arg' | |
1408 | EOSH | |
ee45ea83 IZ |
1409 | # Extreme backslashitis: replace each ' by '"'"' |
1410 | cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt | |
1411 | $arg | |
1412 | EOC | |
1413 | arg_exp=`cat cmdl.opt` | |
1414 | args_exp="$args_exp$args_sep'$arg_exp'" | |
aebf16e7 | 1415 | argn=`expr $argn + 1` |
ee45ea83 | 1416 | args_sep=' ' |
aebf16e7 | 1417 | done |
ee45ea83 IZ |
1418 | # args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@" |
1419 | # used by ./hints/os2.sh | |
1420 | rm -f cmdl.opt | |
aebf16e7 | 1421 | |
2304df62 AD |
1422 | : produce awk script to parse command line options |
1423 | cat >options.awk <<'EOF' | |
1424 | BEGIN { | |
02e93a22 | 1425 | optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification |
2304df62 AD |
1426 | |
1427 | len = length(optstr); | |
1428 | for (i = 1; i <= len; i++) { | |
1429 | c = substr(optstr, i, 1); | |
1430 | if (i < len) a = substr(optstr, i + 1, 1); else a = ""; | |
1431 | if (a == ":") { | |
1432 | arg[c] = 1; | |
1433 | i++; | |
1434 | } | |
1435 | opt[c] = 1; | |
1436 | } | |
1437 | } | |
1438 | { | |
1439 | expect = 0; | |
1440 | str = $0; | |
1441 | if (substr(str, 1, 1) != "-") { | |
1442 | printf("'%s'\n", str); | |
1443 | next; | |
1444 | } | |
1445 | len = length($0); | |
1446 | for (i = 2; i <= len; i++) { | |
1447 | c = substr(str, i, 1); | |
1448 | if (!opt[c]) { | |
1449 | printf("-%s\n", substr(str, i)); | |
1450 | next; | |
1451 | } | |
1452 | printf("-%s\n", c); | |
1453 | if (arg[c]) { | |
1454 | if (i < len) | |
1455 | printf("'%s'\n", substr(str, i + 1)); | |
1456 | else | |
1457 | expect = 1; | |
1458 | next; | |
1459 | } | |
1460 | } | |
1461 | } | |
1462 | END { | |
1463 | if (expect) | |
1464 | print "?"; | |
1465 | } | |
1466 | EOF | |
1467 | ||
1468 | : process the command line options | |
4633a7c4 LW |
1469 | set X `for arg in "$@"; do echo "X$arg"; done | |
1470 | sed -e s/X// | awk -f options.awk` | |
2304df62 AD |
1471 | eval "set $*" |
1472 | shift | |
1473 | rm -f options.awk | |
1474 | ||
1475 | : set up default values | |
1476 | fastread='' | |
1477 | reuseval=false | |
1478 | config_sh='' | |
1479 | alldone='' | |
1480 | error='' | |
1481 | silent='' | |
1482 | extractsh='' | |
ecfc5424 | 1483 | override='' |
16d20bd9 | 1484 | knowitall='' |
02e93a22 | 1485 | rm -f optdef.sh posthint.sh |
28757baa PP |
1486 | cat >optdef.sh <<EOS |
1487 | $startsh | |
1488 | EOS | |
2304df62 | 1489 | |
dfe9444c | 1490 | |
2304df62 AD |
1491 | : option parsing |
1492 | while test $# -gt 0; do | |
1493 | case "$1" in | |
1494 | -d) shift; fastread=yes;; | |
1495 | -e) shift; alldone=cont;; | |
1496 | -f) | |
1497 | shift | |
1498 | cd .. | |
1499 | if test -r "$1"; then | |
1500 | config_sh="$1" | |
1501 | else | |
a0d0e21e | 1502 | echo "$me: cannot read config file $1." >&2 |
2304df62 AD |
1503 | error=true |
1504 | fi | |
1505 | cd UU | |
1506 | shift;; | |
1507 | -h) shift; error=true;; | |
1508 | -r) shift; reuseval=true;; | |
dfe9444c | 1509 | -s) shift; silent=true; realsilent=true;; |
2304df62 | 1510 | -E) shift; alldone=exit;; |
16d20bd9 | 1511 | -K) shift; knowitall=true;; |
ecfc5424 | 1512 | -O) shift; override=true;; |
dfe9444c | 1513 | -S) shift; silent=true; extractsh=true;; |
a0d0e21e LW |
1514 | -D) |
1515 | shift | |
1516 | case "$1" in | |
1517 | *=) | |
1518 | echo "$me: use '-U symbol=', not '-D symbol='." >&2 | |
1519 | echo "$me: ignoring -D $1" >&2 | |
1520 | ;; | |
ecfc5424 | 1521 | *=*) echo "$1" | \ |
1aef975c AD |
1522 | sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; |
1523 | *) echo "$1='define'" >> optdef.sh;; | |
a0d0e21e LW |
1524 | esac |
1525 | shift | |
1526 | ;; | |
1527 | -U) | |
1528 | shift | |
1529 | case "$1" in | |
1aef975c | 1530 | *=) echo "$1" >> optdef.sh;; |
a0d0e21e LW |
1531 | *=*) |
1532 | echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2 | |
1533 | echo "$me: ignoring -U $1" >&2 | |
1534 | ;; | |
1aef975c | 1535 | *) echo "$1='undef'" >> optdef.sh;; |
a0d0e21e LW |
1536 | esac |
1537 | shift | |
1538 | ;; | |
02e93a22 JH |
1539 | -A) |
1540 | shift | |
1541 | xxx='' | |
1542 | yyy="$1" | |
02e93a22 | 1543 | zzz='' |
5f83a3e9 | 1544 | uuu=undef |
02e93a22 | 1545 | case "$yyy" in |
f7c31117 | 1546 | *=*) zzz=`echo "$yyy"|sed 's!=.*!!'` |
5f83a3e9 JH |
1547 | case "$zzz" in |
1548 | *:*) zzz='' ;; | |
1549 | *) xxx=append | |
f7c31117 JH |
1550 | zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'` |
1551 | yyy=`echo "$yyy"|sed 's!=.*!!'` ;; | |
5f83a3e9 JH |
1552 | esac |
1553 | ;; | |
1554 | esac | |
1555 | case "$xxx" in | |
1556 | '') case "$yyy" in | |
f7c31117 JH |
1557 | *:*) xxx=`echo "$yyy"|sed 's!:.*!!'` |
1558 | yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` | |
1559 | zzz=`echo "$yyy"|sed 's!^[^=]*=!!'` | |
1560 | yyy=`echo "$yyy"|sed 's!=.*!!'` ;; | |
1561 | *) xxx=`echo "$yyy"|sed 's!:.*!!'` | |
1562 | yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;; | |
5f83a3e9 JH |
1563 | esac |
1564 | ;; | |
1565 | esac | |
02e93a22 JH |
1566 | case "$xxx" in |
1567 | append) | |
5f83a3e9 | 1568 | echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;; |
02e93a22 | 1569 | clear) |
5f83a3e9 | 1570 | echo "$yyy=''" >> posthint.sh ;; |
02e93a22 JH |
1571 | define) |
1572 | case "$zzz" in | |
1573 | '') zzz=define ;; | |
1574 | esac | |
5f83a3e9 | 1575 | echo "$yyy='$zzz'" >> posthint.sh ;; |
02e93a22 | 1576 | eval) |
5f83a3e9 | 1577 | echo "eval \"$yyy=$zzz\"" >> posthint.sh ;; |
02e93a22 | 1578 | prepend) |
5f83a3e9 | 1579 | echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;; |
02e93a22 JH |
1580 | undef) |
1581 | case "$zzz" in | |
1582 | '') zzz="$uuu" ;; | |
1583 | esac | |
5f83a3e9 JH |
1584 | echo "$yyy=$zzz" >> posthint.sh ;; |
1585 | *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;; | |
02e93a22 | 1586 | esac |
bde6b06b | 1587 | shift |
02e93a22 | 1588 | ;; |
dfe9444c | 1589 | -V) echo "$me generated by metaconfig 3.0 PL70." >&2 |
5f83a3e9 | 1590 | exit 0;; |
2304df62 | 1591 | --) break;; |
a0d0e21e | 1592 | -*) echo "$me: unknown option $1" >&2; shift; error=true;; |
2304df62 AD |
1593 | *) break;; |
1594 | esac | |
1595 | done | |
1596 | ||
1597 | case "$error" in | |
1598 | true) | |
1599 | cat >&2 <<EOM | |
2afac517 | 1600 | Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value] |
02e93a22 | 1601 | [-U symbol] [-U symbol=] [-A command:symbol...] |
2304df62 AD |
1602 | -d : use defaults for all answers. |
1603 | -e : go on without questioning past the production of config.sh. | |
1604 | -f : specify an alternate default configuration file. | |
1605 | -h : print this help message and exit (with an error status). | |
1606 | -r : reuse C symbols value if possible (skips costly nm extraction). | |
1607 | -s : silent mode, only echoes questions and essential information. | |
a0d0e21e LW |
1608 | -D : define symbol to have some value: |
1609 | -D symbol symbol gets the value 'define' | |
1610 | -D symbol=value symbol gets the value 'value' | |
2304df62 | 1611 | -E : stop at the end of questions, after having produced config.sh. |
16d20bd9 | 1612 | -K : do not use unless you know what you are doing. |
ecfc5424 | 1613 | -O : let -D and -U override definitions from loaded configuration file. |
2304df62 | 1614 | -S : perform variable substitutions on all .SH files (can mix with -f) |
a0d0e21e LW |
1615 | -U : undefine symbol: |
1616 | -U symbol symbol gets the value 'undef' | |
1617 | -U symbol= symbol gets completely empty | |
02e93a22 | 1618 | -A : manipulate symbol after the platform specific hints have been applied: |
5f83a3e9 | 1619 | -A symbol=value append " "value to symbol |
02e93a22 JH |
1620 | -A append:symbol=value append value to symbol |
1621 | -A define:symbol=value define symbol to have value | |
02e93a22 JH |
1622 | -A clear:symbol define symbol to be '' |
1623 | -A define:symbol define symbol to be 'define' | |
1624 | -A eval:symbol=value define symbol to be eval of value | |
1625 | -A prepend:symbol=value prepend value to symbol | |
1626 | -A undef:symbol define symbol to be 'undef' | |
1627 | -A undef:symbol= define symbol to be '' | |
2304df62 AD |
1628 | -V : print version number and exit (with a zero status). |
1629 | EOM | |
1630 | exit 1 | |
1631 | ;; | |
1632 | esac | |
1633 | ||
dfe9444c AD |
1634 | : Sanity checks |
1635 | case "$fastread$alldone" in | |
1636 | yescont|yesexit) ;; | |
1637 | *) | |
aaeb8e51 GS |
1638 | case "$extractsh" in |
1639 | true) ;; | |
1640 | *) | |
1641 | if test ! -t 0; then | |
1642 | echo "Say 'sh Configure', not 'sh <Configure'" | |
1643 | exit 1 | |
1644 | fi | |
1645 | ;; | |
1646 | esac | |
dfe9444c AD |
1647 | ;; |
1648 | esac | |
1649 | ||
2304df62 AD |
1650 | exec 4>&1 |
1651 | case "$silent" in | |
1652 | true) exec 1>/dev/null;; | |
1653 | esac | |
1654 | ||
ecfc5424 | 1655 | : run the defines and the undefines, if any, but leave the file out there... |
1aef975c AD |
1656 | touch optdef.sh |
1657 | . ./optdef.sh | |
02e93a22 JH |
1658 | : create the posthint manipulation script and leave the file out there... |
1659 | touch posthint.sh | |
a0d0e21e | 1660 | |
2304df62 | 1661 | : set package name |
85e6fe83 | 1662 | package=perl5 |
b4eb6b3d JH |
1663 | first=`echo $package | sed -e 's/^\(.\).*/\1/'` |
1664 | last=`echo $package | sed -e 's/^.\(.*\)/\1/'` | |
1665 | case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in | |
1666 | ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;; | |
1667 | *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;; | |
1668 | esac | |
2304df62 | 1669 | |
2304df62 AD |
1670 | : Some greps do not return status, grrr. |
1671 | echo "grimblepritz" >grimble | |
1672 | if grep blurfldyick grimble >/dev/null 2>&1 ; then | |
1673 | contains=contains | |
1674 | elif grep grimblepritz grimble >/dev/null 2>&1 ; then | |
1675 | contains=grep | |
1676 | else | |
1677 | contains=contains | |
1678 | fi | |
1679 | rm -f grimble | |
1680 | : the following should work in any shell | |
1681 | case "$contains" in | |
1682 | contains*) | |
1683 | echo " " | |
1684 | echo "AGH! Grep doesn't return a status. Attempting remedial action." | |
1685 | cat >contains <<'EOSS' | |
1686 | grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp | |
1687 | EOSS | |
1688 | chmod +x contains | |
1689 | esac | |
1690 | ||
dfe9444c AD |
1691 | : Find the path to the source tree |
1692 | case "$src" in | |
1693 | '') case "$0" in | |
b233458b JH |
1694 | */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` |
1695 | case "$src" in | |
1696 | /*) ;; | |
8504afb7 | 1697 | .) ;; |
b233458b JH |
1698 | *) src=`cd ../$src && pwd` ;; |
1699 | esac | |
1700 | ;; | |
dfe9444c AD |
1701 | *) src='.';; |
1702 | esac;; | |
1703 | esac | |
1704 | case "$src" in | |
1705 | '') src=/ | |
1706 | rsrc=/ | |
1707 | ;; | |
1708 | /*) rsrc="$src";; | |
1709 | *) rsrc="../$src";; | |
1710 | esac | |
1711 | if test -f $rsrc/Configure && \ | |
1712 | $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1 | |
1713 | then | |
1714 | : found it, so we are ok. | |
1715 | else | |
1716 | rsrc='' | |
1717 | for src in . .. ../.. ../../.. ../../../..; do | |
1718 | if test -f ../$src/Configure && \ | |
1719 | $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1 | |
1720 | then | |
1721 | rsrc=../$src | |
1722 | break | |
1723 | fi | |
1724 | done | |
1725 | fi | |
1726 | case "$rsrc" in | |
1727 | '') | |
1728 | cat <<EOM >&4 | |
1729 | ||
1730 | Sorry, I can't seem to locate the source dir for $package. Please start | |
1731 | Configure with an explicit path -- i.e. /some/path/Configure. | |
1732 | ||
1733 | EOM | |
1734 | exit 1 | |
1735 | ;; | |
1736 | ../.) rsrc='..';; | |
1737 | *) | |
1738 | echo " " | |
1739 | echo "Sources for $package found in \"$src\"." >&4 | |
1740 | ;; | |
1741 | esac | |
1742 | ||
1743 | : script used to extract .SH files with variable substitutions | |
1744 | cat >extract <<'EOS' | |
a02608de | 1745 | PERL_CONFIG_SH=true |
dfe9444c | 1746 | echo "Doing variable substitutions on .SH files..." |
24ccb310 JH |
1747 | if test -f MANIFEST; then |
1748 | set x `awk '{print $1}' < MANIFEST | grep '\.SH$'` | |
dfe9444c AD |
1749 | else |
1750 | echo "(Looking for .SH files under the source directory.)" | |
6904989c | 1751 | set x `(cd "$src"; find . -name "*.SH" -print)` |
dfe9444c AD |
1752 | fi |
1753 | shift | |
1754 | case $# in | |
6904989c | 1755 | 0) set x `(cd "$src"; echo *.SH)`; shift;; |
dfe9444c | 1756 | esac |
6904989c | 1757 | if test ! -f "$src/$1"; then |
dfe9444c AD |
1758 | shift |
1759 | fi | |
1760 | mkdir_p=' | |
1761 | name=$1; | |
1762 | create=""; | |
1763 | while test $name; do | |
1764 | if test ! -d "$name"; then | |
1765 | create="$name $create"; | |
1766 | name=`echo $name | sed -e "s|^[^/]*$||"`; | |
1767 | name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`; | |
1768 | else | |
1769 | name=""; | |
1770 | fi; | |
1771 | done; | |
1772 | for file in $create; do | |
1773 | mkdir $file; | |
1774 | done | |
1775 | ' | |
1776 | for file in $*; do | |
1777 | case "$src" in | |
1778 | ".") | |
1779 | case "$file" in | |
1780 | */*) | |
1781 | dir=`expr X$file : 'X\(.*\)/'` | |
1782 | file=`expr X$file : 'X.*/\(.*\)'` | |
6904989c | 1783 | (cd "$dir" && . ./$file) |
dfe9444c AD |
1784 | ;; |
1785 | *) | |
1786 | . ./$file | |
1787 | ;; | |
1788 | esac | |
1789 | ;; | |
1790 | *) | |
1791 | case "$file" in | |
1792 | */*) | |
1793 | dir=`expr X$file : 'X\(.*\)/'` | |
1794 | file=`expr X$file : 'X.*/\(.*\)'` | |
1795 | (set x $dir; shift; eval $mkdir_p) | |
6904989c | 1796 | sh <"$src/$dir/$file" |
dfe9444c AD |
1797 | ;; |
1798 | *) | |
6904989c | 1799 | sh <"$src/$file" |
dfe9444c AD |
1800 | ;; |
1801 | esac | |
1802 | ;; | |
1803 | esac | |
1804 | done | |
6904989c | 1805 | if test -f "$src/config_h.SH"; then |
dfe9444c AD |
1806 | if test ! -f config.h; then |
1807 | : oops, they left it out of MANIFEST, probably, so do it anyway. | |
6904989c | 1808 | . "$src/config_h.SH" |
dfe9444c AD |
1809 | fi |
1810 | fi | |
1811 | EOS | |
1812 | ||
1813 | : extract files and exit if asked to do so | |
1814 | case "$extractsh" in | |
1815 | true) | |
1816 | case "$realsilent" in | |
1817 | true) ;; | |
1818 | *) exec 1>&4;; | |
1819 | esac | |
1820 | case "$config_sh" in | |
1821 | '') config_sh='config.sh';; | |
1822 | esac | |
1823 | echo " " | |
1824 | echo "Fetching answers from $config_sh..." | |
1825 | cd .. | |
1826 | . $config_sh | |
1827 | test "$override" && . ./optdef.sh | |
1828 | echo " " | |
1829 | . UU/extract | |
1830 | rm -rf UU | |
24ccb310 | 1831 | echo "Extraction done." |
dfe9444c AD |
1832 | exit 0 |
1833 | ;; | |
1834 | esac | |
1835 | ||
1836 | : Eunice requires " " instead of "", can you believe it | |
1837 | echo " " | |
1838 | : Here we go... | |
1839 | echo "Beginning of configuration questions for $package." | |
1840 | ||
1841 | trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15 | |
1842 | ||
2304df62 AD |
1843 | : first determine how to suppress newline on echo command |
1844 | echo " " | |
1845 | echo "Checking echo to see how to suppress newlines..." | |
1846 | (echo "hi there\c" ; echo " ") >.echotmp | |
1847 | if $contains c .echotmp >/dev/null 2>&1 ; then | |
1848 | echo "...using -n." | |
1849 | n='-n' | |
1850 | c='' | |
1851 | else | |
1852 | cat <<'EOM' | |
1853 | ...using \c | |
1854 | EOM | |
1855 | n='' | |
1856 | c='\c' | |
1857 | fi | |
1858 | echo $n "The star should be here-->$c" | |
1859 | echo '*' | |
1860 | rm -f .echotmp | |
1861 | ||
1862 | : Now test for existence of everything in MANIFEST | |
1863 | echo " " | |
6904989c | 1864 | if test -f "$rsrc/MANIFEST"; then |
2304df62 | 1865 | echo "First let's make sure your kit is complete. Checking..." >&4 |
4242830c | 1866 | awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50) |
2304df62 | 1867 | rm -f missing |
dfe9444c | 1868 | tmppwd=`pwd` |
2304df62 | 1869 | for filelist in x??; do |
6904989c | 1870 | (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing") |
2304df62 AD |
1871 | done |
1872 | if test -s missing; then | |
1873 | cat missing >&4 | |
1874 | cat >&4 <<'EOM' | |
1875 | ||
1876 | THIS PACKAGE SEEMS TO BE INCOMPLETE. | |
1877 | ||
1878 | You have the option of continuing the configuration process, despite the | |
1879 | distinct possibility that your kit is damaged, by typing 'y'es. If you | |
1880 | do, don't blame me if something goes wrong. I advise you to type 'n'o | |
7f2de2d2 | 1881 | and contact the author (perlbug@perl.org). |
2304df62 AD |
1882 | |
1883 | EOM | |
1884 | echo $n "Continue? [n] $c" >&4 | |
1885 | read ans | |
1886 | case "$ans" in | |
1887 | y*) | |
1888 | echo "Continuing..." >&4 | |
1889 | rm -f missing | |
1890 | ;; | |
1891 | *) | |
1892 | echo "ABORTING..." >&4 | |
1893 | kill $$ | |
1894 | ;; | |
1895 | esac | |
1896 | else | |
dfe9444c | 1897 | echo "Looks good..." |
2304df62 AD |
1898 | fi |
1899 | else | |
1900 | echo "There is no MANIFEST file. I hope your kit is complete !" | |
1901 | fi | |
1902 | rm -f missing x?? | |
1903 | ||
5ff3f7a4 GS |
1904 | echo " " |
1905 | : Find the appropriate value for a newline for tr | |
1906 | if test -n "$DJGPP"; then | |
1907 | trnl='\012' | |
1908 | fi | |
1909 | if test X"$trnl" = X; then | |
1910 | case "`echo foo|tr '\n' x 2>/dev/null`" in | |
1911 | foox) trnl='\n' ;; | |
1912 | esac | |
1913 | fi | |
1914 | if test X"$trnl" = X; then | |
1915 | case "`echo foo|tr '\012' x 2>/dev/null`" in | |
1916 | foox) trnl='\012' ;; | |
1917 | esac | |
1918 | fi | |
1919 | if test X"$trnl" = X; then | |
8be2c24c JH |
1920 | case "`echo foo|tr '\r\n' xy 2>/dev/null`" in |
1921 | fooxy) trnl='\n\r' ;; | |
1922 | esac | |
1923 | fi | |
1924 | if test X"$trnl" = X; then | |
5ff3f7a4 GS |
1925 | cat <<EOM >&2 |
1926 | ||
1927 | $me: Fatal Error: cannot figure out how to translate newlines with 'tr'. | |
1928 | ||
1929 | EOM | |
1930 | exit 1 | |
1931 | fi | |
1932 | ||
2304df62 AD |
1933 | : compute the number of columns on the terminal for proper question formatting |
1934 | case "$COLUMNS" in | |
1935 | '') COLUMNS='80';; | |
1936 | esac | |
1937 | ||
1938 | : set up the echo used in my read | |
1939 | myecho="case \"\$xxxm\" in | |
1940 | '') echo $n \"\$rp $c\" >&4;; | |
1941 | *) case \"\$rp\" in | |
1942 | '') echo $n \"[\$xxxm] $c\";; | |
1943 | *) | |
1944 | if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then | |
1945 | echo \"\$rp\" >&4 | |
1946 | echo $n \"[\$xxxm] $c\" >&4 | |
1947 | else | |
1948 | echo $n \"\$rp [\$xxxm] $c\" >&4 | |
1949 | fi | |
1950 | ;; | |
1951 | esac;; | |
1952 | esac" | |
1953 | ||
1954 | : now set up to do reads with possible shell escape and default assignment | |
1955 | cat <<EOSC >myread | |
28757baa | 1956 | $startsh |
2304df62 AD |
1957 | xxxm=\$dflt |
1958 | $myecho | |
1959 | ans='!' | |
1960 | case "\$fastread" in | |
1961 | yes) case "\$dflt" in | |
1962 | '') ;; | |
1963 | *) ans=''; | |
1964 | case "\$silent-\$rp" in | |
1965 | true-) ;; | |
1966 | *) echo " " >&4;; | |
1967 | esac;; | |
1968 | esac;; | |
1969 | *) case "\$silent" in | |
1970 | true) case "\$rp" in | |
1971 | '') ans='';; | |
1972 | esac;; | |
1973 | esac;; | |
1974 | esac | |
1975 | while expr "X\$ans" : "X!" >/dev/null; do | |
1976 | read answ | |
1977 | set x \$xxxm | |
1978 | shift | |
dfe9444c | 1979 | aok=''; eval "ans=\\"\$answ\\"" && aok=y |
2304df62 | 1980 | case "\$answ" in |
dfe9444c AD |
1981 | "!") |
1982 | sh 1>&4 | |
1983 | echo " " | |
1984 | $myecho | |
1985 | ;; | |
1986 | !*) | |
1987 | set x \`expr "X\$ans" : "X!\(.*\)\$"\` | |
1988 | shift | |
1989 | sh 1>&4 -c "\$*" | |
1990 | echo " " | |
1991 | $myecho | |
1992 | ;; | |
2304df62 AD |
1993 | "\$ans") |
1994 | case "\$ans" in | |
ecfc5424 AD |
1995 | \\&*) |
1996 | set x \`expr "X\$ans" : "X&\(.*\)\$"\` | |
1997 | shift | |
1998 | case "\$1" in | |
1999 | -d) | |
2000 | fastread=yes | |
40a7a20a | 2001 | echo "(OK, I'll run with -d after this question.)" >&4 |
ecfc5424 AD |
2002 | ;; |
2003 | -*) | |
40a7a20a | 2004 | echo "*** Sorry, \$1 not supported yet." >&4 |
ecfc5424 AD |
2005 | ;; |
2006 | esac | |
2007 | $myecho | |
2008 | ans=! | |
2009 | ;; | |
2304df62 AD |
2010 | esac;; |
2011 | *) | |
2012 | case "\$aok" in | |
2013 | y) | |
2014 | echo "*** Substitution done -- please confirm." | |
2015 | xxxm="\$ans" | |
c9795ab7 | 2016 | ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\` |
2304df62 AD |
2017 | xxxm="\$ans" |
2018 | ans=! | |
2019 | ;; | |
2020 | *) | |
2021 | echo "*** Error -- try again." | |
2022 | ans=! | |
2023 | ;; | |
2024 | esac | |
2025 | $myecho | |
2026 | ;; | |
2027 | esac | |
2028 | case "\$ans\$xxxm\$nostick" in | |
2029 | '') | |
2030 | ans=! | |
2031 | $myecho | |
2032 | ;; | |
2033 | esac | |
2034 | done | |
2035 | case "\$ans" in | |
2036 | '') ans="\$xxxm";; | |
2037 | esac | |
2038 | EOSC | |
2039 | ||
2040 | : create .config dir to save info across Configure sessions | |
2041 | test -d ../.config || mkdir ../.config | |
2042 | cat >../.config/README <<EOF | |
2043 | This directory created by Configure to save information that should | |
dfe9444c | 2044 | persist across sessions for $package. |
2304df62 AD |
2045 | |
2046 | You may safely delete it if you wish. | |
2047 | EOF | |
2048 | ||
9507cadf | 2049 | xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` |
af960fef | 2050 | case "$usedevel" in |
0107c034 | 2051 | $define|true|[yY]*) ;; |
9507cadf | 2052 | *) case "$xversion" in |
0107c034 JH |
2053 | *[13579]) |
2054 | cat >&4 <<EOH | |
2055 | *** WHOA THERE!!! *** | |
2056 | ||
2057 | This is an UNSTABLE DEVELOPMENT release. | |
9507cadf JH |
2058 | The version of this $package distribution is $xversion, that is, odd, |
2059 | (as opposed to even) and that signifies a development release. | |
3d5d58b1 | 2060 | If you want a maintenance release, you want an even-numbered version. |
0107c034 JH |
2061 | |
2062 | Do ***NOT*** install this into production use. | |
2063 | Data corruption and crashes are possible. | |
2064 | ||
2065 | It is most seriously suggested that you do not continue any further | |
2066 | unless you want to help in developing and debugging Perl. | |
2067 | ||
6adc6a45 JH |
2068 | If you *still* want to build perl, you can answer 'y' now, |
2069 | or pass -Dusedevel to Configure. | |
2070 | ||
0107c034 JH |
2071 | EOH |
2072 | rp='Do you really want to continue?' | |
2073 | dflt='n' | |
2074 | . ./myread | |
2075 | case "$ans" in | |
8feeef0e JH |
2076 | [yY]) echo >&4 "Okay, continuing." |
2077 | usedevel="$define" ;; | |
0107c034 JH |
2078 | *) echo >&4 "Okay, bye." |
2079 | exit 1 | |
2080 | ;; | |
2081 | esac | |
2082 | ;; | |
2083 | esac | |
2084 | ;; | |
2085 | esac | |
8feeef0e JH |
2086 | case "$usedevel" in |
2087 | $define|true|[yY]*) | |
2088 | case "$versiononly" in | |
2089 | '') versiononly="$define" ;; | |
2090 | esac | |
2091 | case "$installusrbinperl" in | |
2092 | '') installusrbinperl="$undef" ;; | |
2093 | esac | |
2094 | ;; | |
2095 | esac | |
0107c034 | 2096 | |
2304df62 AD |
2097 | : general instructions |
2098 | needman=true | |
2099 | firsttime=true | |
760ac839 | 2100 | user=`(logname) 2>/dev/null` |
dfe9444c AD |
2101 | case "$user" in |
2102 | '') user=`whoami 2>&1`;; | |
760ac839 | 2103 | esac |
2304df62 AD |
2104 | if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then |
2105 | firsttime=false | |
2106 | echo " " | |
2107 | rp='Would you like to see the instructions?' | |
2108 | dflt=n | |
2109 | . ./myread | |
2110 | case "$ans" in | |
2111 | [yY]*) ;; | |
2112 | *) needman=false;; | |
2113 | esac | |
2114 | fi | |
2115 | if $needman; then | |
2116 | cat <<EOH | |
4e2a5f63 | 2117 | |
2304df62 | 2118 | This installation shell script will examine your system and ask you questions |
a0d0e21e | 2119 | to determine how the perl5 package should be installed. If you get |
2304df62 AD |
2120 | stuck on a question, you may use a ! shell escape to start a subshell or |
2121 | execute a command. Many of the questions will have default answers in square | |
2122 | brackets; typing carriage return will give you the default. | |
2123 | ||
2124 | On some of the questions which ask for file or directory names you are allowed | |
2125 | to use the ~name construct to specify the login directory belonging to "name", | |
2126 | even if you don't have a shell which knows about that. Questions where this is | |
2127 | allowed will be marked "(~name ok)". | |
2128 | ||
2129 | EOH | |
2130 | rp='' | |
2131 | dflt='Type carriage return to continue' | |
2132 | . ./myread | |
2133 | cat <<'EOH' | |
2134 | ||
2135 | The prompter used in this script allows you to use shell variables and | |
2136 | backticks in your answers. You may use $1, $2, etc... to refer to the words | |
2137 | in the default answer, as if the default line was a set of arguments given to a | |
2138 | script shell. This means you may also use $* to repeat the whole default line, | |
2139 | so you do not have to re-type everything to add something to the default. | |
2140 | ||
2141 | Everytime there is a substitution, you will have to confirm. If there is an | |
2142 | error (e.g. an unmatched backtick), the default answer will remain unchanged | |
2143 | and you will be prompted again. | |
2144 | ||
2145 | If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all | |
2146 | the questions and use the computed defaults (or the previous answers if there | |
2147 | was already a config.sh file). Type 'Configure -h' for a list of options. | |
ecfc5424 | 2148 | You may also start interactively and then answer '& -d' at any prompt to turn |
dfe9444c | 2149 | on the non-interactive behaviour for the remainder of the execution. |
2304df62 AD |
2150 | |
2151 | EOH | |
2152 | . ./myread | |
2153 | cat <<EOH | |
2154 | ||
2155 | Much effort has been expended to ensure that this shell script will run on any | |
2156 | Unix system. If despite that it blows up on yours, your best bet is to edit | |
40000a8c AD |
2157 | Configure and run it again. If you can't run Configure for some reason, |
2158 | you'll have to generate a config.sh file by hand. Whatever problems you | |
7f2de2d2 | 2159 | have, let me (perlbug@perl.org) know how I blew it. |
2304df62 AD |
2160 | |
2161 | This installation script affects things in two ways: | |
2162 | ||
2163 | 1) it may do direct variable substitutions on some of the files included | |
2164 | in this kit. | |
2165 | 2) it builds a config.h file for inclusion in C programs. You may edit | |
2166 | any of these files as the need arises after running this script. | |
2167 | ||
2168 | If you make a mistake on a question, there is no easy way to back up to it | |
2169 | currently. The easiest thing to do is to edit config.sh and rerun all the SH | |
2170 | files. Configure will offer to let you do this before it runs the SH files. | |
2171 | ||
2172 | EOH | |
2173 | dflt='Type carriage return to continue' | |
2174 | . ./myread | |
2175 | case "$firsttime" in | |
2176 | true) echo $user >>../.config/instruct;; | |
2177 | esac | |
2178 | fi | |
2179 | ||
2304df62 AD |
2180 | : find out where common programs are |
2181 | echo " " | |
2182 | echo "Locating common programs..." >&4 | |
2183 | cat <<EOSC >loc | |
2184 | $startsh | |
2185 | case \$# in | |
2186 | 0) exit 1;; | |
2187 | esac | |
2188 | thing=\$1 | |
2189 | shift | |
2190 | dflt=\$1 | |
2191 | shift | |
2192 | for dir in \$*; do | |
2193 | case "\$thing" in | |
2194 | .) | |
2195 | if test -d \$dir/\$thing; then | |
2196 | echo \$dir | |
2197 | exit 0 | |
2198 | fi | |
2199 | ;; | |
2200 | *) | |
a0d0e21e | 2201 | for thisthing in \$dir/\$thing; do |
ecfc5424 | 2202 | : just loop through to pick last item |
a0d0e21e | 2203 | done |
25f94b33 | 2204 | if test -f \$thisthing; then |
a0d0e21e | 2205 | echo \$thisthing |
2304df62 | 2206 | exit 0 |
a5a94ea5 JH |
2207 | elif test "X$_exe" != X -a -f \$thisthing$_exe; then |
2208 | echo \$thisthing | |
2209 | exit 0 | |
2304df62 | 2210 | elif test -f \$dir/\$thing.exe; then |
c4f23d77 AD |
2211 | if test -n "$DJGPP"; then |
2212 | echo \$dir/\$thing.exe | |
b921d661 | 2213 | elif test "$eunicefix" != ":"; then |
c4f23d77 AD |
2214 | : on Eunice apparently |
2215 | echo \$dir/\$thing | |
b921d661 | 2216 | exit 0 |
c4f23d77 | 2217 | fi |
2d736872 | 2218 | exit 0 |
2304df62 AD |
2219 | fi |
2220 | ;; | |
2221 | esac | |
2222 | done | |
2223 | echo \$dflt | |
2224 | exit 1 | |
2225 | EOSC | |
2226 | chmod +x loc | |
2227 | $eunicefix loc | |
2228 | loclist=" | |
2229 | awk | |
2230 | cat | |
f8006fac | 2231 | chmod |
b4eb6b3d JH |
2232 | comm |
2233 | cp | |
2304df62 AD |
2234 | echo |
2235 | expr | |
2236 | grep | |
a0d0e21e | 2237 | ls |
b4eb6b3d | 2238 | mkdir |
2304df62 AD |
2239 | rm |
2240 | sed | |
b4eb6b3d | 2241 | sort |
85e6fe83 | 2242 | touch |
2304df62 | 2243 | tr |
b4eb6b3d | 2244 | uniq |
2304df62 AD |
2245 | " |
2246 | trylist=" | |
2247 | Mcc | |
dfe9444c | 2248 | ar |
3659ebf1 | 2249 | bison |
b4eb6b3d | 2250 | byacc |
2304df62 | 2251 | cpp |
b4eb6b3d | 2252 | csh |
2304df62 AD |
2253 | date |
2254 | egrep | |
1fef16b3 | 2255 | gmake |
8ff267be | 2256 | gzip |
b4eb6b3d | 2257 | less |
8ff267be | 2258 | ln |
3c728e00 | 2259 | make |
b4eb6b3d | 2260 | more |
693762b4 | 2261 | nm |
b4eb6b3d JH |
2262 | nroff |
2263 | pg | |
2304df62 AD |
2264 | test |
2265 | uname | |
8ff267be | 2266 | zip |
2304df62 | 2267 | " |
8e07c86e | 2268 | pth=`echo $PATH | sed -e "s/$p_/ /g"` |
2304df62 AD |
2269 | pth="$pth /lib /usr/lib" |
2270 | for file in $loclist; do | |
dfe9444c AD |
2271 | eval xxx=\$$file |
2272 | case "$xxx" in | |
2273 | /*|?:[\\/]*) | |
2274 | if test -f "$xxx"; then | |
2275 | : ok | |
2276 | else | |
2277 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 | |
2278 | xxx=`./loc $file $file $pth` | |
2279 | fi | |
2280 | ;; | |
2281 | '') xxx=`./loc $file $file $pth`;; | |
2282 | *) xxx=`./loc $xxx $xxx $pth`;; | |
2283 | esac | |
a5a94ea5 | 2284 | eval $file=$xxx$_exe |
2304df62 AD |
2285 | eval _$file=$xxx |
2286 | case "$xxx" in | |
2287 | /*) | |
2288 | echo $file is in $xxx. | |
2289 | ;; | |
8e07c86e AD |
2290 | ?:[\\/]*) |
2291 | echo $file is in $xxx. | |
2292 | ;; | |
2304df62 | 2293 | *) |
25f94b33 AD |
2294 | echo "I don't know where '$file' is, and my life depends on it." >&4 |
2295 | echo "Go find a public domain implementation or fix your PATH setting!" >&4 | |
4633a7c4 | 2296 | exit 1 |
2304df62 AD |
2297 | ;; |
2298 | esac | |
2299 | done | |
2300 | echo " " | |
2301 | echo "Don't worry if any of the following aren't found..." | |
2302 | say=offhand | |
2303 | for file in $trylist; do | |
dfe9444c AD |
2304 | eval xxx=\$$file |
2305 | case "$xxx" in | |
2306 | /*|?:[\\/]*) | |
2307 | if test -f "$xxx"; then | |
2308 | : ok | |
2309 | else | |
2310 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 | |
2311 | xxx=`./loc $file $file $pth` | |
2312 | fi | |
2313 | ;; | |
2314 | '') xxx=`./loc $file $file $pth`;; | |
2315 | *) xxx=`./loc $xxx $xxx $pth`;; | |
2316 | esac | |
306a8474 | 2317 | eval $file=$xxx$_exe |
2304df62 AD |
2318 | eval _$file=$xxx |
2319 | case "$xxx" in | |
2320 | /*) | |
2321 | echo $file is in $xxx. | |
2322 | ;; | |
8e07c86e AD |
2323 | ?:[\\/]*) |
2324 | echo $file is in $xxx. | |
2325 | ;; | |
2304df62 AD |
2326 | *) |
2327 | echo "I don't see $file out there, $say." | |
2328 | say=either | |
2329 | ;; | |
2330 | esac | |
2331 | done | |
2332 | case "$egrep" in | |
1fef16b3 | 2333 | egrep) |
2304df62 AD |
2334 | echo "Substituting grep for egrep." |
2335 | egrep=$grep | |
868439a2 | 2336 | _egrep=$grep |
2304df62 AD |
2337 | ;; |
2338 | esac | |
8ff267be | 2339 | case "$ln" in |
1fef16b3 | 2340 | ln) |
8ff267be PP |
2341 | echo "Substituting cp for ln." |
2342 | ln=$cp | |
868439a2 | 2343 | _ln=$cp |
8ff267be PP |
2344 | ;; |
2345 | esac | |
2e26f1d5 JH |
2346 | case "$make" in |
2347 | make) | |
2348 | case "$gmake" in | |
2349 | gmake) | |
2350 | echo "I can't find make or gmake, and my life depends on it." >&4 | |
2351 | echo "Go find a public domain implementation or fix your PATH setting!" >&4 | |
2352 | exit 1 | |
2353 | ;; | |
2354 | esac | |
2355 | ;; | |
2356 | esac | |
2357 | case "$gmake" in | |
2358 | gmake) ;; | |
2359 | *) # We can't have osname yet. | |
1fef16b3 JH |
2360 | if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS |
2361 | # Assume that gmake, if found, is definitely GNU make | |
2362 | # and prefer it over the system make. | |
2363 | echo "Substituting gmake for make." | |
2364 | make=$gmake | |
868439a2 | 2365 | _make=$gmake |
1fef16b3 JH |
2366 | fi |
2367 | ;; | |
a5a94ea5 | 2368 | esac |
2304df62 AD |
2369 | case "$test" in |
2370 | test) | |
2371 | echo "Hopefully test is built into your sh." | |
2372 | ;; | |
2373 | *) | |
73614538 | 2374 | if `sh -c "PATH= test true" >/dev/null 2>&1`; then |
5d644a95 | 2375 | echo "Using the test built into your sh." |
2304df62 AD |
2376 | test=test |
2377 | _test=test | |
2378 | fi | |
2379 | ;; | |
2380 | esac | |
2381 | case "$echo" in | |
2382 | echo) | |
2383 | echo "Hopefully echo is built into your sh." | |
2384 | ;; | |
2385 | '') ;; | |
2386 | *) | |
2387 | echo " " | |
2388 | echo "Checking compatibility between $echo and builtin echo (if any)..." >&4 | |
2389 | $echo $n "hi there$c" >foo1 | |
2390 | echo $n "hi there$c" >foo2 | |
2391 | if cmp foo1 foo2 >/dev/null 2>&1; then | |
2392 | echo "They are compatible. In fact, they may be identical." | |
2393 | else | |
2394 | case "$n" in | |
2395 | '-n') n='' c='\c';; | |
2396 | *) n='-n' c='';; | |
2397 | esac | |
2398 | cat <<FOO | |
2399 | They are not compatible! You are probably running ksh on a non-USG system. | |
2400 | I'll have to use $echo instead of the builtin, since Bourne shell doesn't | |
2401 | have echo built in and we may have to run some Bourne shell scripts. That | |
2402 | means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous. | |
2403 | ||
2404 | FOO | |
2405 | $echo $n "The star should be here-->$c" | |
2406 | $echo "*" | |
2407 | fi | |
2408 | $rm -f foo1 foo2 | |
2409 | ;; | |
2410 | esac | |
2411 | ||
6b769f8f | 2412 | cat <<EOS >trygcc |
2573c5f9 JH |
2413 | $startsh |
2414 | EOS | |
6b769f8f | 2415 | cat <<'EOSC' >>trygcc |
2573c5f9 JH |
2416 | case "$cc" in |
2417 | '') ;; | |
2418 | *) $rm -f try try.* | |
2419 | $cat >try.c <<EOM | |
2420 | int main(int argc, char *argv[]) { | |
2421 | return 0; | |
2422 | } | |
2423 | EOM | |
e4778687 | 2424 | if $cc -o try $ccflags $ldflags try.c; then |
2573c5f9 JH |
2425 | : |
2426 | else | |
2427 | echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 | |
2428 | despair=yes | |
2429 | trygcc=yes | |
2430 | case "$cc" in | |
2431 | *gcc*) trygcc=no ;; | |
2432 | esac | |
2433 | case "`$cc -v -c try.c 2>&1`" in | |
2434 | *gcc*) trygcc=no ;; | |
2435 | esac | |
2436 | if $test X"$trygcc" = Xyes; then | |
2437 | if gcc -o try -c try.c; then | |
2438 | echo " " | |
2439 | echo "You seem to have a working gcc, though." >&4 | |
2440 | rp="Would you like to use it?" | |
2441 | dflt=y | |
2442 | if $test -f myread; then | |
2443 | . ./myread | |
2444 | else | |
2445 | if $test -f UU/myread; then | |
2446 | . ./UU/myread | |
2447 | else | |
2448 | echo "Cannot find myread, sorry. Aborting." >&2 | |
2449 | exit 1 | |
2450 | fi | |
2451 | fi | |
2452 | case "$ans" in | |
6371411c RB |
2453 | [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no; |
2454 | if $test -f usethreads.cbu; then | |
2455 | $cat >&4 <<EOM | |
2456 | ||
2457 | *** However, any setting of the C compiler flags (e.g. for thread support) | |
2458 | *** has been lost. It may be necessary to pass -Dcc=gcc to Configure | |
2459 | *** (together with e.g. -Dusethreads). | |
2460 | ||
2461 | EOM | |
2462 | fi;; | |
2573c5f9 JH |
2463 | esac |
2464 | fi | |
2465 | fi | |
6b769f8f RB |
2466 | fi |
2467 | $rm -f try try.* | |
2468 | ;; | |
2469 | esac | |
2470 | EOSC | |
2471 | ||
2472 | cat <<EOS >checkcc | |
2473 | $startsh | |
2474 | EOS | |
2475 | cat <<'EOSC' >>checkcc | |
2476 | case "$cc" in | |
2477 | '') ;; | |
2478 | *) $rm -f try try.* | |
2479 | $cat >try.c <<EOM | |
2480 | int main(int argc, char *argv[]) { | |
2481 | return 0; | |
2482 | } | |
2483 | EOM | |
2484 | if $cc -o try $ccflags $ldflags try.c; then | |
2485 | : | |
2486 | else | |
2573c5f9 | 2487 | if $test X"$despair" = Xyes; then |
6b769f8f RB |
2488 | echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 |
2489 | fi | |
2490 | $cat >&4 <<EOM | |
5dd4fbdf MB |
2491 | You need to find a working C compiler. |
2492 | Either (purchase and) install the C compiler supplied by your OS vendor, | |
2493 | or for a free C compiler try http://gcc.gnu.org/ | |
2494 | I cannot continue any further, aborting. | |
2495 | EOM | |
6b769f8f | 2496 | exit 1 |
2573c5f9 JH |
2497 | fi |
2498 | $rm -f try try.* | |
2499 | ;; | |
2500 | esac | |
2501 | EOSC | |
2502 | ||
a0d0e21e LW |
2503 | : determine whether symbolic links are supported |
2504 | echo " " | |
2505 | $touch blurfl | |
2506 | if $ln -s blurfl sym > /dev/null 2>&1 ; then | |
2507 | echo "Symbolic links are supported." >&4 | |
818f00be | 2508 | lns="$ln -s" |
a0d0e21e LW |
2509 | else |
2510 | echo "Symbolic links are NOT supported." >&4 | |
2511 | lns="$ln" | |
2512 | fi | |
2513 | $rm -f blurfl sym | |
2514 | ||
dafca956 JH |
2515 | : determine whether symbolic links are supported |
2516 | echo " " | |
2517 | case "$lns" in | |
18ea2752 | 2518 | *"ln"*" -s") |
dafca956 JH |
2519 | echo "Checking how to test for symbolic links..." >&4 |
2520 | $lns blurfl sym | |
4b661809 | 2521 | if $test "X$issymlink" = X; then |
2e2a97a6 JH |
2522 | case "$newsh" in |
2523 | '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;; | |
2524 | *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;; | |
2525 | esac | |
5d644a95 MB |
2526 | if test $? = 0; then |
2527 | issymlink="test -h" | |
2e2a97a6 JH |
2528 | else |
2529 | echo "Your builtin 'test -h' may be broken." >&4 | |
2530 | case "$test" in | |
2531 | /*) ;; | |
2532 | *) pth=`echo $PATH | sed -e "s/$p_/ /g"` | |
2533 | for p in $pth | |
2534 | do | |
2535 | if test -f "$p/$test"; then | |
2536 | test="$p/$test" | |
2537 | break | |
2538 | fi | |
2539 | done | |
2540 | ;; | |
2541 | esac | |
2542 | case "$test" in | |
2543 | /*) | |
2544 | echo "Trying external '$test -h'." >&4 | |
2545 | issymlink="$test -h" | |
2546 | if $test ! -h sym >/dev/null 2>&1; then | |
3c728e00 | 2547 | echo "External '$test -h' is broken, too." >&4 |
2e2a97a6 JH |
2548 | issymlink='' |
2549 | fi | |
2550 | ;; | |
2551 | *) issymlink='' ;; | |
2552 | esac | |
5d644a95 MB |
2553 | fi |
2554 | fi | |
4b661809 | 2555 | if $test "X$issymlink" = X; then |
dafca956 | 2556 | if $test -L sym 2>/dev/null; then |
5d644a95 | 2557 | issymlink="$test -L" |
2e2a97a6 | 2558 | echo "The builtin '$test -L' worked." >&4 |
dafca956 JH |
2559 | fi |
2560 | fi | |
4b661809 | 2561 | if $test "X$issymlink" != X; then |
5d644a95 | 2562 | echo "You can test for symbolic links with '$issymlink'." >&4 |
dafca956 JH |
2563 | else |
2564 | echo "I do not know how you can test for symbolic links." >&4 | |
2565 | fi | |
2566 | $rm -f blurfl sym | |
2567 | ;; | |
2568 | *) echo "No symbolic links, so not testing for their testing..." >&4 | |
2569 | ;; | |
2570 | esac | |
2571 | echo " " | |
2572 | ||
2573 | ||
2574 | case "$mksymlinks" in | |
2575 | $define|true|[yY]*) | |
2576 | case "$src" in | |
2577 | ''|'.') echo "Cannot create symlinks in the original directory." >&4 | |
2578 | exit 1 | |
2579 | ;; | |
4b661809 | 2580 | *) case "$lns:$issymlink" in |
f314eb9f | 2581 | *"ln"*" -s:"*"test -"?) |
dafca956 JH |
2582 | echo "Creating the symbolic links..." >&4 |
2583 | echo "(First creating the subdirectories...)" >&4 | |
2584 | cd .. | |
2585 | awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do | |
2586 | read directory | |
2587 | test -z "$directory" && break | |
2588 | mkdir -p $directory | |
2589 | done | |
2590 | # Sanity check 1. | |
2591 | if test ! -d t/base; then | |
2592 | echo "Failed to create the subdirectories. Aborting." >&4 | |
2593 | exit 1 | |
2594 | fi | |
2595 | echo "(Then creating the symlinks...)" >&4 | |
2596 | awk '{print $1}' $src/MANIFEST | while true; do | |
2597 | read filename | |
2598 | test -z "$filename" && break | |
2599 | if test -f $filename; then | |
5d644a95 | 2600 | if $issymlink $filename; then |
dafca956 JH |
2601 | rm -f $filename |
2602 | fi | |
2603 | fi | |
2604 | if test -f $filename; then | |
2605 | echo "$filename already exists, not symlinking." | |
2606 | else | |
2607 | ln -s $src/$filename $filename | |
2608 | fi | |
2609 | done | |
2610 | # Sanity check 2. | |
a0d24b8a JH |
2611 | if test ! -f t/base/lex.t; then |
2612 | echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4 | |
dafca956 JH |
2613 | exit 1 |
2614 | fi | |
2615 | cd UU | |
2616 | ;; | |
2617 | *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4 | |
2618 | ;; | |
2619 | esac | |
2620 | ;; | |
2621 | esac | |
2622 | ;; | |
2623 | esac | |
2624 | ||
5440bc8e JH |
2625 | |
2626 | case "$usecrosscompile" in | |
2627 | $define|true|[yY]*) | |
93bc48fa | 2628 | $echo "Cross-compiling..." |
5440bc8e JH |
2629 | croak='' |
2630 | case "$cc" in | |
2631 | *-*-gcc) # A cross-compiling gcc, probably. | |
93bc48fa | 2632 | targetarch=`$echo $cc|$sed 's/-gcc$//'` |
5440bc8e JH |
2633 | ar=$targetarch-ar |
2634 | # leave out ld, choosing it is more complex | |
2635 | nm=$targetarch-nm | |
2636 | ranlib=$targetarch-ranlib | |
93bc48fa | 2637 | $echo 'extern int foo;' > try.c |
f8006fac | 2638 | set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'` |
93bc48fa JH |
2639 | shift |
2640 | if $test $# -gt 0; then | |
2641 | incpth="$incpth $*" | |
f8006fac JH |
2642 | incpth="`$echo $incpth|$sed 's/^ //'`" |
2643 | echo "Guessing incpth '$incpth'." >&4 | |
93bc48fa | 2644 | for i in $*; do |
f8006fac | 2645 | j="`$echo $i|$sed 's,/include$,/lib,'`" |
93bc48fa JH |
2646 | if $test -d $j; then |
2647 | libpth="$libpth $j" | |
2648 | fi | |
2649 | done | |
f8006fac JH |
2650 | libpth="`$echo $libpth|$sed 's/^ //'`" |
2651 | echo "Guessing libpth '$libpth'." >&4 | |
93bc48fa JH |
2652 | fi |
2653 | $rm -f try.c | |
5440bc8e JH |
2654 | ;; |
2655 | esac | |
2656 | case "$targetarch" in | |
93bc48fa JH |
2657 | '') echo "Targetarch not defined." >&4; croak=y ;; |
2658 | *) echo "Using targetarch $targetarch." >&4 ;; | |
5440bc8e JH |
2659 | esac |
2660 | case "$incpth" in | |
93bc48fa | 2661 | '') echo "Incpth not defined." >&4; croak=y ;; |
f8006fac | 2662 | *) echo "Using incpth '$incpth'." >&4 ;; |
5440bc8e JH |
2663 | esac |
2664 | case "$libpth" in | |
93bc48fa | 2665 | '') echo "Libpth not defined." >&4; croak=y ;; |
f8006fac | 2666 | *) echo "Using libpth '$libpth'." >&4 ;; |
5440bc8e | 2667 | esac |
93bc48fa JH |
2668 | case "$usrinc" in |
2669 | '') for i in $incpth; do | |
2670 | if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then | |
2671 | usrinc=$i | |
2672 | echo "Guessing usrinc $usrinc." >&4 | |
2673 | break | |
2674 | fi | |
2675 | done | |
2676 | case "$usrinc" in | |
2677 | '') echo "Usrinc not defined." >&4; croak=y ;; | |
2678 | esac | |
2679 | ;; | |
2680 | *) echo "Using usrinc $usrinc." >&4 ;; | |
5440bc8e | 2681 | esac |
93bc48fa JH |
2682 | case "$targethost" in |
2683 | '') echo "Targethost not defined." >&4; croak=y ;; | |
2684 | *) echo "Using targethost $targethost." >&4 | |
5440bc8e | 2685 | esac |
93bc48fa JH |
2686 | locincpth=' ' |
2687 | loclibpth=' ' | |
5440bc8e | 2688 | case "$croak" in |
93bc48fa | 2689 | y) echo "Cannot continue, aborting." >&4; exit 1 ;; |
5440bc8e JH |
2690 | esac |
2691 | case "$src" in | |
2692 | /*) run=$src/Cross/run | |
93c0359c | 2693 | targetmkdir=$src/Cross/mkdir |
5440bc8e JH |
2694 | to=$src/Cross/to |
2695 | from=$src/Cross/from | |
2696 | ;; | |
93bc48fa | 2697 | *) pwd=`$test -f ../Configure & cd ..; pwd` |
5440bc8e | 2698 | run=$pwd/Cross/run |
f8006fac | 2699 | targetmkdir=$pwd/Cross/mkdir |
5440bc8e JH |
2700 | to=$pwd/Cross/to |
2701 | from=$pwd/Cross/from | |
2702 | ;; | |
2703 | esac | |
2704 | case "$targetrun" in | |
2705 | '') targetrun=ssh ;; | |
2706 | esac | |
2707 | case "$targetto" in | |
2708 | '') targetto=scp ;; | |
2709 | esac | |
2710 | case "$targetfrom" in | |
2711 | '') targetfrom=scp ;; | |
2712 | esac | |
2713 | run=$run-$targetrun | |
2714 | to=$to-$targetto | |
2715 | from=$from-$targetfrom | |
93bc48fa JH |
2716 | case "$targetdir" in |
2717 | '') targetdir=/tmp | |
2718 | echo "Guessing targetdir $targetdir." >&4 | |
2719 | ;; | |
2720 | esac | |
5440bc8e | 2721 | case "$targetuser" in |
93bc48fa JH |
2722 | '') targetuser=root |
2723 | echo "Guessing targetuser $targetuser." >&4 | |
2724 | ;; | |
5440bc8e JH |
2725 | esac |
2726 | case "$targetfrom" in | |
2727 | scp) q=-q ;; | |
2728 | *) q='' ;; | |
2729 | esac | |
2730 | case "$targetrun" in | |
2731 | ssh|rsh) | |
2732 | cat >$run <<EOF | |
2733 | #!/bin/sh | |
93c0359c JH |
2734 | case "\$1" in |
2735 | -cwd) | |
2736 | shift | |
2737 | cwd=\$1 | |
2738 | shift | |
2739 | ;; | |
2740 | esac | |
2741 | case "\$cwd" in | |
2742 | '') cwd=$targetdir ;; | |
2743 | esac | |
5440bc8e JH |
2744 | exe=\$1 |
2745 | shift | |
93c0359c JH |
2746 | if $test ! -f \$exe.xok; then |
2747 | $to \$exe | |
2748 | $touch \$exe.xok | |
2749 | fi | |
2750 | $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@" | |
5440bc8e JH |
2751 | EOF |
2752 | ;; | |
93bc48fa | 2753 | *) echo "Unknown targetrun '$targetrun'" >&4 |
5440bc8e JH |
2754 | exit 1 |
2755 | ;; | |
2756 | esac | |
93c0359c JH |
2757 | case "$targetmkdir" in |
2758 | */Cross/mkdir) | |
2759 | cat >$targetmkdir <<EOF | |
2760 | #!/bin/sh | |
2761 | $targetrun -l $targetuser $targethost "mkdir -p \$@" | |
2762 | EOF | |
f8006fac | 2763 | $chmod a+rx $targetmkdir |
93c0359c JH |
2764 | ;; |
2765 | *) echo "Unknown targetmkdir '$targetmkdir'" >&4 | |
2766 | exit 1 | |
2767 | ;; | |
2768 | esac | |
5440bc8e JH |
2769 | case "$targetto" in |
2770 | scp|rcp) | |
2771 | cat >$to <<EOF | |
2772 | #!/bin/sh | |
2773 | for f in \$@ | |
2774 | do | |
93c0359c JH |
2775 | case "\$f" in |
2776 | /*) | |
2777 | $targetmkdir \`dirname \$f\` | |
2778 | $targetto $q \$f $targetuser@$targethost:\$f || exit 1 | |
2779 | ;; | |
2780 | *) | |
2781 | $targetmkdir $targetdir/\`dirname \$f\` | |
2782 | $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1 | |
2783 | ;; | |
2784 | esac | |
5440bc8e JH |
2785 | done |
2786 | exit 0 | |
2787 | EOF | |
2788 | ;; | |
2789 | cp) cat >$to <<EOF | |
2790 | #!/bin/sh | |
93c0359c JH |
2791 | for f in \$@ |
2792 | do | |
2793 | case "\$f" in | |
2794 | /*) | |
2795 | $mkdir -p $targetdir/\`dirname \$f\` | |
2796 | $cp \$f $targetdir/\$f || exit 1 | |
2797 | ;; | |
2798 | *) | |
2799 | $targetmkdir $targetdir/\`dirname \$f\` | |
2800 | $cp \$f $targetdir/\$f || exit 1 | |
2801 | ;; | |
2802 | esac | |
2803 | done | |
2804 | exit 0 | |
5440bc8e JH |
2805 | EOF |
2806 | ;; | |
93bc48fa | 2807 | *) echo "Unknown targetto '$targetto'" >&4 |
5440bc8e JH |
2808 | exit 1 |
2809 | ;; | |
2810 | esac | |
2811 | case "$targetfrom" in | |
2812 | scp|rcp) | |
2813 | cat >$from <<EOF | |
2814 | #!/bin/sh | |
2815 | for f in \$@ | |
2816 | do | |
93c0359c | 2817 | $rm -f \$f |
5440bc8e JH |
2818 | $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1 |
2819 | done | |
2820 | exit 0 | |
2821 | EOF | |
2822 | ;; | |
2823 | cp) cat >$from <<EOF | |
2824 | #!/bin/sh | |
2825 | for f in \$@ | |
2826 | do | |
93c0359c | 2827 | $rm -f \$f |
5440bc8e JH |
2828 | cp $targetdir/\$f . || exit 1 |
2829 | done | |
2830 | exit 0 | |
2831 | EOF | |
2832 | ;; | |
93bc48fa | 2833 | *) echo "Unknown targetfrom '$targetfrom'" >&4 |
5440bc8e JH |
2834 | exit 1 |
2835 | ;; | |
2836 | esac | |
93bc48fa JH |
2837 | if $test ! -f $run; then |
2838 | echo "Target 'run' script '$run' not found." >&4 | |
5440bc8e | 2839 | else |
f8006fac | 2840 | $chmod a+rx $run |
5440bc8e | 2841 | fi |
93bc48fa JH |
2842 | if $test ! -f $to; then |
2843 | echo "Target 'to' script '$to' not found." >&4 | |
5440bc8e | 2844 | else |
f8006fac | 2845 | $chmod a+rx $to |
5440bc8e | 2846 | fi |
93bc48fa JH |
2847 | if $test ! -f $from; then |
2848 | echo "Target 'from' script '$from' not found." >&4 | |
5440bc8e | 2849 | else |
f8006fac | 2850 | $chmod a+rx $from |
5440bc8e | 2851 | fi |
93bc48fa | 2852 | if $test ! -f $run -o ! -f $to -o ! -f $from; then |
5440bc8e JH |
2853 | exit 1 |
2854 | fi | |
2855 | cat >&4 <<EOF | |
f8006fac JH |
2856 | Using '$run' for remote execution, |
2857 | and '$from' and '$to' | |
93bc48fa | 2858 | for remote file transfer. |
5440bc8e JH |
2859 | EOF |
2860 | ;; | |
2861 | *) run='' | |
2862 | to=: | |
2863 | from=: | |
2864 | usecrosscompile='undef' | |
2865 | targetarch='' | |
2866 | ;; | |
2867 | esac | |
2868 | ||
ecfc5424 AD |
2869 | : see whether [:lower:] and [:upper:] are supported character classes |
2870 | echo " " | |
ecfc5424 AD |
2871 | case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in |
2872 | ABYZ) | |
2873 | echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 | |
2874 | up='[:upper:]' | |
2875 | low='[:lower:]' | |
2876 | ;; | |
28e8609d JH |
2877 | *) # There is a discontinuity in EBCDIC between 'I' and 'J' |
2878 | # (0xc9 and 0xd1), therefore that is a nice testing point. | |
2879 | if test "X$up" = X -o "X$low" = X; then | |
3eaeeeae | 2880 | case "`echo IJ | $tr '[I-J]' '[i-j]' 2>/dev/null`" in |
28e8609d JH |
2881 | ij) up='[A-Z]' |
2882 | low='[a-z]' | |
2883 | ;; | |
2884 | esac | |
2885 | fi | |
2886 | if test "X$up" = X -o "X$low" = X; then | |
3eaeeeae | 2887 | case "`echo IJ | $tr I-J i-j 2>/dev/null`" in |
28e8609d JH |
2888 | ij) up='A-Z' |
2889 | low='a-z' | |
2890 | ;; | |
2891 | esac | |
2892 | fi | |
2893 | if test "X$up" = X -o "X$low" = X; then | |
2894 | case "`echo IJ | od -x 2>/dev/null`" in | |
2895 | *C9D1*|*c9d1*) | |
2896 | echo "Hey, this might be EBCDIC." >&4 | |
2897 | if test "X$up" = X -o "X$low" = X; then | |
5ff3f7a4 | 2898 | case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in |
28e8609d JH |
2899 | ij) up='[A-IJ-RS-Z]' |
2900 | low='[a-ij-rs-z]' | |
2901 | ;; | |
2902 | esac | |
2903 | fi | |
2904 | if test "X$up" = X -o "X$low" = X; then | |
5ff3f7a4 | 2905 | case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in |
28e8609d JH |
2906 | ij) up='A-IJ-RS-Z' |
2907 | low='a-ij-rs-z' | |
2908 | ;; | |
2909 | esac | |
2910 | fi | |
2911 | ;; | |
2912 | esac | |
2913 | fi | |
2914 | esac | |
3eaeeeae | 2915 | case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in |
28e8609d JH |
2916 | ij) |
2917 | echo "Using $up and $low to convert case." >&4 | |
2918 | ;; | |
ecfc5424 | 2919 | *) |
28e8609d JH |
2920 | echo "I don't know how to translate letters from upper to lower case." >&4 |
2921 | echo "Your tr is not acting any way I know of." >&4 | |
2922 | exit 1 | |
2923 | ;; | |
ecfc5424 AD |
2924 | esac |
2925 | : set up the translation script tr, must be called with ./tr of course | |
2926 | cat >tr <<EOSC | |
2927 | $startsh | |
2928 | case "\$1\$2" in | |
2929 | '[A-Z][a-z]') exec $tr '$up' '$low';; | |
2930 | '[a-z][A-Z]') exec $tr '$low' '$up';; | |
2931 | esac | |
2932 | exec $tr "\$@" | |
2933 | EOSC | |
2934 | chmod +x tr | |
2935 | $eunicefix tr | |
2936 | ||
2304df62 AD |
2937 | : Try to determine whether config.sh was made on this system |
2938 | case "$config_sh" in | |
2939 | '') | |
43999f95 JH |
2940 | myuname=`$uname -a 2>/dev/null` |
2941 | $test -z "$myuname" && myuname=`hostname 2>/dev/null` | |
28e8609d JH |
2942 | # tr '[A-Z]' '[a-z]' would not work in EBCDIC |
2943 | # because the A-Z/a-z are not consecutive. | |
a0d0e21e | 2944 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ |
3eaeeeae | 2945 | ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` |
1aef975c | 2946 | newmyuname="$myuname" |
2304df62 | 2947 | dflt=n |
16d20bd9 AD |
2948 | case "$knowitall" in |
2949 | '') | |
2950 | if test -f ../config.sh; then | |
2951 | if $contains myuname= ../config.sh >/dev/null 2>&1; then | |
2952 | eval "`grep myuname= ../config.sh`" | |
2953 | fi | |
2954 | if test "X$myuname" = "X$newmyuname"; then | |
2955 | dflt=y | |
2956 | fi | |
2304df62 | 2957 | fi |
16d20bd9 AD |
2958 | ;; |
2959 | *) dflt=y;; | |
2960 | esac | |
2304df62 AD |
2961 | |
2962 | : Get old answers from old config file if Configure was run on the | |
2963 | : same system, otherwise use the hints. | |
2964 | hint=default | |
2965 | cd .. | |
2966 | if test -f config.sh; then | |
16d20bd9 AD |
2967 | echo " " |
2968 | rp="I see a config.sh file. Shall I use it to set the defaults?" | |
2304df62 AD |
2969 | . UU/myread |
2970 | case "$ans" in | |
f83701cd AD |
2971 | n*|N*) echo "OK, I'll ignore it." |
2972 | mv config.sh config.sh.old | |
2973 | myuname="$newmyuname" | |
2974 | ;; | |
2304df62 | 2975 | *) echo "Fetching default answers from your old config.sh file..." >&4 |
ecfc5424 AD |
2976 | tmp_n="$n" |
2977 | tmp_c="$c" | |
85cad39c | 2978 | tmp_sh="$sh" |
2304df62 AD |
2979 | . ./config.sh |
2980 | cp config.sh UU | |
ecfc5424 AD |
2981 | n="$tmp_n" |
2982 | c="$tmp_c" | |
85cad39c PP |
2983 | : Older versions did not always set $sh. Catch re-use of such |
2984 | : an old config.sh. | |
2985 | case "$sh" in | |
2986 | '') sh="$tmp_sh" ;; | |
2987 | esac | |
2304df62 AD |
2988 | hint=previous |
2989 | ;; | |
2990 | esac | |
2991 | fi | |
2573c5f9 | 2992 | . ./UU/checkcc |
2304df62 AD |
2993 | if test ! -f config.sh; then |
2994 | $cat <<EOM | |
2995 | ||
4e2a5f63 AD |
2996 | First time through, eh? I have some defaults handy for some systems |
2997 | that need some extra help getting the Configure answers right: | |
2304df62 AD |
2998 | |
2999 | EOM | |
dfe9444c | 3000 | (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4 |
2304df62 AD |
3001 | dflt='' |
3002 | : Half the following guesses are probably wrong... If you have better | |
7f2de2d2 | 3003 | : tests or hints, please send them to perlbug@perl.org |
2304df62 | 3004 | : The metaconfig authors would also appreciate a copy... |
a0d0e21e | 3005 | $test -f /irix && osname=irix |
85e6fe83 LW |
3006 | $test -f /xenix && osname=sco_xenix |
3007 | $test -f /dynix && osname=dynix | |
3008 | $test -f /dnix && osname=dnix | |
5f05dabc PP |
3009 | $test -f /lynx.os && osname=lynxos |
3010 | $test -f /unicos && osname=unicos && osvers=`$uname -r` | |
c71a9cee | 3011 | $test -f /unicosmk && osname=unicosmk && osvers=`$uname -r` |
7a4c00b4 | 3012 | $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` |
85e6fe83 | 3013 | $test -f /bin/mips && /bin/mips && osname=mips |
ecfc5424 AD |
3014 | $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ |
3015 | $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 | |
a0d0e21e LW |
3016 | $test -d /usr/apollo/bin && osname=apollo |
3017 | $test -f /etc/saf/_sactab && osname=svr4 | |
85e6fe83 | 3018 | $test -d /usr/include/minix && osname=minix |
d54344fc | 3019 | $test -f /system/gnu_library/bin/ar.pm && osname=vos |
e060872b | 3020 | if $test -d /MachTen -o -d /MachTen_Folder; then |
dfe9444c | 3021 | osname=machten |
4633a7c4 | 3022 | if $test -x /sbin/version; then |
dfe9444c | 3023 | osvers=`/sbin/version | $awk '{print $2}' | |
4633a7c4 LW |
3024 | $sed -e 's/[A-Za-z]$//'` |
3025 | elif $test -x /usr/etc/version; then | |
dfe9444c | 3026 | osvers=`/usr/etc/version | $awk '{print $2}' | |
4633a7c4 LW |
3027 | $sed -e 's/[A-Za-z]$//'` |
3028 | else | |
3029 | osvers="$2.$3" | |
3030 | fi | |
3031 | fi | |
aaacdc8b GS |
3032 | |
3033 | $test -f /sys/posix.dll && | |
3034 | $test -f /usr/bin/what && | |
3035 | set X `/usr/bin/what /sys/posix.dll` && | |
3036 | $test "$3" = UWIN && | |
3037 | osname=uwin && | |
3038 | osvers="$5" | |
3039 | ||
2304df62 AD |
3040 | if $test -f $uname; then |
3041 | set X $myuname | |
3042 | shift | |
3043 | ||
2304df62 | 3044 | case "$5" in |
85e6fe83 | 3045 | fps*) osname=fps ;; |
2304df62 AD |
3046 | mips*) |
3047 | case "$4" in | |
85e6fe83 LW |
3048 | umips) osname=umips ;; |
3049 | *) osname=mips ;; | |
2304df62 | 3050 | esac;; |
85e6fe83 LW |
3051 | [23]100) osname=mips ;; |
3052 | next*) osname=next ;; | |
ecfc5424 | 3053 | i386*) |
c6912327 JH |
3054 | tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'` |
3055 | if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then | |
619ffc2b JH |
3056 | osname='sco' |
3057 | osvers=$tmp | |
3058 | elif $test -f /etc/kconfig; then | |
ecfc5424 | 3059 | osname=isc |
bd628c73 | 3060 | if test "$lns" = "$ln -s"; then |
a0d0e21e LW |
3061 | osvers=4 |
3062 | elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then | |
3063 | osvers=3 | |
2304df62 | 3064 | elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then |
a0d0e21e | 3065 | osvers=2 |
ecfc5424 AD |
3066 | fi |
3067 | fi | |
2000072c | 3068 | tmp='' |
ecfc5424 | 3069 | ;; |
c4f23d77 AD |
3070 | pc*) |
3071 | if test -n "$DJGPP"; then | |
3072 | osname=dos | |
3073 | osvers=djgpp | |
3074 | fi | |
3075 | ;; | |
2304df62 AD |
3076 | esac |
3077 | ||
3078 | case "$1" in | |
a0d0e21e LW |
3079 | aix) osname=aix |
3080 | tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` | |
3081 | case "$tmp" in | |
1aef975c | 3082 | 'not found') osvers="$4"."$3" ;; |
a0d0e21e LW |
3083 | '<3240'|'<>3240') osvers=3.2.0 ;; |
3084 | '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; | |
3085 | '=3250'|'>3250') osvers=3.2.5 ;; | |
1aef975c | 3086 | *) osvers=$tmp;; |
a0d0e21e LW |
3087 | esac |
3088 | ;; | |
aaacdc8b GS |
3089 | bsd386) osname=bsd386 |
3090 | osvers=`$uname -r` | |
3091 | ;; | |
3092 | cygwin*) osname=cygwin | |
3093 | osvers="$3" | |
3094 | ;; | |
23f87696 SZ |
3095 | *dc.osx) osname=dcosx |
3096 | osvers="$3" | |
3097 | ;; | |
a0d0e21e LW |
3098 | dnix) osname=dnix |
3099 | osvers="$3" | |
3100 | ;; | |
3101 | domainos) osname=apollo | |
3102 | osvers="$3" | |
3103 | ;; | |
761ee4e8 | 3104 | dgux) osname=dgux |
a0d0e21e LW |
3105 | osvers="$3" |
3106 | ;; | |
760ac839 | 3107 | dynixptx*) osname=dynixptx |
e58e581d | 3108 | osvers=`echo "$4"|sed 's/^v//'` |
760ac839 | 3109 | ;; |
a0d0e21e LW |
3110 | freebsd) osname=freebsd |
3111 | osvers="$3" ;; | |
761ee4e8 BD |
3112 | genix) osname=genix ;; |
3113 | gnu) osname=gnu | |
3114 | osvers="$3" ;; | |
3115 | hp*) osname=hpux | |
bfb7748a | 3116 | osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'` |
a0d0e21e | 3117 | ;; |
761ee4e8 | 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 | ;; | |
761ee4e8 | 3125 | linux) osname=linux |
a0d0e21e | 3126 | case "$3" in |
a0d0e21e LW |
3127 | *) osvers="$3" ;; |
3128 | esac | |
3129 | ;; | |
761ee4e8 | 3130 | MiNT) osname=mint |
28e8609d JH |
3131 | ;; |
3132 | netbsd*) osname=netbsd | |
ecfc5424 AD |
3133 | osvers="$3" |
3134 | ;; | |
4e81affe MMIJG |
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 A |
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 PP |
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` |
dfe9444c AD |
3461 | case "$cf_by" in |
3462 | "") | |
7c04078e | 3463 | cf_by=`(logname) 2>/dev/null` |
dfe9444c | 3464 | case "$cf_by" in |
7c04078e GA |
3465 | "") |
3466 | cf_by=`(whoami) 2>/dev/null` | |
3467 | case "$cf_by" in | |
3468 | "") cf_by=unknown ;; | |
3469 | esac ;; | |
8ff267be PP |
3470 | esac ;; |
3471 | esac | |
2304df62 | 3472 | |
b4eb6b3d JH |
3473 | : set up the script used to warn in case of inconsistency |
3474 | cat <<EOS >whoa | |
3475 | $startsh | |
3476 | EOS | |
3477 | cat <<'EOSC' >>whoa | |
3478 | dflt=y | |
3479 | echo " " | |
3480 | echo "*** WHOA THERE!!! ***" >&4 | |
3481 | echo " The $hint value for \$$var on this machine was \"$was\"!" >&4 | |
3482 | rp=" Keep the $hint value?" | |
3483 | . ./myread | |
3484 | case "$ans" in | |
3485 | y) td=$was; tu=$was;; | |
3486 | esac | |
3487 | EOSC | |
3488 | ||
3489 | : function used to set $1 to $val | |
3490 | setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef; | |
3491 | case "$val$was" in | |
3492 | $define$undef) . ./whoa; eval "$var=\$td";; | |
3493 | $undef$define) . ./whoa; eval "$var=\$tu";; | |
3494 | *) eval "$var=$val";; | |
3495 | esac' | |
3496 | ||
b29b105d JH |
3497 | case "$usesocks" in |
3498 | $define|true|[yY]*) dflt='y';; | |
3499 | *) dflt='n';; | |
3500 | esac | |
3501 | cat <<EOM | |
3502 | ||
3503 | Perl can be built to use the SOCKS proxy protocol library. To do so, | |
3504 | Configure must be run with -Dusesocks. If you use SOCKS you also need | |
3505 | to use the PerlIO abstraction layer, this will be implicitly selected. | |
3506 | ||
3507 | If this doesn't make any sense to you, just accept the default '$dflt'. | |
3508 | EOM | |
3509 | rp='Build Perl for SOCKS?' | |
3510 | . ./myread | |
3511 | case "$ans" in | |
3512 | y|Y) val="$define" ;; | |
3513 | *) val="$undef" ;; | |
3514 | esac | |
3515 | set usesocks | |
3516 | eval $setvar | |
3517 | ||
3518 | case "$usesocks" in | |
3519 | $define|true|[yY]*) useperlio="$define";; | |
3520 | esac | |
3521 | ||
3522 | case "$useperlio" in | |
3523 | $define|true|[yY]*|'') dflt='y';; | |
3524 | *) dflt='n';; | |
3525 | esac | |
3526 | cat <<EOM | |
3527 | ||
3528 | Previous version of $package used the standard IO mechanisms as | |
3529 | defined in <stdio.h>. Versions 5.003_02 and later of $package allow | |
3530 | alternate IO mechanisms via the PerlIO abstraction layer, but the | |
3531 | stdio mechanism is still available if needed. The abstraction layer | |
3532 | can use AT&T's sfio (if you already have sfio installed) or regular stdio. | |
3533 | Using PerlIO with sfio may cause problems with some extension modules. | |
3534 | ||
3535 | If this doesn't make any sense to you, just accept the default '$dflt'. | |
3536 | EOM | |
3537 | rp='Use the PerlIO abstraction layer?' | |
3538 | . ./myread | |
3539 | case "$ans" in | |
3540 | y|Y) | |
3541 | val="$define" | |
3542 | ;; | |
3543 | *) | |
3544 | echo "Ok, doing things the stdio way." | |
3545 | val="$undef" | |
3546 | ;; | |
3547 | esac | |
3548 | set useperlio | |
3549 | eval $setvar | |
3550 | ||
3551 | case "$usesocks" in | |
3552 | $define|true|[yY]*) | |
3553 | case "$useperlio" in | |
3554 | $define|true|[yY]*) ;; | |
3555 | *) cat >&4 <<EOM | |
3556 | ||
3557 | You are using the SOCKS proxy protocol library which means that you | |
3558 | should also use the PerlIO layer. You may be headed for trouble. | |
3559 | ||
3560 | EOM | |
3561 | ;; | |
3562 | esac | |
3563 | ;; | |
3564 | esac | |
3565 | ||
3566 | ||
b4eb6b3d JH |
3567 | case "$usethreads" in |
3568 | $define|true|[yY]*) dflt='y';; | |
8e285145 AD |
3569 | *) # Catch case where user specified ithreads or 5005threads but |
3570 | # forgot -Dusethreads (A.D. 4/2002) | |
3571 | case "$useithreads$use5005threads" in | |
b29b105d JH |
3572 | *$define*) |
3573 | case "$useperlio" in | |
3574 | "$define") dflt='y' ;; | |
3575 | *) dflt='n' ;; | |
3576 | esac | |
3577 | ;; | |
3578 | *) dflt='n';; | |
8e285145 AD |
3579 | esac |
3580 | ;; | |
b4eb6b3d JH |
3581 | esac |
3582 | cat <<EOM | |
3583 | ||
3584 | Perl can be built to take advantage of threads on some systems. | |
3585 | To do so, Configure can be run with -Dusethreads. | |
3586 | ||
bfce6503 DM |
3587 | Note that Perl built with threading support runs slightly slower |
3588 | and uses more memory than plain Perl. The current implementation | |
3589 | is believed to be stable, but it is fairly new, and so should be | |
3590 | treated with caution. | |
b4eb6b3d JH |
3591 | |
3592 | If this doesn't make any sense to you, just accept the default '$dflt'. | |
3593 | EOM | |
3594 | rp='Build a threading Perl?' | |
3595 | . ./myread | |
3596 | case "$ans" in | |
3597 | y|Y) val="$define" ;; | |
3598 | *) val="$undef" ;; | |
3599 | esac | |
3600 | set usethreads | |
3601 | eval $setvar | |
3602 | ||
3603 | case "$usethreads" in | |
3604 | $define) | |
3605 | $cat <<EOM | |
3606 | ||
bfce6503 DM |
3607 | Since release 5.6, Perl has had two different threading implementations, |
3608 | the newer interpreter-based version (ithreads) with one interpreter per | |
3609 | thread, and the older 5.005 version (5005threads). | |
3610 | The 5005threads version is effectively unmaintained and will probably be | |
3611 | removed in Perl 5.10, so there should be no need to build a Perl using it | |
3612 | unless needed for backwards compatibility with some existing 5.005threads | |
3613 | code. | |
b4eb6b3d | 3614 | |
b4eb6b3d JH |
3615 | EOM |
3616 | : Default to ithreads unless overridden on command line or with | |
3617 | : old config.sh | |
3618 | dflt='y' | |
3619 | case "$use5005threads" in | |
3620 | $define|true|[yY]*) dflt='n';; | |
3621 | esac | |
3622 | case "$useithreads" in | |
3623 | $undef|false|[nN]*) dflt='n';; | |
3624 | esac | |
bfce6503 | 3625 | rp='Use the newer interpreter-based ithreads?' |
b4eb6b3d JH |
3626 | . ./myread |
3627 | case "$ans" in | |
3628 | y|Y) val="$define" ;; | |
3629 | *) val="$undef" ;; | |
3630 | esac | |
3631 | set useithreads | |
3632 | eval $setvar | |
3633 | : Now set use5005threads to the opposite value. | |
3634 | case "$useithreads" in | |
3635 | $define) val="$undef" ;; | |
3636 | *) val="$define" ;; | |
3637 | esac | |
3638 | set use5005threads | |
3639 | eval $setvar | |
3640 | ;; | |
3641 | *) | |
3642 | useithreads="$undef" | |
3643 | use5005threads="$undef" | |
3644 | ;; | |
3645 | esac | |
3646 | ||
c915ce7f JH |
3647 | case "$useithreads$use5005threads" in |
3648 | "$define$define") | |
3649 | $cat >&4 <<EOM | |
3650 | ||
3651 | You cannot have both the ithreads and the 5.005 threads enabled | |
3652 | at the same time. Disabling the 5.005 threads since they are | |
3653 | much less stable than the ithreads. | |
3654 | ||
3655 | EOM | |
3656 | use5005threads="$undef" | |
3657 | ;; | |
3658 | esac | |
3659 | ||
b29b105d JH |
3660 | if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then |
3661 | cat >&4 <<EOF | |
3662 | *** | |
3663 | *** To build with ithreads you must also use the PerlIO layer. | |
3664 | *** Cannot continue, aborting. | |
3665 | *** | |
3666 | EOF | |
3667 | exit 1 | |
3668 | fi | |
3669 | ||
b4eb6b3d JH |
3670 | case "$d_oldpthreads" in |
3671 | '') : Configure tests would be welcome here. For now, assume undef. | |
3672 | val="$undef" ;; | |
3673 | *) val="$d_oldpthreads" ;; | |
3674 | esac | |
3675 | set d_oldpthreads | |
3676 | eval $setvar | |
3677 | ||
3678 | ||
b4eb6b3d JH |
3679 | : Look for a hint-file generated 'call-back-unit'. If the |
3680 | : user has specified that a threading perl is to be built, | |
3681 | : we may need to set or change some other defaults. | |
9da7673b MB |
3682 | if $test -f usethreads.cbu; then |
3683 | echo "Your platform has some specific hints regarding threaded builds, using them..." | |
3684 | . ./usethreads.cbu | |
3685 | else | |
3686 | case "$usethreads" in | |
3687 | "$define"|true|[yY]*) | |
b4eb6b3d | 3688 | $cat <<EOM |
9da7673b | 3689 | (Your platform does not have any specific hints for threaded builds. |
b4eb6b3d JH |
3690 | Assuming POSIX threads, then.) |
3691 | EOM | |
b4eb6b3d | 3692 | ;; |
9da7673b MB |
3693 | esac |
3694 | fi | |
b4eb6b3d JH |
3695 | |
3696 | cat <<EOM | |
3697 | ||
3698 | Perl can be built so that multiple Perl interpreters can coexist | |
3699 | within the same Perl executable. | |
3700 | EOM | |
3701 | ||
3702 | case "$useithreads" in | |
3703 | $define) | |
3704 | cat <<EOM | |
3705 | This multiple interpreter support is required for interpreter-based threads. | |
3706 | EOM | |
3707 | val="$define" | |
3708 | ;; | |
3709 | *) case "$usemultiplicity" in | |
3710 | $define|true|[yY]*) dflt='y';; | |
3711 | *) dflt='n';; | |
3712 | esac | |
3713 | echo " " | |
3714 | echo "If this doesn't make any sense to you, just accept the default '$dflt'." | |
3715 | rp='Build Perl for multiplicity?' | |
3716 | . ./myread | |
3717 | case "$ans" in | |
3718 | y|Y) val="$define" ;; | |
3719 | *) val="$undef" ;; | |
3720 | esac | |
3721 | ;; | |
3722 | esac | |
3723 | set usemultiplicity | |
3724 | eval $setvar | |
3725 | ||
96056487 JH |
3726 | |
3727 | case "$usemorebits" in | |
3728 | "$define"|true|[yY]*) | |
3729 | use64bitint="$define" | |
3730 | uselongdouble="$define" | |
3731 | usemorebits="$define" | |
3732 | ;; | |
3733 | *) usemorebits="$undef" | |
3734 | ;; | |
3735 | esac | |
3736 | ||
e5e20432 JH |
3737 | : make some quick guesses about what we are up against |
3738 | echo " " | |
3739 | $echo $n "Hmm... $c" | |
3740 | echo exit 1 >bsd | |
3741 | echo exit 1 >usg | |
3742 | echo exit 1 >v7 | |
3743 | echo exit 1 >osf1 | |
3744 | echo exit 1 >eunice | |
3745 | echo exit 1 >xenix | |
3746 | echo exit 1 >venix | |
3747 | echo exit 1 >os2 | |
3748 | d_bsd="$undef" | |
3749 | $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null | |
3750 | if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 | |
3751 | then | |
3752 | echo "Looks kind of like an OSF/1 system, but we'll see..." | |
3753 | echo exit 0 >osf1 | |
381aa1ff | 3754 | elif test `echo abc | $tr a-z A-Z` = Abc ; then |
e5e20432 JH |
3755 | xxx=`./loc addbib blurfl $pth` |
3756 | if $test -f $xxx; then | |
3757 | echo "Looks kind of like a USG system with BSD features, but we'll see..." | |
3758 | echo exit 0 >bsd | |
3759 | echo exit 0 >usg | |
3760 | else | |
3761 | if $contains SIGTSTP foo >/dev/null 2>&1 ; then | |
3762 | echo "Looks kind of like an extended USG system, but we'll see..." | |
3763 | else | |
3764 | echo "Looks kind of like a USG system, but we'll see..." | |
3765 | fi | |
3766 | echo exit 0 >usg | |
3767 | fi | |
3768 | elif $contains SIGTSTP foo >/dev/null 2>&1 ; then | |
3769 | echo "Looks kind of like a BSD system, but we'll see..." | |
3770 | d_bsd="$define" | |
3771 | echo exit 0 >bsd | |
3772 | else | |
3773 | echo "Looks kind of like a Version 7 system, but we'll see..." | |
3774 | echo exit 0 >v7 | |
3775 | fi | |
3776 | case "$eunicefix" in | |
3777 | *unixtovms*) | |
3778 | $cat <<'EOI' | |
3779 | There is, however, a strange, musty smell in the air that reminds me of | |
3780 | something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. | |
3781 | EOI | |
3782 | echo exit 0 >eunice | |
3783 | d_eunice="$define" | |
3784 | : it so happens the Eunice I know will not run shell scripts in Unix format | |
3785 | ;; | |
3786 | *) | |
3787 | echo " " | |
3788 | echo "Congratulations. You aren't running Eunice." | |
3789 | d_eunice="$undef" | |
3790 | ;; | |
3791 | esac | |
3792 | : Detect OS2. The p_ variable is set above in the Head.U unit. | |
3d5d58b1 JH |
3793 | : Note that this also -- wrongly -- detects e.g. dos-djgpp, which also uses |
3794 | : semicolon as a patch separator | |
e5e20432 JH |
3795 | case "$p_" in |
3796 | :) ;; | |
3797 | *) | |
3798 | $cat <<'EOI' | |
3799 | I have the feeling something is not exactly right, however...don't tell me... | |
3800 | lemme think...does HAL ring a bell?...no, of course, you're only running OS/2! | |
3d5d58b1 | 3801 | (Or you may be running DOS with DJGPP.) |
e5e20432 JH |
3802 | EOI |
3803 | echo exit 0 >os2 | |
3804 | ;; | |
3805 | esac | |
3806 | if test -f /xenix; then | |
3807 | echo "Actually, this looks more like a XENIX system..." | |
3808 | echo exit 0 >xenix | |
3809 | d_xenix="$define" | |
3810 | else | |
3811 | echo " " | |
3812 | echo "It's not Xenix..." | |
3813 | d_xenix="$undef" | |
3814 | fi | |
3815 | chmod +x xenix | |
3816 | $eunicefix xenix | |
3817 | if test -f /venix; then | |
3818 | echo "Actually, this looks more like a VENIX system..." | |
3819 | echo exit 0 >venix | |
3820 | else | |
3821 | echo " " | |
3822 | if ./xenix; then | |
3823 | : null | |
3824 | else | |
3825 | echo "Nor is it Venix..." | |
3826 | fi | |
3827 | fi | |
3828 | chmod +x bsd usg v7 osf1 eunice xenix venix os2 | |
3829 | $eunicefix bsd usg v7 osf1 eunice xenix venix os2 | |
3830 | $rm -f foo | |
3831 | ||
5869b1f1 JH |
3832 | case "$cc" in |
3833 | '') dflt=cc;; | |
3834 | *) dflt="$cc";; | |
3835 | esac | |
3836 | rp="Use which C compiler?" | |
3837 | . ./myread | |
3838 | cc="$ans" | |
6b769f8f RB |
3839 | |
3840 | : See if they have not cc but they do have gcc | |
3841 | . ./trygcc | |
e5e20432 JH |
3842 | : Look for a hint-file generated 'call-back-unit'. Now that the |
3843 | : user has specified the compiler, we may need to set or change some | |
3844 | : other defaults. | |
3845 | if $test -f cc.cbu; then | |
3846 | . ./cc.cbu | |
3847 | fi | |
2573c5f9 | 3848 | . ./checkcc |
8a27cf78 | 3849 | |
e5e20432 JH |
3850 | echo " " |
3851 | echo "Checking for GNU cc in disguise and/or its version number..." >&4 | |
5440bc8e | 3852 | $cat >try.c <<EOM |
e5e20432 JH |
3853 | #include <stdio.h> |
3854 | int main() { | |
3855 | #ifdef __GNUC__ | |
3856 | #ifdef __VERSION__ | |
3857 | printf("%s\n", __VERSION__); | |
3858 | #else | |
3859 | printf("%s\n", "1"); | |
3860 | #endif | |
3861 | #endif | |
073b6de5 | 3862 | return(0); |
e5e20432 JH |
3863 | } |
3864 | EOM | |
5440bc8e JH |
3865 | if $cc -o try $ccflags $ldflags try.c; then |
3866 | gccversion=`$run ./try` | |
e5e20432 JH |
3867 | case "$gccversion" in |
3868 | '') echo "You are not using GNU cc." ;; | |
fc68435e | 3869 | *) echo "You are using GNU cc $gccversion." |
48fe685d | 3870 | ccname=gcc |
fc68435e | 3871 | ;; |
e5e20432 JH |
3872 | esac |
3873 | else | |
3874 | echo " " | |
3875 | echo "*** WHOA THERE!!! ***" >&4 | |
3876 | echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4 | |
3877 | case "$knowitall" in | |
3878 | '') | |
3879 | echo " You'd better start hunting for one and let me know about it." >&4 | |
3880 | exit 1 | |
3881 | ;; | |
3882 | esac | |
3883 | fi | |
5440bc8e | 3884 | $rm -f try try.* |
e5e20432 JH |
3885 | case "$gccversion" in |
3886 | 1*) cpp=`./loc gcc-cpp $cpp $pth` ;; | |
3887 | esac | |
5b463ca7 KS |
3888 | case "$gccversion" in |
3889 | '') gccosandvers='' ;; | |
10b4ebb5 JH |
3890 | *) gccshortvers=`echo "$gccversion"|sed 's/ .*//'` |
3891 | gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"` | |
3892 | gccshortvers='' | |
5b463ca7 | 3893 | case "$gccosandvers" in |
02903077 JH |
3894 | $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr |
3895 | $osname$osvers) ;; # looking good | |
5b463ca7 KS |
3896 | $osname*) cat <<EOM >&4 |
3897 | ||
3898 | *** WHOA THERE!!! *** | |
3899 | ||
3900 | Your gcc has not been compiled for the exact release of | |
3901 | your operating system ($gccosandvers versus $osname$osvers). | |
3902 | ||
3903 | In general it is a good idea to keep gcc synchronized with | |
3904 | the operating system because otherwise serious problems | |
3905 | may ensue when trying to compile software, like Perl. | |
3906 | ||
3907 | I'm trying to be optimistic here, though, and will continue. | |
3908 | If later during the configuration and build icky compilation | |
02903077 JH |
3909 | problems appear (headerfile conflicts being the most common |
3910 | manifestation), I suggest reinstalling the gcc to match | |
5b463ca7 KS |
3911 | your operating system release. |
3912 | ||
3913 | EOM | |
3914 | ;; | |
81575342 | 3915 | *) gccosandvers='' ;; # failed to parse, better be silent |
5b463ca7 KS |
3916 | esac |
3917 | ;; | |
3918 | esac | |
e723fc21 JH |
3919 | case "$ccname" in |
3920 | '') ccname="$cc" ;; | |
3921 | esac | |
e5e20432 | 3922 | |
224cb7cb | 3923 | # gcc 3.* complain about adding -Idirectories that they already know about, |
76589481 JH |
3924 | # so we will take those off from locincpth. |
3925 | case "$gccversion" in | |
3926 | 3*) | |
3927 | echo "main(){}">try.c | |
224cb7cb JH |
3928 | for incdir in $locincpth; do |
3929 | warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \ | |
48fe685d | 3930 | grep '^c[cp]p*[01]: warning: changing search order '` |
224cb7cb | 3931 | if test "X$warn" != X; then |
44b94491 | 3932 | locincpth=`echo " $locincpth " | sed "s! $incdir ! !"` |
224cb7cb | 3933 | fi |
76589481 JH |
3934 | done |
3935 | $rm -f try try.* | |
3936 | esac | |
640374d0 | 3937 | |
bd9b35c9 JH |
3938 | : decide how portable to be. Allow command line overrides. |
3939 | case "$d_portable" in | |
3940 | "$undef") ;; | |
3941 | *) d_portable="$define" ;; | |
104d25b7 | 3942 | esac |
85ab1d1d | 3943 | |
bd9b35c9 JH |
3944 | : set up shell script to do ~ expansion |
3945 | cat >filexp <<EOSS | |
3946 | $startsh | |
3947 | : expand filename | |
3948 | case "\$1" in | |
3949 | ~/*|~) | |
3950 | echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|" | |
3951 | ;; |