X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=c2b79d6ce227caac04bb24f4c66af0ad0f7e40c2;hb=fb329e13b82436ceaf4392da4cf90d69abf6bbf8;hp=6bbaa35aaa504f7fb974f4966c6c8525bb98f74a;hpb=f5d11ad4c5cd0c1e4f5fc95c43ba68da4e399bbe;p=ghc-hetmet.git diff --git a/configure.ac b/configure.ac index 6bbaa35..c2b79d6 100644 --- a/configure.ac +++ b/configure.ac @@ -627,8 +627,8 @@ AC_ARG_ENABLE(hopengl, On Mac OS X, use --enable-hopengl=x11 to use X11 instead of the "native" libraries. ], -[GhcLibsWithHOpenGL=YES], -[GhcLibsWithHOpenGL=NO] +[GhcLibsWithOpenGL=YES; GhcLibsWithGLUT=YES], +[GhcLibsWithOpenGL=NO; GhcLibsWithGLUT=NO] ) UseQuartzOpenGL=NO if test x"$TargetOS_CPP" = x"darwin"; then @@ -639,7 +639,8 @@ if test x"$TargetOS_CPP" = x"darwin"; then fi fi -AC_SUBST(GhcLibsWithHOpenGL) +AC_SUBST([GhcLibsWithOpenGL]) +AC_SUBST([GhcLibsWithGLUT]) dnl ** .NET interop support? dnl -------------------------------------------------------------- @@ -661,6 +662,16 @@ dnl -------------------------------------------------------------- dnl * General configuration checks dnl -------------------------------------------------------------- +dnl ** Can the unix package be built? +dnl -------------------------------------------------------------- + +if test x"$TargetPlatform" = x"i386-unknown-mingw32"; then + GhcLibsWithUnix=NO +else + GhcLibsWithUnix=YES +fi +AC_SUBST([GhcLibsWithUnix]) + dnl ** does #! work? AC_SYS_INTERPRETER() @@ -846,13 +857,13 @@ AC_CHECK_HEADER(readline/readline.h, [HaveReadlineReadlineH=YES], [HaveReadlineR AC_CHECK_HEADER(readline/history.h, [HaveReadlineHistoryH=YES], [HaveReadlineHistoryH=NO]) if test $HaveReadlineReadlineH = YES && test $HaveReadlineHistoryH = YES ; then - HaveReadlineHeaders=YES + GhcLibsWithReadline=YES AC_DEFINE([HAVE_READLINE_HEADERS], [1], [Define to 1 if readline/readline.h and readline/history.h exist.]) else - HaveReadlineHeaders=NO + GhcLibsWithReadline=NO AC_DEFINE([HAVE_READLINE_HEADERS], [0], [Define to 1 if readline/readline.h and readline/history.h exist.]) fi -AC_SUBST(HaveReadlineHeaders) +AC_SUBST(GhcLibsWithReadline) dnl ** check for DOS include files AC_CHECK_HEADERS(dos.h conio.h io.h std.h) @@ -861,11 +872,14 @@ dnl ** check for Windows include files AC_CHECK_HEADERS(windows.h) dnl ** check for OpenGL include files +fp_save_cppflags="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $X_CFLAGS" if test $UseQuartzOpenGL = YES ; then AC_CHECK_HEADERS(OpenGL/gl.h) else AC_CHECK_HEADERS(GL/gl.h) fi +CPPFLAGS="$fp_save_cppflags" dnl ** check if it is safe to include both and AC_HEADER_TIME @@ -986,7 +1000,7 @@ FPTOOLS_CHECK_HTYPE(rlim_t) FPTOOLS_CHECK_HTYPE(wint_t) dnl ** Map OpenGL data types to Haskell types -if test $GhcLibsWithHOpenGL = YES ; then +if test $GhcLibsWithOpenGL = YES ; then FPTOOLS_CHECK_HTYPE(GLboolean) FPTOOLS_CHECK_HTYPE(GLbyte) FPTOOLS_CHECK_HTYPE(GLubyte) @@ -1124,8 +1138,8 @@ if test $HaveLibMingwEx = YES ; then fi if test "$HaveLibGmp" = "NO"; then -if test "$HostArch_CPP" = "ia64"; then -AC_MSG_ERROR([You need to install libgmp (the in-tree version does not work on IA64).]) +if test "$HostArch_CPP" = "ia64" -o "$HostArch_CPP" = "mipseb" ; then +AC_MSG_ERROR([You need to install libgmp (the in-tree version does not work on IA64 or mips64).]) fi; fi; @@ -1183,7 +1197,7 @@ dnl ** check for X Window System AC_PATH_XTRA() dnl ** check for OpenGL/GLUT/GLX include paths and libraries -if test $GhcLibsWithHOpenGL = YES ; then +if test $GhcLibsWithOpenGL = YES ; then if test $UseQuartzOpenGL = YES ; then dnl Take a shortcut for Mac OS X native OpenGL: dnl It's in a non-standard location, but it's always there @@ -1350,25 +1364,15 @@ dnl -------------------------------------------------- dnl * test for GTK+ dnl -------------------------------------------------- -AC_PATH_PROGS(GTK_CONFIG, gtk-config gtk12-config) -if test "$GTK_CONFIG" != ""; then - AC_CACHE_CHECK([for version of GTK+], fptools_cv_gtk_version, [ - fptools_cv_gtk_version=`$GTK_CONFIG --version` - ]) - GTK_VERSION=$fptools_cv_gtk_version -else - GTK_VERSION= +AC_PATH_PROGS([GTK_CONFIG], [gtk-config gtk12-config]) +if test -n "$GTK_CONFIG"; then + AC_CACHE_CHECK([for version of GTK+], [fp_cv_gtk_version], + [fp_cv_gtk_version=`$GTK_CONFIG --version`]) + FP_COMPARE_VERSIONS([$fp_cv_gtk_version], [-lt], [1.2], + [AC_MSG_WARN([GTK+ not usable, need at least version 1.2]) + GTK_CONFIG=]) fi - -case $fptools_cv_gtk_version in - 1.[[23]].*) ;; - *) AC_MSG_WARN([GTK+ not usable; need at least version 1.2]) - GTK_CONFIG= - ;; -esac - -AC_SUBST(GTK_CONFIG) -AC_SUBST(GTK_VERSION) +AC_SUBST([GTK_CONFIG]) dnl -------------------------------------------------- dnl * Miscellaneous feature tests @@ -1400,6 +1404,8 @@ esac AC_SUBST(LdCmd) FPTOOLS_LD_X +FP_EMPTY_STRUCTS + AC_MSG_CHECKING([for SIGPOLL]) AC_EGREP_CPP(we_have_sigpoll, [#include