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