[project @ 2004-12-16 10:36:57 by simonmar]
[ghc-hetmet.git] / configure.ac
index 5d1023d..e2d7536 100644 (file)
@@ -578,17 +578,15 @@ dnl use either is considered a Feature.
 dnl ** What command to use to compile compiler sources ?
 dnl --------------------------------------------------------------
 
-AC_ARG_WITH(ghc,
+AC_ARG_WITH([ghc],
 [AC_HELP_STRING([--with-ghc=ARG],
-       [Use ARG as the path to GHC  [default=autodetect]])],
-[ WithGhc="$withval" ],
-[ 
-  if test "$GHC" = ""; then
-    AC_PATH_PROG(GHC,ghc)
+  [Use ARG as the path to GHC  [default=autodetect]])],
+  [WithGhc="$withval"],
+  [if test "$GHC" = ""; then
+    AC_PATH_PROG([GHC], [ghc])
   fi
-  WithGhc=$GHC
-])
-AC_SUBST(WithGhc)
+  WithGhc="$GHC"])
+AC_SUBST([WithGhc])
 
 AC_ARG_WITH(hc,
 [AC_HELP_STRING([--with-hc=ARG],
@@ -624,7 +622,9 @@ AC_ARG_WITH(gcc,
          withval=`cygpath -w ${withval} | sed -e 's@\\\\@/@g' `
        fi
  fi;
- CC="$withval"],
+ CC="$withval"
+ export CC
+ ],
 [WhatGccIsCalled="gcc"]
 )
 AC_SUBST(WhatGccIsCalled)
@@ -736,21 +736,6 @@ AC_ARG_ENABLE(objectio,
 )
 AC_SUBST(GhcLibsWithObjectIO)
 
-dnl ** Enable the building of the OpenAL binding?
-dnl --------------------------------------------------------------
-AC_ARG_ENABLE([openal],
-  AC_HELP_STRING([--enable-openal],
-                 [Build OpenAL binding [[default=autodetect]]]),
-  [ if test x"$enableval" = x"yes"; then
-       GhcLibsWithOpenAL=YES
-    else
-       GhcLibsWithOpenAL=NO
-    fi
-  ],
-  [GhcLibsWithOpenAL=YES])
-
-AC_SUBST([GhcLibsWithOpenAL])
-
 dnl ** .NET interop support?
 dnl --------------------------------------------------------------
 AC_ARG_ENABLE(dotnet,
@@ -819,9 +804,8 @@ dnl ** look for GCC and find out which version
 dnl     Figure out which C compiler to use.  Gcc is preferred.
 dnl     If gcc, make sure it's at least 2.1
 dnl
-AC_PROG_CC
-FPTOOLS_HAVE_GCC
-FPTOOLS_GCC_NEEDS_NO_OMIT_LFPTR
+FP_HAVE_GCC
+FP_MINGW_GCC
 
 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
 AC_PROG_CPP
@@ -964,33 +948,6 @@ else
 fi
 AC_SUBST(GhcLibsWithReadline)
 
-dnl ** check for OpenGL/GLUT include paths and libraries
-FP_CHECK_GLUT
-
-if test x"$no_GLU" = xyes; then
-  GhcLibsWithOpenGL=NO
-else
-  GhcLibsWithOpenGL=YES
-fi
-AC_SUBST([GhcLibsWithOpenGL])
-
-if test x"$no_GLUT" = xyes; then
-  GhcLibsWithGLUT=NO
-else
-  GhcLibsWithGLUT=YES
-fi
-AC_SUBST([GhcLibsWithGLUT])
-
-dnl ** check for OpenGL include files
-fp_save_cppflags="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-if test x"$use_quartz_opengl" = xyes; 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 <time.h> and <sys/time.h>
 AC_HEADER_TIME
 
@@ -1046,24 +1003,6 @@ fi
 FP_CHECK_ALIGNMENT(unsigned short)
 FP_CHECK_ALIGNMENT(void *)
 
-dnl ** Map OpenGL data types to Haskell types
-if test $GhcLibsWithOpenGL = YES ; then
-FPTOOLS_CHECK_HTYPE(GLboolean)
-FPTOOLS_CHECK_HTYPE(GLbyte)
-FPTOOLS_CHECK_HTYPE(GLubyte)
-FPTOOLS_CHECK_HTYPE(GLshort)
-FPTOOLS_CHECK_HTYPE(GLushort)
-FPTOOLS_CHECK_HTYPE(GLint)
-FPTOOLS_CHECK_HTYPE(GLuint)
-FPTOOLS_CHECK_HTYPE(GLsizei)
-FPTOOLS_CHECK_HTYPE(GLenum)
-FPTOOLS_CHECK_HTYPE(GLbitfield)
-FPTOOLS_CHECK_HTYPE(GLfloat)
-FPTOOLS_CHECK_HTYPE(GLclampf)
-FPTOOLS_CHECK_HTYPE(GLdouble)
-FPTOOLS_CHECK_HTYPE(GLclampd)
-fi
-
 FP_CHECK_FUNC([WinExec],
   [@%:@include <windows.h>], [WinExec("",0)])
 
@@ -1179,16 +1118,6 @@ dnl ** check for math library
 AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"], [LIBM=])
 AC_SUBST([LIBM])
 
-dnl ** check for X Window System
-AC_PATH_XTRA()
-
-if test "$no_x" = yes; then
-  GhcLibsWithX11=NO
-else
-  GhcLibsWithX11=YES
-fi
-AC_SUBST([GhcLibsWithX11])
-
 dnl ################################################################
 dnl Check for libraries
 dnl ################################################################
@@ -1294,20 +1223,6 @@ else
 fi
 
 dnl --------------------------------------------------
-dnl * test for GTK+
-dnl --------------------------------------------------
-
-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
-AC_SUBST([GTK_CONFIG])
-
-dnl --------------------------------------------------
 dnl * Miscellaneous feature tests
 dnl --------------------------------------------------