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