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)
6 # (c) The AQUA Project, Glasgow University, 1994-1998
8 # Configure script template for the Glasgow functional programming tools
10 # Process with 'autoconf' to get a working configure script.
12 # For the generated configure script, do "./configure --help" to
13 # see what flags are available. (Better yet, read the documentation!)
16 # First off, a distrib sanity check..
17 AC_INIT(mk/config.mk.in)
19 dnl * Declare subdirectories that have a private configure script
21 dnl After the toplevel configuration is complete, the script will recurse into
22 dnl these subdirectories (the use of cache values makes repeated checks cheap)
23 AC_CONFIG_SUBDIRS(ghc)
25 # -------------------------------------------------------------------------
26 # Prepare to generate the following header files
29 AC_CONFIG_HEADER(mk/config.h)
31 # No, semi-sadly, we don't do `--srcdir'...
32 if test x"$srcdir" != 'x.' ; then
33 echo "This configuration does not support the \`--srcdir' option.."
38 # Remove common automounter nonsense + convert from UNC to DOS style paths
39 # (UNC awareness isn't quite there yet for cygwin32-beta18 and consituent tools.)
42 hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|' | sed 's|^//\(.\)/|\1:/|' `
45 echo "*** The top of your build tree is: $hardtop"
48 dnl--------------------------------------------------------------------
49 dnl * Choose host(/target/build) platform
50 dnl--------------------------------------------------------------------
52 dnl Guess host/target/build platform(s) if necessary.
55 # "$host" defaults to "$target"
56 if test "x$host" = xNONE ; then
60 dnl ** canonicalize platform names
61 BuildPlatform=`/bin/sh $srcdir/config.sub $build` || exit 1
62 HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
63 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
65 if test x"$TargetPlatform" != x"$HostPlatform" ; then
66 echo "GHC configuration does not support differing host/target (i.e., cross-compiling)"
72 # The following will be more difficult when we *are* cross-compiling.
73 # Suitable names to slam in *_CPP are in platform.h.in.
74 # We also record the architecture, vendor, and operating system (OS)
78 HostPlatform=alpha-dec-osf1 # canonicalise for our purposes
79 TargetPlatform=alpha-dec-osf1 # this will work for now... (hack)
80 BuildPlatform=alpha-dec-osf1 # hack
81 HostPlatform_CPP='alpha_dec_osf1'
87 HostPlatform=alpha-dec-osf3 # canonicalise for our purposes
88 TargetPlatform=alpha-dec-osf3 # this will work for now... (hack)
89 BuildPlatform=alpha-dec-osf3 # hack
90 HostPlatform_CPP='alpha_dec_osf3'
96 HostPlatform=alpha-unknown-linux
97 TargetPlatform=alpha-unknown-linux
98 BuildPlatform=alpha-unknown-linux
99 HostPlatform_CPP='alpha_unknown_linux'
101 HostVendor_CPP='unknown'
104 alpha-unknown-freebsd*)
105 HostPlatform=alpha-unknown-freebsd
106 TargetPlatform=alpha-unknown-freebsd
107 BuildPlatform=alpha-unknown-freebsd
108 HostPlatform_CPP='alpha_unknown_freebsd'
110 HostVendor_CPP='unknown'
114 HostPlatform=hppa1.1-hp-hpux # canonicalise for our purposes (hack)
115 TargetPlatform=hppa1.1-hp-hpux
116 BuildPlatform=hppa1.1-hp-hpux
117 HostPlatform_CPP='hppa1_1_hp_hpux'
118 HostArch_CPP='hppa1_1'
122 i[[3456]]86-*-linuxaout*)
123 HostPlatform=i386-unknown-linuxaout # hack again
124 TargetPlatform=i386-unknown-linuxaout
125 BuildPlatform=i386-unknown-linuxaout
126 HostPlatform_CPP='i386_unknown_linuxaout'
128 HostVendor_CPP='unknown'
129 HostOS_CPP='linuxaout'
131 i[[3456]]86-*-linux*)
132 HostPlatform=i386-unknown-linux # hack again
133 TargetPlatform=i386-unknown-linux
134 BuildPlatform=i386-unknown-linux
135 HostPlatform_CPP='i386_unknown_linux'
137 HostVendor_CPP='unknown'
140 i[[3456]]86-*-freebsd[[3-9]]*) # FreeBSD 3.0+ uses ELF
141 HostPlatform=i386-unknown-freebsd # hack again
142 TargetPlatform=i386-unknown-freebsd
143 BuildPlatform=i386-unknown-freebsd
144 HostPlatform_CPP='i386_unknown_freebsd'
146 HostVendor_CPP='unknown'
149 i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out
150 HostPlatform=i386-unknown-freebsd2 # hack again
151 TargetPlatform=i386-unknown-freebsd2
152 BuildPlatform=i386-unknown-freebsd2
153 HostPlatform_CPP='i386_unknown_freebsd2'
155 HostVendor_CPP='unknown'
156 HostOS_CPP='freebsd2'
158 i[[3456]]86-*-netbsd*)
159 HostPlatform=i386-unknown-netbsd # hack again
160 TargetPlatform=i386-unknown-netbsd
161 BuildPlatform=i386-unknown-netbsd
162 HostPlatform_CPP='i386_unknown_netbsd'
164 HostVendor_CPP='unknown'
167 i[[3456]]86-*-solaris2*)
168 HostPlatform=i386-unknown-solaris2 # hack again
169 TargetPlatform=i386-unknown-solaris2
170 BuildPlatform=i386-unknown-solaris2
171 HostPlatform_CPP='i386_unknown_solaris2'
173 HostVendor_CPP='unknown'
174 HostOS_CPP='solaris2'
176 i[[3456]]86-*-cygwin32*)
177 HostPlatform=i386-unknown-cygwin32 # hack again
178 TargetPlatform=i386-unknown-cygwin32
179 BuildPlatform=i386-unknown-cygwin32
180 HostPlatform_CPP='i386_unknown_cygwin32'
182 HostVendor_CPP='unknown'
183 HostOS_CPP='cygwin32'
186 i[[3456]]86-*-mingw32*)
187 HostPlatform=i386-unknown-mingw32 # hack again
188 TargetPlatform=i386-unknown-mingw32
189 BuildPlatform=i386-unknown-mingw32
190 HostPlatform_CPP='i386_unknown_mingw32'
192 HostVendor_CPP='unknown'
195 # We assume you're using mingw32 via the gcc that comes
196 # with cygwin, and not the native port, so let's augment
197 # the gcc command-line used here with -mno-cygwin to
198 # arrange for good things to happen.
199 CFLAGS="-mno-cygwin $CFLAGS"
202 HostPlatform_CPP='m68k_next_nextstep2'
204 HostVendor_CPP='next'
205 HostOS_CPP='nextstep2'
208 HostPlatform_CPP='m68k_next_nextstep3'
210 HostVendor_CPP='next'
211 HostOS_CPP='nextstep3'
213 i[[3456]]86-next-nextstep3)
214 HostPlatform=i386-next-nextstep3 # hack again
215 TargetPlatform=i386-next-nextstep3
216 BuildPlatform=i386-next-nextstep3
217 HostPlatform_CPP='i386_next_nextstep3'
219 HostVendor_CPP='next'
220 HostOS_CPP='nextstep3'
223 HostPlatform=m68k-sun-sunos4
224 TargetPlatform=m68k-sun-sunos4 #hack
225 BuildPlatform=m68k-sun-sunos4 #hack
226 HostPlatform_CPP='m68k_sun_sunos4'
232 HostPlatform_CPP='mips_dec_ultrix'
233 HostArch_CPP='mipsel' # NB a little different
238 HostPlatform=mips-sgi-irix
239 TargetPlatform=mips-sgi-irix #hack
240 BuildPlatform=mips-sgi-irix #hack
241 HostPlatform_CPP='mips_sgi_irix'
242 HostArch_CPP='mipseb' # NB a little different
247 HostPlatform=rs6000-ibm-aix
248 TargetPlatform=rs6000-ibm-aix #hack
249 BuildPlatform=rs6000-ibm-aix #hack
250 HostPlatform_CPP='rs6000_ibm_aix'
251 HostArch_CPP='rs6000'
256 HostPlatform=powerpc-ibm-aix
257 TargetPlatform=powerpc-ibm-aix #hack
258 BuildPlatform=powerpc-ibm-aix #hack
259 HostPlatform_CPP='powerpc_ibm_aix'
260 HostArch_CPP='powerpc'
265 HostPlatform=sparc-sun-sunos4
266 TargetPlatform=sparc-sun-sunos4 #hack
267 BuildPlatform=sparc-sun-sunos4 #hack
268 HostPlatform_CPP='sparc_sun_sunos4'
274 HostPlatform=sparc-sun-solaris2
275 TargetPlatform=sparc-sun-solaris2 #hack
276 BuildPlatform=sparc-sun-solaris2 #hack
277 HostPlatform_CPP='sparc_sun_solaris2'
280 HostOS_CPP='solaris2'
283 echo "Unrecognised platform: $HostPlatform"
287 echo "Canonicalised to: $HostPlatform"
288 test x"$HostPlatform" != x"$TargetPlatform" && echo "Target platform set to $TargetPlatform"
289 test x"$BuildPlatform" != x"$HostPlatform" && echo "Build platform set to $BuildPlatform"
291 BuildPlatform_CPP=$HostPlatform_CPP
292 TargetPlatform_CPP=$HostPlatform_CPP
293 BuildArch_CPP=$HostArch_CPP
294 TargetArch_CPP=$HostArch_CPP
295 BuildOS_CPP=$HostOS_CPP
297 TargetOS_CPP=$HostOS_CPP
298 BuildVendor_CPP=$HostVendor_CPP
299 TargetVendor_CPP=$HostVendor_CPP
301 dnl Cannot afford all these SUBSTs (because of braindead seds w/ 99 cmd limits)
302 dnl AC_SUBST(BuildPlatform)
304 AC_SUBST(HostPlatform)
305 AC_SUBST(TargetPlatform)
306 AC_SUBST(HostPlatform_CPP)
307 dnl AC_SUBST(BuildPlatform_CPP)
308 dnl AC_SUBST(TargetPlatform_CPP)
310 AC_SUBST(HostArch_CPP)
311 dnl AC_SUBST(BuildArch_CPP)
312 dnl AC_SUBST(TargetArch_CPP)
315 AC_SUBST(HostOS_Full)
316 dnl AC_SUBST(BuildOS_CPP)
317 dnl AC_SUBST(TargetOS_CPP)
319 AC_SUBST(HostVendor_CPP)
320 dnl AC_SUBST(BuildVendor_CPP)
321 dnl AC_SUBST(TargetVendor_CPP)
325 if test "$GHC" = ""; then
326 AC_PATH_PROG(GHC,ghc)
328 if test "$GHC" != ""; then
332 AC_PATH_PROGS(NHC,nhc nhc98)
333 AC_PATH_PROG(HBC,hbc)
335 dnl --------------------------------------------------------------
336 dnl * Project specific configuration options
337 dnl --------------------------------------------------------------
338 dnl What follows is a bunch of options that can either be configured
339 dnl through command line options to the configure script or by
340 dnl supplying defns in the build tree's mk/build.mk. Having the option to
341 dnl use either is considered a Feature.
343 dnl ** What command to use to compile compiler sources ?
344 dnl --------------------------------------------------------------
346 [ --with-hc=<haskell compiler>
347 Use a command different from 'ghc' to compile up Haskell code.
348 (no claims currently made that this will work with a compiler other than a
349 recent version of GHC, but you could always try...)
356 dnl ** Which gcc to use?
357 dnl --------------------------------------------------------------
359 [ --with-gcc=<gcc command>
360 Use a different command instead of 'gcc' for the GNU C compiler.
362 [WhatGccIsCalled="$withval"],
363 [WhatGccIsCalled="gcc"]
365 AC_SUBST(WhatGccIsCalled)
367 dnl ** Booting from .hc files?
368 dnl --------------------------------------------------------------
369 AC_ARG_ENABLE(hc-boot,
371 Boot the Glasgow Haskell Compiler from intermediate .hc files.
372 (This option is mostly of interest to porters.)
377 AC_SUBST(BootingFromHc)
380 dnl ** Enable the construction of Win32 DLLs?
381 dnl --------------------------------------------------------------
382 AC_ARG_ENABLE(win32-dlls,
383 [ --enable-win32-dlls
384 If on a Win32 platform running mingw32/cygwin, enable the
385 construction of DLLs containing ghc-compiled code.
391 *) echo "Unrecognised win32 platform: $HostPlatform"
399 AC_SUBST(EnableWin32DLLs)
400 if test x"$EnableWin32DLLs" = "xYES" ; then
401 AC_DEFINE(HAVE_WIN32_DLL_SUPPORT)
404 dnl --------------------------------------------------------------
405 dnl End of configure script option section
406 dnl --------------------------------------------------------------
409 dnl --------------------------------------------------------------
410 dnl * General configuration checks
411 dnl --------------------------------------------------------------
416 dnl ** look for `perl', but only in /bin on Windows
419 AC_CHECK_PROG(PerlCmd,perl,/bin/perl,,/bin)
420 if test -z "$PerlCmd"; then
421 echo "You must install the version of Perl shipped with GHC"
422 echo "(or a compatible one) in /bin."
427 AC_PATH_PROG(PerlCmd,perl)
428 if test -z "$PerlCmd"; then
429 echo "You must install perl before you can continue"
430 echo "Perhaps it is already installed, but not in your PATH?"
433 FPTOOLS_CHECK_PERL_VERSION
438 dnl ** does #! path/to/perl work? (sometimes it's too long...)
442 dnl ** look for GCC and find out which version
443 dnl Figure out which C compiler to use. Gcc is preferred.
444 dnl If gcc, make sure it's at least 2.1
449 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
452 dnl ** figure out how to do context diffs
455 dnl ** Find find command (for Win32's benefit)
456 AC_PATH_PROG(FindCmd, find)
458 dnl ** look for a decent parser generator (bison preferred)
459 dnl (FPTOOLS_PROG_YACCY is AC_PROG_YACC, but with some extra testing
460 dnl on the suitability of the 'yacc' returned.)
463 dnl ** Find lex command (lex or flex) and library (-ll or -lfl)
464 dnl ( not that we care about the latter, see mk/config.mk.in )
468 dnl ** figure out how to do a BSD-ish install
471 dnl If you can run configure, you certainly have /bin/sh
472 AC_DEFINE(HAVE_BIN_SH)
474 dnl ** how to invoke `ar' and `ranlib'
475 FPTOOLS_PROG_AR_AND_RANLIB
478 dnl ** Check to see whether ln -s works
482 dnl ** Find the path to sed
483 AC_PATH_PROG(SedCmd,sed)
486 dnl ** check for time command
487 AC_PATH_PROG(TimeCmd,time)
491 dnl if GNU tar is named gtar, look for it first.
492 AC_PATH_PROGS(TarCmd,gtar tar,tar)
494 dnl ** check for gzip/compress
495 AC_PATH_PROGS(CompressCmd,gzip compress,gzip)
497 dnl ** check for jade/openjade & determine a working catalog
498 AC_PATH_PROGS(JadeCmd,openjade jade,jade)
499 FPTOOLS_DOCBOOK_CATALOG(Catalog, $JadeCmd, docs/fptools-both.dsl,
500 /usr/share/sgml/CATALOG.docbkdsl $hardtop/glafp-utils/docbook/CATALOG*)
501 if test -z "$Catalog"; then
502 AC_MSG_RESULT([Warning: You will not be able to build the documentation.])
506 compress_nm=`basename $CompressCmd`
507 if test x"$compress_nm" = xgzip; then
508 CompressCmd="$CompressCmd -d"
513 AC_SUBST(CompressCmd)
514 AC_SUBST(CompressSuffix)
516 dnl ** check for installed happy binary + version
517 dnl (don't do it if we're booting from .hc files though.)
518 if (test "$BootingFromHc" = "NO"); then
522 dnl --------------------------------------------------
523 dnl ### program checking section ends here ###
524 dnl --------------------------------------------------
526 dnl --------------------------------------------------
527 dnl * Platform header file and syscall feature tests
528 dnl ### checking the state of the local header files and syscalls ###
530 dnl ** check for full ANSI header (.h) files
533 dnl ** check for specific header (.h) files that we are interested in
534 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 stdint.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 bfd.h winsock.h)
536 AC_CHECK_HEADER(readline/readline.h, HaveReadlineReadlineH=YES, HaveReadlineReadlineH=NO)
537 AC_CHECK_HEADER(readline/history.h, HaveReadlineHistoryH=YES, HaveReadlineHistoryH=NO)
539 if test $HaveReadlineReadlineH = YES && test $HaveReadlineHistoryH = YES ; then
540 HaveReadlineHeaders=YES
541 AC_DEFINE(HAVE_READLINE_HEADERS,1)
543 HaveReadlineHeaders=NO
544 AC_DEFINE(HAVE_READLINE_HEADERS,0)
546 AC_SUBST(HaveReadlineHeaders)
548 dnl ** check for DOS include files
549 AC_CHECK_HEADERS(dos.h conio.h io.h std.h)
551 dnl ** check for Windows include files
552 AC_CHECK_HEADERS(windows.h)
554 dnl ** check if it is safe to include both <time.h> and <sys/time.h>
557 dnl dynamic loading include files
558 AC_CHECK_HEADERS(dlfcn.h dl.h)
560 dnl ** check for farcalloc (in bcc)
561 AC_CHECK_HEADER(alloc.h,AC_CHECK_FUNCS(farcalloc))
563 dnl ** check for valloc (in sunos, solaris, mips, amiga, next, minix, ultrix)
564 AC_CHECK_HEADER(malloc.h,AC_CHECK_FUNCS(valloc))
566 dnl ** how do we get a timezone name, and UTC offset ?
569 dnl ** what's the type of timezone?
570 FPTOOLS_HAVE_TIMEZONE
571 FPTOOLS_TYPE_TIMEZONE
573 dnl ** do we have altzone?
576 dnl ** does struct stat contain st_blksize?
579 dnl ** do we have long longs?
582 dnl ** what are the sizes of various types
583 dnl (these must come before GHC_CHECK_ALIGNMENT)
584 AC_CHECK_SIZEOF(char, 1)
585 AC_CHECK_SIZEOF(double, 8)
586 AC_CHECK_SIZEOF(float, 4)
587 AC_CHECK_SIZEOF(int, 4)
588 AC_CHECK_SIZEOF(long, 4)
589 if test "$fptools_cv_have_long_long" = yes; then
590 AC_CHECK_SIZEOF(long long, 8)
592 AC_CHECK_SIZEOF(short, 2)
593 AC_CHECK_SIZEOF(unsigned char, 1)
594 AC_CHECK_SIZEOF(unsigned int, 4)
595 AC_CHECK_SIZEOF(unsigned long, 4)
596 if test "$fptools_cv_have_long_long" = yes; then
597 AC_CHECK_SIZEOF(unsigned long long, 8)
599 AC_CHECK_SIZEOF(unsigned short, 2)
600 AC_CHECK_SIZEOF(void *, 4)
602 dnl ** what are alignment constraints on various types
603 FPTOOLS_CHECK_ALIGNMENT(char)
604 FPTOOLS_CHECK_ALIGNMENT(double)
605 FPTOOLS_CHECK_ALIGNMENT(float)
606 FPTOOLS_CHECK_ALIGNMENT(int)
607 FPTOOLS_CHECK_ALIGNMENT(long)
608 if test "$fptools_cv_have_long_long" = yes; then
609 FPTOOLS_CHECK_ALIGNMENT(long long)
611 FPTOOLS_CHECK_ALIGNMENT(short)
612 FPTOOLS_CHECK_ALIGNMENT(unsigned char)
613 FPTOOLS_CHECK_ALIGNMENT(unsigned int)
614 FPTOOLS_CHECK_ALIGNMENT(unsigned long)
615 if test "$fptools_cv_have_long_long" = yes; then
616 FPTOOLS_CHECK_ALIGNMENT(unsigned long long)
618 FPTOOLS_CHECK_ALIGNMENT(unsigned short)
619 FPTOOLS_CHECK_ALIGNMENT(void *)
621 dnl ** map standard C types and ISO types to Haskell types
622 FPTOOLS_CHECK_HTYPE(char)
623 FPTOOLS_CHECK_HTYPE(signed char)
624 FPTOOLS_CHECK_HTYPE(unsigned char)
625 FPTOOLS_CHECK_HTYPE(short)
626 FPTOOLS_CHECK_HTYPE(unsigned short)
627 FPTOOLS_CHECK_HTYPE(int)
628 FPTOOLS_CHECK_HTYPE(unsigned int)
629 FPTOOLS_CHECK_HTYPE(long)
630 FPTOOLS_CHECK_HTYPE(unsigned long)
631 if test "$fptools_cv_have_long_long" = yes; then
632 FPTOOLS_CHECK_HTYPE(long long)
633 FPTOOLS_CHECK_HTYPE(unsigned long long)
635 FPTOOLS_CHECK_HTYPE(float)
636 FPTOOLS_CHECK_HTYPE(double)
637 FPTOOLS_CHECK_HTYPE(ptrdiff_t)
638 FPTOOLS_CHECK_HTYPE(size_t)
639 FPTOOLS_CHECK_HTYPE(wchar_t)
640 dnl Int32 is a HACK for non-ISO C compilers
641 FPTOOLS_CHECK_HTYPE(sig_atomic_t, Int32)
642 FPTOOLS_CHECK_HTYPE(clock_t)
643 FPTOOLS_CHECK_HTYPE(time_t)
645 dnl ** can we open files in binary mode?
648 dnl ** check for GetModuleFileName and WinExec (windows only)
649 dnl Old: AC_CHECK_FUNCS(WinExec GetModuleFileName) dnl Windows
650 dnl Doesn't work because the linker can't see the functions if
651 dnl you omit the #include <windows.h>. (I've no idea why not...)
653 FPTOOLS_TRY_LINK_NOWARN(,[
664 if test "$have_winexec" = "1"; then
665 AC_DEFINE(HAVE_WINEXEC)
668 FPTOOLS_TRY_LINK_NOWARN(,[
674 GetModuleFileName((HMODULE)0,dir,0);
678 [have_getmodulefilename=1],
679 [have_getmodulefilename=0])
680 if test "$have_getmodulefilename" = "1"; then
681 AC_DEFINE(HAVE_GETMODULEFILENAME)
684 dnl ** check return type of signal handlers
685 dnl Foo: assumes we can use prototypes.
686 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
687 dnl AC_CACHE_CHECK([type of signal handlers], ac_cv_type_signal_handler,
688 dnl [AC_TRY_COMPILE([#include <sys/types.h>
689 dnl #include <signal.h>
693 dnl void (*signal (int, void (*)(int)))(int);
696 dnl ac_cv_type_signal_handler=void_int,
697 dnl ac_cv_type_signal_handler=int_void)])
698 dnl if test "$ac_cv_type_signal_handler" = void_int; then
699 dnl AC_DEFINE(VOID_INT_SIGNALS)
702 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
704 if test "$ac_cv_type_signal" = void; then
705 AC_DEFINE(VOID_INT_SIGNALS)
708 dnl ** check for more functions
709 AC_CHECK_FUNCS(strcasecmp _stricmp stricmp strcmpi)
710 AC_CHECK_FUNCS(strcmp)
711 AC_CHECK_FUNCS(realpath _fullpath)
712 AC_CHECK_FUNCS(PBHSetVolSync macsystem)
713 AC_CHECK_FUNCS(fgetpos fsetpos fseek ftell)
714 AC_CHECK_FUNCS(vsnprintf _vsnprintf)
715 AC_CHECK_FUNCS(snprintf _snprintf )
716 AC_CHECK_FUNCS(popen _popen )
717 AC_CHECK_FUNCS(pclose _pclose )
720 dnl ** check for specific library functions that we are interested in
721 AC_CHECK_FUNCS(access ftime getclock getpagesize getrusage gettimeofday mktime mprotect readlink setitimer stat symlink sysconf timelocal times vadvise vfork)
723 dnl ** check whether this machine has gmp2 installed
724 AC_CHECK_LIB(gmp, mpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp,
725 AC_CHECK_LIB(gmp2, mpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp2,
726 HaveLibGmp=No; LibGmp=not-installed))
730 dnl ** check whether this machine has GNU regex in libc.
731 FPTOOLS_REGEX_IN_LIBC
733 dnl ** check whether this machine has BFD and liberty installed (used for debugging)
734 dnl the order of these tests matters: bfd needs liberty
735 AC_CHECK_LIB(iberty, xmalloc)
736 AC_CHECK_LIB(bfd, bfd_init)
738 dnl ** check for readline, for Hugs and hslibs' Readline
739 dnl ncurses supersedes termcap and curses, but for compatibility,
740 dnl we have to check for all...
741 AC_CHECK_LIB(ncurses, tputs, HaveLibTermcap=YES; LibTermcap=ncurses,
742 AC_CHECK_LIB(termcap, tputs, HaveLibTermcap=YES; LibTermcap=termcap,
743 AC_CHECK_LIB(curses, tputs, HaveLibTermcap=YES; LibTermcap=curses,
744 HaveLibTermcap=NO; LibTermcap=not-installed)))
746 if test $HaveLibTermcap = YES ; then
747 LIBS="-l$LibTermcap $LIBS"
748 AC_CHECK_LIB(readline, readline, HaveLibReadline=YES, HaveLibReadline=NO)
751 if test $HaveLibTermcap = YES && test x"$HaveLibReadline" = xYES ; then
752 AC_DEFINE(HAVE_READLINE_LIBS,1)
753 LibsReadline="-lreadline -l$LibTermcap"
755 AC_DEFINE(HAVE_READLINE_LIBS,0)
758 AC_SUBST(LibsReadline)
760 dnl ################################################################
761 dnl Check for libraries
762 dnl ################################################################
764 FPTOOLS_CHECK_LIB_NOWARN(dl, dlopen)
765 FPTOOLS_CHECK_LIB_NOWARN(dld, shl_load)
766 FPTOOLS_CHECK_LIB_NOWARN(m, atan)
768 dnl --------------------------------------------------
769 dnl * Miscellaneous feature tests
770 dnl --------------------------------------------------
772 dnl ** can we get alloca?
775 dnl ** determine whether or not const works
778 dnl ** determine whether ANSI-function prototypes work?
781 dnl ** are we big endian?
783 # Allay users' general fear of warnings of any kind.
784 errprint((fptools configure script wizard sez: "don't worry, the above warning is harmless (to us.)")
787 dnl ** check for leading underscores in symbol names
790 dnl ** how is the end of text section signalled?
791 FPTOOLS_END_TEXT_SECTION
793 dnl ** how is the end of data section signalled?
794 FPTOOLS_END_DATA_SECTION
796 dnl ** code before data?
797 FPTOOLS_CODE_BEFORE_DATA
799 AC_OUTPUT(mk/config.mk, echo timestamp > mk/stamp-h )
802 echo '************************************************'
803 echo '*** NOW DO: gmake boot followed by gmake all'
804 echo '*** (where gmake == GNU make)'
805 echo '************************************************'