[project @ 2002-07-16 14:56:08 by simonmar]
[ghc-hetmet.git] / configure.in
index 0ee6db0..cb16922 100644 (file)
@@ -233,6 +233,15 @@ i[[3456]]86-next-nextstep3)
         HostVendor_CPP='next'
         HostOS_CPP='nextstep3'
         ;;
+m68k-*-openbsd*)
+       HostPlatform=m68k-unknown-openbsd
+       TargetPlatform=m68k-unknown-openbsd
+       BuildPlatform=m68k-unknown-openbsd
+        HostPlatform_CPP='m68k_unknown_openbsd'
+        HostArch_CPP='m68k'
+        HostVendor_CPP='unknown'
+        HostOS_CPP='openbsd'
+        ;;
 m68k-sun-sunos4*)
        HostPlatform=m68k-sun-sunos4
        TargetPlatform=m68k-sun-sunos4 #hack
@@ -623,7 +632,7 @@ AC_PATH_PROGS(CompressCmd,gzip compress,gzip)
 dnl ** check for jade/openjade & determine a working catalog
 AC_PATH_PROGS(JadeCmd,openjade jade,jade)
 FPTOOLS_DOCBOOK_CATALOG(Catalog, $JadeCmd, docs/fptools-both.dsl, 
-                        /etc/sgml/catalog /etc/sgml.catalog /usr/share/sgml/CATALOG.docbkdsl glafp-utils/docbook/CATALOG*)
+                        /etc/sgml/catalog /etc/sgml.catalog /usr/share/sgml/CATALOG.docbkdsl /usr/local/share/sgml/catalog glafp-utils/docbook/CATALOG*)
 if test -z "$Catalog"; then
   AC_MSG_RESULT([Warning: You will not be able to build the documentation.])
 fi
@@ -734,6 +743,10 @@ AC_STRUCT_ST_BLKSIZE
 dnl ** do we have long longs?
 FPTOOLS_C_LONG_LONG
 
+dnl ** check what fields struct msghdr contains
+FPTOOLS_MSGHDR_MSG_ACCRIGHTS
+FPTOOLS_MSGHDR_MSG_CONTROL
+
 dnl ** what are the sizes of various types
 dnl    (these must come before GHC_CHECK_ALIGNMENT)
 AC_CHECK_SIZEOF(char,               1)
@@ -912,6 +925,14 @@ AC_CHECK_LIB(gmp,  __gmpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp,
 AC_SUBST(HaveLibGmp)
 AC_SUBST(LibGmp)
 
+dnl ** check for mingwex library
+AC_CHECK_LIB(mingwex, closedir, HaveLibMingwEx=YES, HaveLibMingwEx=NO)
+AC_SUBST(HaveLibMingwEx)
+
+if test $HaveLibMingwEx = YES ; then
+  AC_DEFINE(HAVE_MINGWEX)
+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).])
@@ -1004,7 +1025,7 @@ AC_EGREP_CPP(yes,
   ])    
 AC_SUBST(HaveRtldNext)
 
-dnl ** RTLD_LOCAL isn't available on cygwin
+dnl ** RTLD_LOCAL isn't available on cygwin or openbsd
 AC_MSG_CHECKING(for RTLD_LOCAL from dlfcn.h)
 AC_EGREP_CPP(yes,
 [
@@ -1022,6 +1043,42 @@ AC_EGREP_CPP(yes,
   ])    
 AC_SUBST(HaveRtldLocal)
 
+dnl ** RTLD_GLOBAL isn't available on openbsd
+AC_MSG_CHECKING(for RTLD_GLOBAL from dlfcn.h)
+AC_EGREP_CPP(yes,
+[
+ #include <dlfcn.h>
+ #ifdef RTLD_GLOBAL
+        yes
+ #endif
+], [
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_RTLDGLOBAL)
+  HaveRtldGlobal=YES
+], [
+  AC_MSG_RESULT(no)
+  HaveRtldGlobal=NO
+  ])    
+AC_SUBST(HaveRtldGlobal)
+
+dnl ** RTLD_NOW isn't available on openbsd
+AC_MSG_CHECKING(for RTLD_NOW from dlfcn.h)
+AC_EGREP_CPP(yes,
+[
+ #include <dlfcn.h>
+ #ifdef RTLD_NOW
+        yes
+ #endif
+], [
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_RTLDNOW)
+  HaveRtldNow=YES
+], [
+  AC_MSG_RESULT(no)
+  HaveRtldNow=NO
+  ])    
+AC_SUBST(HaveRtldNow)
+
 FPTOOLS_CHECK_LIB_NOWARN(m, atan)
 
 dnl --------------------------------------------------