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