[project @ 1999-08-02 16:12:12 by simonmar]
[ghc-hetmet.git] / configure.in
1 dnl == autoconf source for the Glasgow FP tools ==
2 dnl (run "grep '^dnl \*' configure.in | sed -e 's/dnl / /g; s/\*\*/   +/g;'"
3 dnl  (or some such) to see the outline of this file)
4 dnl
5 #
6 # (c) The AQUA Project, Glasgow University, 1994-1998
7 #
8 # Configure script template for the Glasgow functional programming tools
9 #
10 # Process with 'autoconf' to get a working configure script.
11 #
12 # For the generated configure script, do "./configure --help" to
13 # see what flags are available. (Better yet, read the documentation!)
14 #
15
16 # First off, a distrib sanity check..
17 AC_INIT(mk/config.mk.in)
18
19 # -------------------------------------------------------------------------
20 # Prepare to generate the following header files
21 #
22 #
23 AC_CONFIG_HEADER(mk/config.h)
24
25 # No, semi-sadly, we don't do `--srcdir'...
26 if test x"$srcdir" != 'x.' ; then
27     echo "This configuration does not support the \`--srcdir' option.."
28     exit 1
29 fi
30
31 #
32 # Remove common automounter nonsense + convert from UNC to DOS style paths
33 # (UNC awareness isn't quite there yet for cygwin32-beta18 and consituent tools.)
34 #
35 hardtop=`pwd`
36 hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|' | sed 's|^//\(.\)/|\1:/|' `
37
38 echo ''
39 echo "*** The top of your build tree is: $hardtop"
40 AC_SUBST(hardtop)
41
42 dnl--------------------------------------------------------------------
43 dnl * Choose host(/target/build) platform
44 dnl--------------------------------------------------------------------
45
46 dnl Guess host/target/build platform(s) if necessary.
47 AC_CANONICAL_SYSTEM
48
49 # "$host" defaults to "$target"
50 if test "x$host" = xNONE ; then
51     host=$target
52 fi
53
54 dnl ** canonicalize platform names
55 BuildPlatform=`/bin/sh $srcdir/config.sub $build` || exit 1
56 HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
57 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
58
59 if test x"$TargetPlatform" != x"$HostPlatform" ; then
60     echo "GHC configuration does not support differing host/target (i.e., cross-compiling)"
61     exit 1
62 fi
63
64 exeext=''
65 #
66 # The following will be more difficult when we *are* cross-compiling.
67 # Suitable names to slam in *_CPP are in platform.h.in.
68 # We also record the architecture, vendor, and operating system (OS)
69 # separately.
70 case $HostPlatform in
71 alpha-dec-osf[[12]]*)
72         HostPlatform=alpha-dec-osf1   # canonicalise for our purposes
73         TargetPlatform=alpha-dec-osf1 # this will work for now... (hack)
74         BuildPlatform=alpha-dec-osf1  # hack
75         HostPlatform_CPP='alpha_dec_osf1'
76         HostArch_CPP='alpha'
77         HostVendor_CPP='dec'
78         HostOS_CPP='osf1'
79         ;;
80 alpha-dec-osf[[34]]*)
81         HostPlatform=alpha-dec-osf3   # canonicalise for our purposes
82         TargetPlatform=alpha-dec-osf3 # this will work for now... (hack)
83         BuildPlatform=alpha-dec-osf3  # hack
84         HostPlatform_CPP='alpha_dec_osf3'
85         HostArch_CPP='alpha'
86         HostVendor_CPP='dec'
87         HostOS_CPP='osf3'
88         ;;
89 hppa1.1-hp-hpux*)
90         HostPlatform=hppa1.1-hp-hpux  # canonicalise for our purposes (hack)
91         TargetPlatform=hppa1.1-hp-hpux
92         BuildPlatform=hppa1.1-hp-hpux
93         HostPlatform_CPP='hppa1_1_hp_hpux'
94         HostArch_CPP='hppa1_1'
95         HostVendor_CPP='hp'
96         HostOS_CPP='hpux'
97         ;;
98 i[[3456]]86-*-linuxaout*)
99         HostPlatform=i386-unknown-linuxaout   # hack again
100         TargetPlatform=i386-unknown-linuxaout
101         BuildPlatform=i386-unknown-linuxaout
102         HostPlatform_CPP='i386_unknown_linuxaout'
103         HostArch_CPP='i386'
104         HostVendor_CPP='unknown'
105         HostOS_CPP='linuxaout'
106         ;;
107 i[[3456]]86-*-linux*)
108         HostPlatform=i386-unknown-linux # hack again
109         TargetPlatform=i386-unknown-linux
110         BuildPlatform=i386-unknown-linux
111         HostPlatform_CPP='i386_unknown_linux'
112         HostArch_CPP='i386'
113         HostVendor_CPP='unknown'
114         HostOS_CPP='linux'
115         ;;
116 i[[3456]]86-*-freebsd3*) # FreeBSD 3.0+ uses ELF
117         HostPlatform=i386-unknown-freebsd3 # hack again
118         TargetPlatform=i386-unknown-freebsd3
119         BuildPlatform=i386-unknown-freebsd3
120         HostPlatform_CPP='i386_unknown_freebsd3'
121         HostArch_CPP='i386'
122         HostVendor_CPP='unknown'
123         HostOS_CPP='freebsd3'
124         ;;
125 i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out
126         HostPlatform=i386-unknown-freebsd2 # hack again
127         TargetPlatform=i386-unknown-freebsd2
128         BuildPlatform=i386-unknown-freebsd2
129         HostPlatform_CPP='i386_unknown_freebsd2'
130         HostArch_CPP='i386'
131         HostVendor_CPP='unknown'
132         HostOS_CPP='freebsd2'
133         ;;
134 i[[3456]]86-*-netbsd*)
135         HostPlatform=i386-unknown-netbsd # hack again
136         TargetPlatform=i386-unknown-netbsd
137         BuildPlatform=i386-unknown-netbsd
138         HostPlatform_CPP='i386_unknown_netbsd'
139         HostArch_CPP='i386'
140         HostVendor_CPP='unknown'
141         HostOS_CPP='netbsd'
142         ;;
143 i[[3456]]86-*-solaris2*)
144         HostPlatform=i386-unknown-solaris2 # hack again
145         TargetPlatform=i386-unknown-solaris2
146         BuildPlatform=i386-unknown-solaris2
147         HostPlatform_CPP='i386_unknown_solaris2'
148         HostArch_CPP='i386'
149         HostVendor_CPP='unknown'
150         HostOS_CPP='solaris2'
151         ;;
152 i[[3456]]86-*-cygwin32*)
153         HostPlatform=i386-unknown-cygwin32 # hack again
154         TargetPlatform=i386-unknown-cygwin32
155         BuildPlatform=i386-unknown-cygwin32
156         HostPlatform_CPP='i386_unknown_cygwin32'
157         HostArch_CPP='i386'
158         HostVendor_CPP='unknown'
159         HostOS_CPP='cygwin32'
160         exeext='.exe'
161         ;;
162 i[[3456]]86-*-mingw32*)
163         HostPlatform=i386-unknown-mingw32 # hack again
164         TargetPlatform=i386-unknown-mingw32
165         BuildPlatform=i386-unknown-mingw32
166         HostPlatform_CPP='i386_unknown_mingw32'
167         HostArch_CPP='i386'
168         HostVendor_CPP='unknown'
169         HostOS_CPP='mingw32'
170         exeext='.exe'
171         # We assume you're using mingw32 via the gcc that comes
172         # with cygwin, and not the native port, so let's augment
173         # the gcc command-line used here with -mno-cygwin to
174         # arrange for good things to happen.
175         CFLAGS="-mno-cygwin $CFLAGS"
176         ;;
177 m68k-next-nextstep2)
178         HostPlatform_CPP='m68k_next_nextstep2'
179         HostArch_CPP='m68k'
180         HostVendor_CPP='next'
181         HostOS_CPP='nextstep2'
182         ;;
183 m68k-next-nextstep3)
184         HostPlatform_CPP='m68k_next_nextstep3'
185         HostArch_CPP='m68k'
186         HostVendor_CPP='next'
187         HostOS_CPP='nextstep3'
188         ;;
189 i[[3456]]86-next-nextstep3)
190         HostPlatform=i386-next-nextstep3 # hack again
191         TargetPlatform=i386-next-nextstep3
192         BuildPlatform=i386-next-nextstep3
193         HostPlatform_CPP='i386_next_nextstep3'
194         HostArch_CPP='i386'
195         HostVendor_CPP='next'
196         HostOS_CPP='nextstep3'
197         ;;
198 m68k-sun-sunos4*)
199         HostPlatform=m68k-sun-sunos4
200         TargetPlatform=m68k-sun-sunos4 #hack
201         BuildPlatform=m68k-sun-sunos4 #hack
202         HostPlatform_CPP='m68k_sun_sunos4'
203         HostArch_CPP='m68k'
204         HostVendor_CPP='sun'
205         HostOS_CPP='sunos4'
206         ;;
207 mips-dec-ultrix*)
208         HostPlatform_CPP='mips_dec_ultrix'
209         HostArch_CPP='mipsel'   # NB a little different
210         HostVendor_CPP='dec'
211         HostOS_CPP='ultrix'
212         ;;
213 mips-sgi-irix*)
214         HostPlatform=mips-sgi-irix
215         TargetPlatform=mips-sgi-irix #hack
216         BuildPlatform=mips-sgi-irix #hack
217         HostPlatform_CPP='mips_sgi_irix'
218         HostArch_CPP='mipseb'   # NB a little different
219         HostVendor_CPP='sgi'
220         HostOS_CPP='irix'
221         ;;
222 rs6000-ibm-aix*)
223         HostPlatform=rs6000-ibm-aix
224         TargetPlatform=rs6000-ibm-aix #hack
225         BuildPlatform=rs6000-ibm-aix #hack
226         HostPlatform_CPP='rs6000_ibm_aix'
227         HostArch_CPP='rs6000'
228         HostVendor_CPP='ibm'
229         HostOS_CPP='aix'
230         ;;
231 powerpc-ibm-aix*)
232         HostPlatform=powerpc-ibm-aix
233         TargetPlatform=powerpc-ibm-aix #hack
234         BuildPlatform=powerpc-ibm-aix #hack
235         HostPlatform_CPP='powerpc_ibm_aix'
236         HostArch_CPP='powerpc'
237         HostVendor_CPP='ibm'
238         HostOS_CPP='aix'
239         ;;
240 sparc-sun-sunos4*)
241         HostPlatform=sparc-sun-sunos4
242         TargetPlatform=sparc-sun-sunos4 #hack
243         BuildPlatform=sparc-sun-sunos4 #hack
244         HostPlatform_CPP='sparc_sun_sunos4'
245         HostArch_CPP='sparc'
246         HostVendor_CPP='sun'
247         HostOS_CPP='sunos4'
248         ;;
249 sparc-sun-solaris2*)
250         HostPlatform=sparc-sun-solaris2
251         TargetPlatform=sparc-sun-solaris2 #hack
252         BuildPlatform=sparc-sun-solaris2 #hack
253         HostPlatform_CPP='sparc_sun_solaris2'
254         HostArch_CPP='sparc'
255         HostVendor_CPP='sun'
256         HostOS_CPP='solaris2'
257         ;;
258 *)
259         echo "Unrecognised platform: $HostPlatform"
260         exit 1
261         ;;
262 esac
263 echo "Canonicalised to: $HostPlatform"
264 test  x"$HostPlatform" != x"$TargetPlatform" && echo "Target platform set to $TargetPlatform"
265 test  x"$BuildPlatform" != x"$HostPlatform"  && echo "Build platform set to $BuildPlatform"
266
267 BuildPlatform_CPP=$HostPlatform_CPP
268 TargetPlatform_CPP=$HostPlatform_CPP
269 BuildArch_CPP=$HostArch_CPP
270 TargetArch_CPP=$HostArch_CPP
271 BuildOS_CPP=$HostOS_CPP
272 HostOS_Full=$host_os
273 TargetOS_CPP=$HostOS_CPP
274 BuildVendor_CPP=$HostVendor_CPP
275 TargetVendor_CPP=$HostVendor_CPP
276
277 dnl Cannot afford all these SUBSTs (because of braindead seds w/ 99 cmd limits)
278 dnl AC_SUBST(BuildPlatform)
279
280 AC_SUBST(HostPlatform)
281 AC_SUBST(TargetPlatform)
282 AC_SUBST(HostPlatform_CPP)
283 dnl AC_SUBST(BuildPlatform_CPP)
284 dnl AC_SUBST(TargetPlatform_CPP)
285
286 AC_SUBST(HostArch_CPP)
287 dnl AC_SUBST(BuildArch_CPP)
288 dnl AC_SUBST(TargetArch_CPP)
289
290 AC_SUBST(HostOS_CPP)
291 AC_SUBST(HostOS_Full)
292 dnl AC_SUBST(BuildOS_CPP)
293 dnl AC_SUBST(TargetOS_CPP)
294
295 AC_SUBST(HostVendor_CPP)
296 dnl AC_SUBST(BuildVendor_CPP)
297 dnl AC_SUBST(TargetVendor_CPP)
298
299 AC_SUBST(exeext)
300
301 dnl --------------------------------------------------------------
302 dnl * Project specific configuration options
303 dnl --------------------------------------------------------------
304 dnl What follows is a bunch of options that can either be configured
305 dnl through command line options to the configure script or by
306 dnl supplying defns in the build tree's mk/build.mk. Having the option to
307 dnl use either is considered a Feature.
308
309 dnl ** What command to use to compile compiler sources ?
310 dnl --------------------------------------------------------------
311 AC_ARG_WITH(ghc-hc,
312 [  --with-ghc-hc=<haskell compiler>
313         Use a command different from 'ghc-2.10' to compile up the GHC compiler sources.
314          (no claims currently made that this will work with a compiler other than a
315           recent version of GHC, but you could always try...)
316 ],
317 [WithGhcHc="$withval"],
318 [WithGhcHc="ghc"]
319 )
320 AC_SUBST(WithGhcHc)
321
322 dnl ** Which gcc to use?
323 dnl --------------------------------------------------------------
324 AC_ARG_WITH(gcc,
325 [  --with-gcc=<gcc command>
326         Use a different command instead of 'gcc' for the GNU C compiler.
327 ],
328 [WhatGccIsCalled="$withval"],
329 [WhatGccIsCalled="gcc"]
330 )
331 AC_SUBST(WhatGccIsCalled)
332
333 dnl ** Booting from .hc files?
334 dnl --------------------------------------------------------------
335 AC_ARG_ENABLE(hc-boot,
336 [  --enable-hc-boot
337         Boot the Glasgow Haskell Compiler from intermediate .hc files.
338         (This option is mostly of interest to porters.)
339 ],
340 [BootingFromHc=YES],
341 [BootingFromHc=NO]
342 )
343 AC_SUBST(BootingFromHc)
344
345
346 dnl ** Enable the construction of Win32 DLLs?
347 dnl --------------------------------------------------------------
348 AC_ARG_ENABLE(win32-dlls,
349 [  --enable-win32-dlls
350         If on a Win32 platform running mingw32/cygwin, enable the
351         construction of DLLs containing ghc-compiled code.
352 ],
353 [
354 case $HostOS_CPP in
355 cygwin32) ;;
356 mingw32)  ;;
357 *)    echo "Unrecognised win32 platform: $HostPlatform"
358       exit 1
359       ;;
360 esac
361 EnableWin32DLLs=YES
362 ],
363 [EnableWin32DLLs=NO]
364 )
365 AC_SUBST(EnableWin32DLLs)
366 if test x"$EnableWin32DLLs" = "xYES" ; then
367  AC_DEFINE(HAVE_WIN32_DLL_SUPPORT)
368 fi
369
370 dnl --------------------------------------------------------------
371 dnl End of configure script option section
372 dnl --------------------------------------------------------------
373
374
375 dnl --------------------------------------------------------------
376 dnl * General configuration checks
377 dnl --------------------------------------------------------------
378
379 dnl ** does #! work?
380 AC_SYS_INTERPRETER()
381
382 dnl ** look for `perl', but watch out for version 4.035
383 AC_PATH_PROG(PerlCmd,perl)
384 if test -z "$PerlCmd"; then
385    echo "You must install perl before you can continue"
386    echo "Perhaps it is already installed, but not in your PATH?"
387    exit 1
388 else
389 FPTOOLS_CHECK_PERL_VERSION
390 fi
391
392 dnl ** does #! path/to/perl work? (sometimes it's too long...)
393 FPTOOLS_SHEBANG_PERL
394
395
396 dnl ** look for GCC and find out which version
397 dnl     Figure out which C compiler to use.  Gcc is preferred.
398 dnl     If gcc, make sure it's at least 2.1
399 dnl
400 AC_PROG_CC
401 FPTOOLS_HAVE_GCC
402
403 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
404 AC_PROG_CPP
405
406 dnl ** figure out how to do context diffs
407 FPTOOLS_PROG_DIFF
408
409
410 dnl ** look for a decent parser generator (bison preferred)
411 dnl (FPTOOLS_PROG_YACCY is AC_PROG_YACC, but with some extra testing 
412 dnl  on the suitability of the 'yacc' returned.)
413 FPTOOLS_PROG_YACCY
414
415 dnl ** Find lex command (lex or flex) and library (-ll or -lfl)
416 dnl     ( not that we care about the latter, see mk/config.mk.in )
417 AC_PROG_LEX
418
419
420 dnl ** figure out how to do a BSD-ish install
421 AC_PROG_INSTALL
422
423 dnl If you can run configure, you certainly have /bin/sh
424 AC_DEFINE(HAVE_BIN_SH)
425
426 dnl ** how to invoke `ar' and `ranlib'
427 FPTOOLS_PROG_AR_AND_RANLIB
428
429
430 dnl ** Check to see whether ln -s works
431 AC_PROG_LN_S
432
433
434 dnl ** Find the path to sed
435 AC_PATH_PROG(SedCmd,sed)
436
437
438 dnl ** check for time command
439 AC_PATH_PROG(TimeCmd,time)
440
441
442 dnl ** check for tar
443 dnl   if GNU tar is named gtar, look for it first.
444 AC_PATH_PROGS(TarCmd,gtar tar,tar)
445
446 dnl ** check for gzip/compress
447 AC_PATH_PROGS(CompressCmd,gzip compress,gzip)
448
449 compress_nm=`basename $CompressCmd`
450 if test x"$compress_nm" = xgzip; then
451   CompressCmd="$CompressCmd -d"
452   CompressSuffix="gz"
453 else
454   CompressSuffix="Z"
455 fi
456 AC_SUBST(CompressCmd)
457 AC_SUBST(CompressSuffix)
458
459 dnl ** check for installed happy binary + version
460 dnl    (don't do it if we're booting from .hc files though.)
461 if (test "$BootingFromHc" = "NO"); then
462 FPTOOLS_HAPPY
463 fi;
464
465 dnl --------------------------------------------------
466 dnl ### program checking section ends here ###
467 dnl --------------------------------------------------
468
469 dnl --------------------------------------------------
470 dnl * Platform header file and syscall feature tests
471 dnl ### checking the state of the local header files and syscalls ###
472
473 dnl ** check for full ANSI header (.h) files
474 AC_HEADER_STDC
475
476 dnl ** check for specific header (.h) files that we are interested in
477 AC_CHECK_HEADERS(Files.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdlib.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netinet/tcp.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 termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h readline/readline.h bfd.h winsock.h)
478
479 dnl ** check for DOS include files
480 AC_CHECK_HEADERS(dos.h conio.h io.h std.h) 
481
482 dnl ** check for Windows include files
483 AC_CHECK_HEADERS(windows.h)
484
485 dnl ** check if it is safe to include both <time.h> and <sys/time.h>
486 AC_HEADER_TIME
487
488 dnl dynamic loading include files
489 AC_CHECK_HEADERS(dlfcn.h dl.h) 
490
491 dnl ** check for farcalloc (in bcc)
492 AC_CHECK_HEADER(alloc.h,AC_CHECK_FUNCS(farcalloc))
493
494 dnl ** check for valloc (in sunos, solaris, mips, amiga, next, minix, ultrix)
495 AC_CHECK_HEADER(malloc.h,AC_CHECK_FUNCS(valloc))
496
497 dnl ** how do we get a timezone name, and UTC offset ?
498 AC_STRUCT_TIMEZONE
499
500 dnl ** what's the type of timezone?
501 FPTOOLS_HAVE_TIMEZONE
502 FPTOOLS_TYPE_TIMEZONE
503
504 dnl ** do we have altzone?
505 FPTOOLS_ALTZONE
506
507 dnl ** does struct stat contain st_blksize?
508 AC_STRUCT_ST_BLKSIZE
509
510 dnl ** what are the sizes of various types
511 dnl    (these must come before GHC_CHECK_ALIGNMENT)
512 AC_CHECK_SIZEOF(unsigned int,4)
513 AC_CHECK_SIZEOF(float,       4)
514 AC_CHECK_SIZEOF(double,      8)
515 AC_CHECK_SIZEOF(long,        4)
516 AC_CHECK_SIZEOF(void *,      4)
517
518 dnl ** what are alignment constraints on various types
519 FPTOOLS_CHECK_ALIGNMENT(unsigned int) dnl redundant but harmless
520 FPTOOLS_CHECK_ALIGNMENT(long)
521 FPTOOLS_CHECK_ALIGNMENT(float)
522 FPTOOLS_CHECK_ALIGNMENT(double)
523
524 dnl ** do we have long longs?
525 FPTOOLS_C_LONG_LONG
526
527 dnl ** can we open files in binary mode?
528 FPTOOLS_O_BINARY
529
530 dnl ** check for GetModuleFileName and WinExec (windows only)
531 dnl Old: AC_CHECK_FUNCS(WinExec GetModuleFileName)       dnl Windows
532 dnl Doesn't work because the linker can't see the functions if
533 dnl you omit the #include <windows.h>.  (I've no idea why not...)
534
535 FPTOOLS_TRY_LINK_NOWARN(,[
536 #if HAVE_WINDOWS_H
537 #include <windows.h>
538 #endif
539 main() { 
540   WinExec("",0);
541   exit(0);
542 }
543 ],
544 [have_winexec=1],
545 [have_winexec=0])
546 if test "$have_winexec" = "1"; then
547 AC_DEFINE(HAVE_WINEXEC)
548 fi
549
550 FPTOOLS_TRY_LINK_NOWARN(,[
551 #if HAVE_WINDOWS_H
552 #include <windows.h>
553 #endif
554 main() { 
555   char* dir;
556   GetModuleFileName((HMODULE)0,dir,0);
557   exit(0);
558 }
559 ],
560 [have_getmodulefilename=1],
561 [have_getmodulefilename=0])
562 if test "$have_getmodulefilename" = "1"; then
563 AC_DEFINE(HAVE_GETMODULEFILENAME)
564 fi
565
566 dnl ** check return type of signal handlers
567 dnl Foo: assumes we can use prototypes.
568 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
569 dnl AC_CACHE_CHECK([type of signal handlers], ac_cv_type_signal_handler,
570 dnl [AC_TRY_COMPILE([#include <sys/types.h>
571 dnl #include <signal.h>
572 dnl #ifdef signal
573 dnl #undef signal
574 dnl #endif
575 dnl void (*signal (int, void (*)(int)))(int);
576 dnl ],
577 dnl [int i;], 
578 dnl ac_cv_type_signal_handler=void_int,
579 dnl ac_cv_type_signal_handler=int_void)])
580 dnl if test "$ac_cv_type_signal_handler" = void_int; then
581 dnl AC_DEFINE(VOID_INT_SIGNALS)
582 dnl fi
583
584 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
585 AC_TYPE_SIGNAL
586 if test "$ac_cv_type_signal" = void; then
587 AC_DEFINE(VOID_INT_SIGNALS)
588 fi
589
590 dnl ** check for more functions
591 AC_CHECK_FUNCS(strcasecmp _stricmp stricmp strcmpi)
592 AC_CHECK_FUNCS(strcmp)
593 AC_CHECK_FUNCS(realpath _fullpath)  
594 AC_CHECK_FUNCS(PBHSetVolSync macsystem)  
595 AC_CHECK_FUNCS(fgetpos fsetpos fseek ftell)
596 AC_CHECK_FUNCS(vsnprintf _vsnprintf)
597 AC_CHECK_FUNCS(snprintf  _snprintf )  
598 AC_CHECK_FUNCS(popen     _popen )  
599 AC_CHECK_FUNCS(pclose    _pclose )  
600
601
602 dnl ** check for specific library functions that we are interested in
603 AC_CHECK_FUNCS(access ftime getclock getpagesize getrusage gettimeofday mktime mprotect readlink setitimer stat symlink sysconf timelocal times vadvise vfork)
604
605 dnl ** check whether this machine has gmp2 installed
606 AC_CHECK_LIB(gmp,  mpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp,
607   AC_CHECK_LIB(gmp2, mpz_fdiv_qr,  HaveLibGmp=YES; LibGmp=gmp2,
608     HaveLibGmp=No; LibGmp=not-installed))
609 AC_SUBST(HaveLibGmp)
610 AC_SUBST(LibGmp)
611
612 dnl ** check whether this machine has BFD and liberty installed (used for debugging)
613 dnl    the order of these tests matters: bfd needs liberty
614 AC_CHECK_LIB(iberty, xmalloc)
615 AC_CHECK_LIB(bfd,    bfd_init)
616
617 dnl ################################################################
618 dnl Check for libraries
619 dnl ################################################################
620
621 FPTOOLS_CHECK_LIB_NOWARN(dl, dlopen)
622 FPTOOLS_CHECK_LIB_NOWARN(dld, shl_load)
623 FPTOOLS_CHECK_LIB_NOWARN(m, atan)
624
625 dnl --------------------------------------------------
626 dnl * Miscellaneous feature tests
627 dnl --------------------------------------------------
628
629 dnl ** can we get alloca?
630 AC_FUNC_ALLOCA
631
632 dnl ** determine whether or not const works
633 AC_C_CONST
634
635 dnl ** determine whether ANSI-function prototypes work?
636 AC_C_PROTOTYPES          
637
638 dnl ** are we big endian?
639 AC_C_BIGENDIAN
640 # Allay users' general fear of warnings of any kind.
641 errprint((fptools configure script wizard sez: "don't worry, the above warning is harmless (to us.)")
642 )
643
644 dnl ** determine the return type of signal()
645 AC_TYPE_SIGNAL
646
647 dnl ** check for leading underscores in symbol names
648 FPTOOLS_UNDERSCORE
649
650 dnl ** how is the end of text section signalled?
651 FPTOOLS_END_TEXT_SECTION
652
653 dnl ** how is the end of data section signalled?
654 FPTOOLS_END_DATA_SECTION
655
656 dnl ** code before data?
657 FPTOOLS_CODE_BEFORE_DATA
658
659 AC_OUTPUT(mk/config.mk, echo timestamp > mk/stamp-h )
660
661 echo ''
662 echo '************************************************'
663 echo '*** NOW DO: gmake boot followed by gmake all'
664 echo '***         (where gmake == GNU make)'
665 echo '************************************************'
666 exit 0