[project @ 1997-06-05 23:55:16 by sof]
[ghc-hetmet.git] / configure.in
1 dnl == autoconf source for the Glasgow FP tools ==
2 dnl (grep for '^dnl' to see the outline of this file)
3 dnl
4 dnl * INITIAL SETUP, CHOICE OF PLATFORM(S)
5 #!/bin/sh
6 #
7 # (c) The AQUA Project, Glasgow University, 1994-1997
8 #
9 # Configure script for the Glasgow functional programming tools
10 # (created automagically by autoconf...do not edit by hand)
11 #
12 # Do "./configure --help" to see what flags are available.
13 # (Better yet, read the documentation!)
14 #
15 # First off, a distrib sanity check..
16 AC_INIT(mk/config.mk.in)
17
18 # -------------------------------------------------------------------------
19 # Prepare to generate the following header files
20 #
21 #
22 AC_CONFIG_HEADER(mk/config.h)
23
24 # No, we don't do `--srcdir'...
25 if test x"$srcdir" != 'x.' ; then
26     echo "This configuration does not support the \`--srcdir' option.."
27     exit 1
28 fi
29
30 #
31 # Remove some automounter nonsense (Glasgow specific gruff)
32 #
33 hardtop=`pwd`
34 hardtop=`echo $hardtop | sed 's|^/tmp_mnt/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|'`
35
36 #OLD: hardtop=`echo $hardtop | sed 's|^/tmp_mnt/|/|' | sed 's|^/export/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|'`
37
38 echo ''
39 echo "*** The top of your build tree is: $hardtop"
40 AC_SUBST(hardtop)
41
42 # -------------------------------------------------------------------------
43 dnl ** choose host(/target/build) platform
44 #
45 # Guess host/target/build platform(s) if necessary.
46 #
47 AC_CANONICAL_SYSTEM
48
49 # "$host" defaults to "$target"
50 if test "x$host" = xNONE ; then
51     host=$target
52 fi
53 # "$build" defaults to "$host"
54 #if test "x$build" = xNONE ; then
55 #    build=$host
56 #else
57 #    echo "This configuration does not support the \`--build' option."
58 #    exit 1
59 #fi
60
61 dnl ** canonicalize platform names
62 # Canonicali[sz]e those babies
63 BuildPlatform=`/bin/sh $srcdir/config.sub $build` || exit 1
64 HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
65 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
66
67 if test x"$TargetPlatform" != x"$HostPlatform" ; then
68     echo "GHC configuration does not support differing host/target (i.e., cross-compiling)"
69     exit 1
70 fi
71
72 #
73 # The following will be more difficult when we *are* cross-compiling.
74 # Suitable names to slam in *_CPP are in platform.h.in.
75 # We also record the architecture, vendor, and operating system (OS)
76 # separately.
77 HostPlatformFull=$HostPlatform
78 case $HostPlatform in
79 alpha-dec-osf[[1234]]*)
80         HostPlatform=alpha-dec-osf1   # canonicalise for our purposes
81         TargetPlatform=alpha-dec-osf1 # this will work for now... (hack)
82         BuildPlatform=alpha-dec-osf1  # hack
83         HostPlatform_CPP='alpha_dec_osf1'
84         HostArch_CPP='alpha'
85         HostVendor_CPP='dec'
86         HostOS_CPP='osf1'
87         ;;
88 hppa1.1-hp-hpux*)
89         HostPlatform=hppa1.1-hp-hpux  # canonicalise for our purposes (hack)
90         TargetPlatform=hppa1.1-hp-hpux
91         BuildPlatform=hppa1.1-hp-hpux
92         HostPlatform_CPP='hppa1_1_hp_hpux'
93         HostArch_CPP='hppa1_1'
94         HostVendor_CPP='hp'
95         HostOS_CPP='hpux'
96         ;;
97 i[[3456]]86-*-linuxaout*)
98         HostPlatform=i386-unknown-linuxaout   # hack again
99         TargetPlatform=i386-unknown-linuxaout
100         BuildPlatform=i386-unknown-linuxaout
101         HostPlatform_CPP='i386_unknown_linuxaout'
102         HostArch_CPP='i386'
103         HostVendor_CPP='unknown'
104         HostOS_CPP='linuxaout'
105         ;;
106 i[[3456]]86-*-linux*)
107         HostPlatform=i386-unknown-linux # hack again
108         TargetPlatform=i386-unknown-linux
109         BuildPlatform=i386-unknown-linux
110         HostPlatform_CPP='i386_unknown_linux'
111         HostArch_CPP='i386'
112         HostVendor_CPP='unknown'
113         HostOS_CPP='linux'
114         ;;
115 i[[3456]]86-*-freebsd*)
116         HostPlatform=i386-unknown-freebsd # hack again
117         TargetPlatform=i386-unknown-freebsd
118         BuildPlatform=i386-unknown-freebsd
119         HostPlatform_CPP='i386_unknown_freebsd'
120         HostArch_CPP='i386'
121         HostVendor_CPP='unknown'
122         HostOS_CPP='freebsd'
123         ;;
124 i[[3456]]86-*-netbsd*)
125         HostPlatform=i386-unknown-netbsd # hack again
126         TargetPlatform=i386-unknown-netbsd
127         BuildPlatform=i386-unknown-netbsd
128         HostPlatform_CPP='i386_unknown_netbsd'
129         HostArch_CPP='i386'
130         HostVendor_CPP='unknown'
131         HostOS_CPP='netbsd'
132         ;;
133 i[[3456]]86-*-solaris2*)
134         HostPlatform=i386-unknown-solaris2 # hack again
135         TargetPlatform=i386-unknown-solaris2
136         BuildPlatform=i386-unknown-solaris2
137         HostPlatform_CPP='i386_unknown_solaris2'
138         HostArch_CPP='i386'
139         HostVendor_CPP='unknown'
140         HostOS_CPP='solaris2'
141         ;;
142 i[[3456]]86-*-cygwin32*)
143         HostPlatform=i386-unknown-cygwin32 # hack again
144         TargetPlatform=i386-unknown-cygwin32
145         BuildPlatform=i386-unknown-cygwin32
146         HostPlatform_CPP='i386_unknown_cygwin32'
147         HostArch_CPP='i386'
148         HostVendor_CPP='unknown'
149         HostOS_CPP='cygwin32'
150         ;;
151 m68k-next-nextstep2)
152         HostPlatform_CPP='m68k_next_nextstep2'
153         HostArch_CPP='m68k'
154         HostVendor_CPP='next'
155         HostOS_CPP='nextstep2'
156         ;;
157 m68k-next-nextstep3)
158         HostPlatform_CPP='m68k_next_nextstep3'
159         HostArch_CPP='m68k'
160         HostVendor_CPP='next'
161         HostOS_CPP='nextstep3'
162         ;;
163 i[[3456]]86-next-nextstep3)
164         HostPlatform=i386-next-nextstep3 # hack again
165         TargetPlatform=i386-next-nextstep3
166         BuildPlatform=i386-next-nextstep3
167         HostPlatform_CPP='i386_next_nextstep3'
168         HostArch_CPP='i386'
169         HostVendor_CPP='next'
170         HostOS_CPP='nextstep3'
171         ;;
172 m68k-sun-sunos4*)
173         HostPlatform=m68k-sun-sunos4
174         TargetPlatform=m68k-sun-sunos4 #hack
175         BuildPlatform=m68k-sun-sunos4 #hack
176         HostPlatform_CPP='m68k_sun_sunos4'
177         HostArch_CPP='m68k'
178         HostVendor_CPP='sun'
179         HostOS_CPP='sunos4'
180         ;;
181 mips-dec-ultrix*)
182         HostPlatform_CPP='mips_dec_ultrix'
183         HostArch_CPP='mipsel'   # NB a little different
184         HostVendor_CPP='dec'
185         HostOS_CPP='ultrix'
186         ;;
187 mips-sgi-irix*)
188         HostPlatform=mips-sgi-irix
189         TargetPlatform=mips-sgi-irix #hack
190         BuildPlatform=mips-sgi-irix #hack
191         HostPlatform_CPP='mips_sgi_irix'
192         HostArch_CPP='mipseb'   # NB a little different
193         HostVendor_CPP='sgi'
194         HostOS_CPP='irix'
195         ;;
196 rs6000-ibm-aix*)
197         HostPlatform=rs6000-ibm-aix
198         TargetPlatform=rs6000-ibm-aix #hack
199         BuildPlatform=rs6000-ibm-aix #hack
200         HostPlatform_CPP='rs6000_ibm_aix'
201         HostArch_CPP='rs6000'
202         HostVendor_CPP='ibm'
203         HostOS_CPP='aix'
204         ;;
205 powerpc-ibm-aix*)
206         HostPlatform=powerpc-ibm-aix
207         TargetPlatform=powerpc-ibm-aix #hack
208         BuildPlatform=powerpc-ibm-aix #hack
209         HostPlatform_CPP='powerpc_ibm_aix'
210         HostArch_CPP='powerpc'
211         HostVendor_CPP='ibm'
212         HostOS_CPP='aix'
213         ;;
214 sparc-sun-sunos4*)
215         HostPlatform=sparc-sun-sunos4
216         TargetPlatform=sparc-sun-sunos4 #hack
217         BuildPlatform=sparc-sun-sunos4 #hack
218         HostPlatform_CPP='sparc_sun_sunos4'
219         HostArch_CPP='sparc'
220         HostVendor_CPP='sun'
221         HostOS_CPP='sunos4'
222         ;;
223 sparc-sun-solaris2*)
224         HostPlatform=sparc-sun-solaris2
225         TargetPlatform=sparc-sun-solaris2 #hack
226         BuildPlatform=sparc-sun-solaris2 #hack
227         HostPlatform_CPP='sparc_sun_solaris2'
228         HostArch_CPP='sparc'
229         HostVendor_CPP='sun'
230         HostOS_CPP='solaris2'
231         ;;
232 *)
233         echo "Unrecognised platform: $HostPlatform"
234         exit 1
235         ;;
236 esac
237 echo "Which we'll canonicalise into: $HostPlatform"
238 test  x"$HostPlatform" != x"$TargetPlatform" && echo "Target platform set to $TargetPlatform"
239 test  x"$BuildPlatform" != x"$HostPlatform"  && echo "Build platform set to $BuildPlatform"
240
241 BuildPlatform_CPP=$HostPlatform_CPP
242 TargetPlatform_CPP=$HostPlatform_CPP
243 BuildArch_CPP=$HostArch_CPP
244 TargetArch_CPP=$HostArch_CPP
245 BuildOS_CPP=$HostOS_CPP
246 TargetOS_CPP=$HostOS_CPP
247 BuildVendor_CPP=$HostVendor_CPP
248 TargetVendor_CPP=$HostVendor_CPP
249
250 dnl Cannot afford all these SUBSTs (because of braindead seds w/ 99 cmd limits)
251 dnl AC_SUBST(BuildPlatform)
252 AC_SUBST(HostPlatformFull)
253 AC_SUBST(HostPlatform)
254 AC_SUBST(TargetPlatform)
255 AC_SUBST(HostPlatform_CPP)
256 dnl AC_SUBST(BuildPlatform_CPP)
257 dnl AC_SUBST(TargetPlatform_CPP)
258 AC_SUBST(HostArch_CPP)
259 dnl AC_SUBST(BuildArch_CPP)
260 dnl AC_SUBST(TargetArch_CPP)
261 AC_SUBST(HostOS_CPP)
262 dnl AC_SUBST(BuildOS_CPP)
263 dnl AC_SUBST(TargetOS_CPP)
264 AC_SUBST(HostVendor_CPP)
265 dnl AC_SUBST(BuildVendor_CPP)
266 dnl AC_SUBST(TargetVendor_CPP)
267
268 # -------------------------------------------------------------------------
269 dnl
270 dnl * _GENERAL_ CONFIGURATION CHECKS
271 #
272 dnl ** are we at Glasgow?
273 #
274 # This stuff is in danger of going away..
275 #
276 if test -d /local/fp -a -d /users/fp/simonpj; then
277     echo "Brilliant!  You must be a Glaswegian."
278     AT_GLASGOW=1
279     if test "x$prefix" = xNONE; then
280         prefix=/local/fp
281         echo "Assuming installation prefix of $prefix"
282     fi
283     if test "x$exec_prefix" = xNONE; then
284         # Sigh: the defn of exec_prefix does not include the bin* bit...
285         # WDP 94/07
286         exec_prefix=/local/fp
287         echo "Assuming binary installation prefix of $exec_prefix"
288     fi
289 else
290     AT_GLASGOW=0
291 fi
292 AC_SUBST(AT_GLASGOW)
293 test -n "$verbose" && echo "    setting AT_GLASGOW to $AT_GLASGOW"
294 #
295 #
296 #
297 dnl ** does #! work?
298 #
299 AC_SYS_INTERPRETER()
300 #
301 dnl ** look for `perl', but watch out for version 4.035
302 #
303 AC_CHECK_PROG(PerlCmd,perl,$ac_dir/$ac_word)
304 if test -z "$PerlCmd"; then
305     echo "You must install perl before you can continue"
306     echo "Perhaps it is already installed, but not in your PATH?"
307     exit 1
308 else
309     $PerlCmd -v >conftest.out 2>&1
310     if egrep "version 4" conftest.out >/dev/null 2>&1; then
311         if egrep "Patch level: 35" conftest.out >/dev/null 2>&1; then
312             echo "
313 ************************************************************************
314 Uh-oh...looks like you have Perl 4.035.
315
316 Perl version 4.035 has a bug to do with recursion that will bite if
317 you run the lit2texi script, when making Info files from
318 literate files of various sorts.  Either use the current version
319 (4.036), an older version (e.g., perl 4.019) or apply the patch in
320 glafp-utils/perl-4.035-fixes to your 4.035 perl.
321 ************************************************************************
322 "
323         fi
324     else
325         if egrep "version 5" conftest.out >/dev/null 2>&1; then
326             :
327         else
328             echo "I'm not sure if your version of perl will work,"
329             echo "but it's worth a shot, eh?"
330         fi
331     fi
332     rm -fr conftest*
333 fi
334 #
335 dnl ** does #!.../perl work? (sometimes it's too long...)
336 echo "checking if \`#!$PerlCmd' works in shell scripts"
337 echo "#!$PerlCmd"'
338 exit $1;
339 ' > conftest
340 chmod u+x conftest
341 (SHELL=/bin/sh; export SHELL; ./conftest 69 > /dev/null)
342 if test $? -ne 69; then
343    echo "It does!"
344 else
345    echo "It doesn't!  Perhaps \`#!$PerlCmd' is too long (often 32 characters max)"
346    exit 1
347 fi
348 rm -f conftest
349 #
350 dnl ** check if perl library is properly installed
351 # (by seeing if a "do 'getopts.pl'" works...
352 if $PerlCmd -e 'do "getopts.pl" || exit(1); exit(0);' > /dev/null 2>&1 ; then
353     :
354 else
355     echo "I think your perl library is misinstalled:"
356     echo "The following script did not work:"
357     echo '      do "getopts.pl" || exit(1); exit(0);'
358     echo 'But, anyway, we will continue in our quest..'
359 fi
360 #
361 #
362 dnl ** look for GCC and find out which version
363 # Figure out which C compiler to use.  Gcc is preferred.
364 # If gcc, make sure it's at least 2.1
365 #
366 AC_PROG_CC
367 if test -z "$GCC"; then
368     echo "You would be better off with gcc"
369     echo "Perhaps it is already installed, but not in your PATH?"
370     HaveGcc='NO'
371 else
372     gcc -v > conftest.out 2>&1
373     echo '/version (\d+)\.(\d+)/ && $1*10+$2 > 20 && print "YES";' > conftest.pl
374     HaveGcc=`eval $PerlCmd -n conftest.pl conftest.out`
375     if test -z "$HaveGcc"; then
376         echo "I'm not sure if your version of gcc will work,"
377         echo "but it's worth a shot, eh?"
378         HaveGcc='YES'
379     fi
380     rm -fr conftest*
381 fi
382 AC_SUBST(HaveGcc)
383
384 # Deprecated (AC_PROG_CC does it): AC_C_CROSS
385 #
386 dnl ** figure out how to do context diffs
387 # (NB: NeXTStep thinks diff'ing a file against itself is "trouble")
388 #
389 echo foo > conftest1
390 echo foo > conftest2
391 if diff -C 1 conftest1 conftest2 > /dev/null 2>&1 ; then
392     ContextDiffCmd='diff -C 1'
393 else
394     if diff -c1 conftest1 conftest2 > /dev/null 2>&1 ; then
395         ContextDiffCmd='diff -c1'
396     else
397         echo "Can't figure out how to do context diffs."
398         echo "Neither \`diff -C 1' nor \`diff -c1' works."
399         exit 1
400     fi
401 fi
402 rm -f conftest1 conftest2
403 AC_SUBST(ContextDiffCmd)
404 #
405 dnl ** look for a decent parser generator (bison preferred)
406 #
407 #
408 AC_CHECK_PROG(YaccCmd, bison, bison -y)
409 if test -z "$YaccCmd"; then
410     echo "Can't find bison out there..."
411     AC_CHECK_PROG(WhatCmd, what, what, :)
412     AC_CHECK_PROG(YaccCmd, yacc, $ac_dir/$ac_word)
413     if test -z "$YaccCmd"; then
414         echo "But that's okay...I can't find yacc either."
415         YaccCmd=:
416     else
417         $WhatCmd $YaccCmd > conftest.out
418         if egrep 'y1\.c 1\..*SMI' conftest.out >/dev/null 2>&1; then
419             echo "I don't trust your $YaccCmd; it looks like an old Sun yacc"
420             if test -f /usr/lang/yacc; then
421                 echo "I'm going to use /usr/lang/yacc instead"
422                 YaccCmd=/usr/lang/yacc
423             else
424                 echo "I'm assuming the worst...no parser generator at all"
425                 YaccCmd=:
426             fi
427         elif egrep 'y1\.c.*Revision: 4\.2\.6\.3.*DEC' conftest.out >/dev/null 2>&1; then
428             echo "I don't trust your $YaccCmd; it looks like a lame DEC yacc"
429             echo "I'm assuming the worst...no parser generator at all"
430             YaccCmd=:
431         else
432             echo "But that's okay...as far as I know, your yacc will work."
433         fi
434         rm -fr conftest*
435     fi
436 fi
437
438 dnl ** Find lex command (lex or flex) and library (-ll or -lfl)
439 #
440 AC_PROG_LEX
441
442 # -------------------------------------------------------------------------
443 #
444 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
445 #
446 AC_PROG_CPP
447 if echo $CPP | egrep gcc >/dev/null 2>&1; then
448     echo > conftest.c
449     gcc -v -E conftest.c >/dev/null 2>conftest.out
450     echo '/(\S+\/cpp)/ && print "$1";' > conftest.pl
451     # GNUCPP: used in jmake.c (GnuCppCmd) and in mkdependC
452     # (where we could do with the usual pre-#defines)
453     GNUCPP="`eval $PerlCmd -n conftest.pl conftest.out`"
454     test -n "$verbose" && echo "        setting GNUCPP to $GNUCPP"
455     # RAWCPP: we do not want *any* pre-#defines...
456     # (e.g., hscpp, mkdependHS)
457     RAWCPP="`eval $PerlCmd -n conftest.pl conftest.out` -traditional"
458     test -n "$verbose" && echo "        setting RAWCPP to $RAWCPP"
459     rm -fr conftest*
460 fi
461 # ToDo: what are GNUCPP and RAWCPP if the above if didn't fire? WDP 95/02
462 AC_SUBST(GNUCPP)
463 AC_SUBST(RAWCPP)
464 #
465 dnl ** figure out how to do a BSD-ish install
466 #
467 AC_PROG_INSTALL
468 #
469 dnl ** figure out what arguments to feed to `ar'
470 #
471 AC_CHECK_PROG(ArCmd,ar,$ac_dir/$ac_word)
472 if test -z "$ArCmd"; then
473     echo "You don't seem to have ar...I have no idea how to make a library"
474     exit 1;
475 fi
476 if $ArCmd clqs conftest.a >/dev/null 2>/dev/null; then
477     ArCmd="$ArCmd clqs"
478     NeedRanLib=''
479 elif $ArCmd cqs conftest.a >/dev/null 2>/dev/null; then
480     ArCmd="$ArCmd cqs"
481     NeedRanLib=''
482 elif $ArCmd clq conftest.a >/dev/null 2>/dev/null; then
483     ArCmd="$ArCmd clq"
484     NeedRanLib='YES'
485 elif $ArCmd cq conftest.a >/dev/null 2>/dev/null; then
486     ArCmd="$ArCmd cq"
487     NeedRanLib='YES'
488 elif $ArCmd cq conftest.a 2>&1 | grep 'no archive members specified' >/dev/null 2>/dev/null; then
489     ArCmd="$ArCmd cq"
490     NeedRanLib='YES'
491 else
492     echo "I can't figure out how to use your $ArCmd"
493     exit 1
494 fi
495 rm -rf conftest*
496 test -n "$ArCmd" && test -n "$verbose" && echo "        setting ArCmd to $ArCmd"
497 AC_SUBST(ArCmd)
498 #
499 dnl ** figure out if we need `ranlib'
500 #
501 if test -z "$NeedRanLib"; then
502     # we hackily override a few platforms on a case-by-case basis
503     case $HostPlatform in
504     i386-*-linuxaout)
505         NeedRanLib='YES'
506         ;;
507     *)  RANLIB=':'
508         ;;
509     esac
510     test -n "$verbose" && echo "        setting RANLIB to $RANLIB"
511 fi
512 if test -n "$NeedRanLib"; then
513     AC_PROG_RANLIB
514 fi
515 AC_SUBST(RANLIB)
516 #
517 #
518 dnl ** Check to see whether ln -s works
519 #
520 AC_PROG_LN_S()
521 AC_SUBST(LN_S)
522 #
523 dnl ** Find the path to sed **
524 AC_PATH_PROG(SedCmd,sed,$ac_dir/$ac_word)
525
526 # It better be around somewhere (we wouldn't
527 # exec this script properly if it wasn't!)
528 #
529 AC_SUBST(SedCmd)
530 #
531 dnl ** check for time command **
532 AC_PATH_PROG(TimeCmd,time,$ac_dir/$ac_word)
533
534 AC_SUBST(TimeCmd)
535 #
536 dnl ** check for tar **
537 #
538 # if GNU tar is named gtar, look for it first.
539 #
540 AC_PATH_PROGS(TarCmd,gtar tar,tar)
541 AC_SUBST(TarCmd)
542
543 #
544 dnl ** check for gzip/compress **
545 AC_PATH_PROGS(CompressCmd,gzip compress,gzip)
546
547 compress_nm=`basename $CompressCmd`
548
549 if test x"$compress_nm" = xgzip; then
550   CompressCmd="$CompressCmd -d"
551   CompressSuffix="gz"
552 else
553   CompressSuffix="Z"
554 fi
555 AC_SUBST(CompressCmd)
556 AC_SUBST(CompressSuffix)
557 #
558 dnl ** check for installed happy binary
559 #
560 AC_PATH_PROG(HappyCmd,happy)
561 AC_SUBST(HappyCmd)
562 #
563 #
564 dnl ** check for installed lx binary
565 #
566 AC_PATH_PROG(LxCmd,lx)
567 AC_SUBST(LxCmd)
568 #
569 #
570 dnl ** check for full ANSI header (.h) files
571 #
572 AC_HEADER_STDC
573 #
574 dnl ** check for specific header (.h) files that we are interested in
575 #
576 AC_CHECK_HEADERS(dirent.h fcntl.h grp.h malloc.h memory.h nlist.h pwd.h siginfo.h signal.h stdlib.h string.h sys/fault.h sys/file.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/vadvise.h sys/wait.h termios.h time.h types.h unistd.h utime.h vfork.h readline/readline.h )
577 #
578 dnl ** check if it is safe to include both <time.h> and <sys/time.h>
579 #
580 AC_HEADER_TIME
581 #
582 dnl ** how do we get a timezone name, and UTC offset ?
583 #
584 AC_STRUCT_TIMEZONE
585 HaveAltZone=yes
586 AC_MSG_CHECKING([for altzone])
587 AC_TRY_LINK([#include <time.h>], [return altzone;], AC_DEFINE(HAVE_ALTZONE),HaveAltZone=no)
588 AC_MSG_RESULT($HaveAltZone)
589
590 dnl ** determine the type of signal()
591 #
592 AC_TYPE_SIGNAL
593 #
594 dnl ** check for specific library functions that we are interested in
595 #
596 AC_CHECK_FUNCS(access ftime getclock getpagesize getrusage gettimeofday mktime mprotect setitimer stat sysconf timelocal times vadvise vfork)
597 #
598 dnl ** can we get alloca?
599 #
600 AC_FUNC_ALLOCA
601 #
602 dnl ** determine whether or not const works
603 #
604 AC_C_CONST
605 #
606 dnl ** check for leading underscores in symbol names
607 # We assume that they _aren't_ there if anything goes wrong.
608 #
609 echo checking for a leading underscore in symbol names
610 AC_TRY_RUN(
611 [#ifdef HAVE_NLIST_H
612 #include <nlist.h>
613 struct nlist xYzzY[] = {{"_xYzzY", 0},{0}};
614 #endif
615
616 main(argc, argv)
617 int argc;
618 char **argv;
619 {
620 #ifdef HAVE_NLIST_H
621     if(nlist(argv[0], xYzzY) == 0 && xYzzY[0].n_value != 0)
622         exit(0);
623 #endif
624     exit(1);
625 }], LeadingUnderscore='YES', LeadingUnderscore='NO', LeadingUnderscore='YES')
626 test -n "$verbose" && echo "    setting LeadingUnderscore to $LeadingUnderscore"
627 AC_SUBST(LeadingUnderscore)
628
629 AC_OUTPUT(mk/config.mk, echo timestamp > mk/stamp-h )
630
631 #
632 # It'll break soon enough if it didn't, but we perform a sanity
633 # check here on the generated config.mk file to see if the
634 # sed that was used is of the well-behaved sort.
635 #
636 #grep @ mk/config.mk > conftest.out
637 #if grep -v '#     enclosed in @at-signs@.' conftest.out >/dev/null 2>&1; then
638 #   :
639 #else
640 #   echo 'Hmm..suspicious, did the configure script perform all the @..@ substitutions in mk/config.mk?..';
641 #   grep -v '#     enclosed in @at-signs@.' conftest.out /dev/null
642 #fi
643 #rm -f conftest*
644
645 echo ''
646 echo '************************************************'
647 echo '*** NOW DO: gmake boot followed by gmake all'
648 echo '************************************************'
649 exit 0