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