Use a different command instead of 'gcc' for the GNU C compiler.
],
[WhatGccIsCalled="$withval"
+ if test "x$HostPlatform" = "xi386-unknown-mingw32"; then
+ # Canonicalise to <drive>:/path/to/gcc
+ withval=`cygpath -w ${withval} | sed -e 's@\\\\@/@g' `
+ fi;
CC="$withval"],
[WhatGccIsCalled="gcc"]
)
fi;
fi;
+dnl ** Must have GHC to build GHC, unless --enable-hc-boot is on
+if test "$BootingFromHc" = "NO" -a "$WithGhc" = "" -a -d "$srcdir/ghc"; then
+AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.])
+fi;
dnl ** Enable multi-thread friendly RTS?
dnl --------------------------------------------------------------
)
AC_SUBST(GhcLibsWithHOpenGL)
-dnl ** Use a specific version of the GLUT API
-dnl --------------------------------------------------------------
-AC_ARG_WITH(glut-api,
-[ --with-glut-api=<version>
- Use a specific version of the GLUT API when building HOpenGL.
-])
-test -n "$with_glut_api" && CPPFLAGS="$CPPFLAGS -DGLUT_API_VERSION=$with_glut_api"
-
-
-dnl ** Use a specific version of the GLUT API
-dnl --------------------------------------------------------------
-AC_ARG_WITH(glut-xlib,
-[ --with-glut-xlib=<version>
- Use a specific version of the GLUT Xlib implementation when building HOpenGL.
-])
-test -n "$with_glut_xlib" && CPPFLAGS="$CPPFLAGS -DGLUT_XLIB_IMPLEMENTATION=$with_glut_xlib"
-
-
-
-
dnl --------------------------------------------------------------
dnl End of configure script option section
dnl --------------------------------------------------------------
dnl
AC_PROG_CC
FPTOOLS_HAVE_GCC
+FPTOOLS_GCC_NEEDS_NO_OMIT_LFPTR
dnl ** figure out how to invoke cpp directly (gcc -E is no good)
AC_PROG_CPP
AC_SUBST(CompressCmd)
AC_SUBST(CompressSuffix)
+dnl ** check for ghc-pkg command
+AC_PATH_PROG(GhcPkgCmd,ghc-pkg)
+
+AC_ARG_WITH(greencard,
+[ --with-greencard=<greencard compiler>
+ Use a command different from 'green-card' to compile GreenCard files
+],
+[
+GreencardCmd=$withval;
+FPTOOLS_GREENCARD(3.00)
+]
+)
+
AC_ARG_ENABLE(src-tree-happy,
[ --enable-src-tree-happy
Build and use source tree (fptools/happy) version of happy.
FPTOOLS_CHECK_HTYPE(blkcnt_t)
FPTOOLS_CHECK_HTYPE(nlink_t)
FPTOOLS_CHECK_HTYPE(ssize_t)
+FPTOOLS_CHECK_HTYPE(rlim_t)
dnl ** Map OpenGL data types to Haskell types
if test $GhcLibsWithHOpenGL = YES ; then
dnl ** check for specific library functions that we are interested in
AC_CHECK_FUNCS(access ftime getclock getpagesize getrusage gettimeofday mktime mprotect readlink setitimer stat lstat symlink sysconf timelocal times vadvise vfork localtime_r gmtime_r readdir_r getgrgid_r getgrnam_r getpwuid_r getpwnam_r)
+dnl ** Solaris2 needs additionl flag for getpw*_r()
+case "$TargetPlatform" in
+ *-solaris2*)
+ unix_SRC_HSC2HS_OPTS="-D_POSIX_PTHREAD_SEMANTICS"
+ AC_SUBST(unix_SRC_HSC2HS_OPTS)
+ ;;
+esac
+
dnl ** check whether this machine has gmp3 installed
AC_CHECK_LIB(gmp, __gmpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp,
AC_CHECK_LIB(gmp3, __gmpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp3,
*) AC_PATH_XTRA() ;;
esac
+dnl ** check for OpenGL/GLUT/GLX include paths and libraries
+if test $GhcLibsWithHOpenGL = YES ; then
FPTOOLS_HAVE_OPENGL
+fi
dnl ################################################################
dnl Check for libraries
dnl HaskellSupport.framework
if test $HaveFrameworkHaskellSupport = YES; then
- HaveLibDL = NO
+ HaveLibDL=NO
HaveRtldNext=NO
HaveRtldLocal=YES
AC_DEFINE(HAVE_RTLDLOCAL)
AC_MSG_RESULT(no))
dnl --------------------------------------------------
+dnl * test for Linux sendfile(2)
+dnl --------------------------------------------------
+AC_MSG_CHECKING(for sendfile in sys/sendfile.h)
+AC_EGREP_HEADER(sendfile, sys/sendfile.h,
+ [ AC_DEFINE(HAVE_LINUX_SENDFILE) AC_MSG_RESULT(yes) ],
+ AC_MSG_RESULT(no))
+
+dnl --------------------------------------------------
+dnl * test for BSD sendfile(2)
+dnl --------------------------------------------------
+AC_MSG_CHECKING(for sendfile in sys/socket.h)
+AC_EGREP_HEADER(sendfile, sys/socket.h,
+ [ AC_DEFINE(HAVE_BSD_SENDFILE) AC_MSG_RESULT(yes) ],
+ AC_MSG_RESULT(no))
+
+dnl --------------------------------------------------
dnl * test for GTK+
dnl --------------------------------------------------