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