[project @ 2002-06-09 13:44:30 by matthewc]
[ghc-hetmet.git] / aclocal.m4
index 0fc26a8..a75df17 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: aclocal.m4,v 1.101 2002/05/17 09:03:13 simonmar Exp $
+dnl $Id: aclocal.m4,v 1.103 2002/05/31 21:12:28 sof Exp $
 dnl 
 dnl Extra autoconf macros for the Glasgow fptools
 dnl
@@ -220,24 +220,6 @@ if test -d $srcdir/ghc -a ! -f $srcdir/ghc/compiler/parser/Parser.hs; then
 fi
 HappyVersion=$fptools_cv_happy_version;
 AC_SUBST(HappyVersion)
-
-# 1.9 and later is required, assume that we can use the
-# "-agc" options. NOTE: The Master of Happy-ness says:
-# "Don't use -s! (yet)"
-
-HappyOpts="-agc"
-
-# Soon version 1.13 will be required.  To give people a chance to
-# switch over (and me a chance to actually release 1.13 :-) , we have
-# a dummy copy of GlaExts in fptools/libraries/base. 
-#
-# If 1.13 actually is installed, we turn on the --old-ghc option for
-# the time being.
-
-FPTOOLS_PROG_CHECK_VERSION([$fptools_cv_happy_version],-ge,[1.13],
-  [HappyOpts="--old-ghc -ac"])
-
-AC_SUBST(HappyOpts)
 ])
 
 dnl
@@ -1272,3 +1254,32 @@ else
   $2="";
 fi;
 ])
+
+dnl
+dnl Check to see whether 'struct msghdr' contains msg_control
+dnl 
+AC_DEFUN(FPTOOLS_MSGHDR_MSG_CONTROL,
+[AC_CACHE_CHECK([for msg_control in struct msghdr], fptools_cv_struct_msghdr_msg_control,
+[AC_TRY_COMPILE([#include <sys/uio.h>
+#include <sys/socket.h>], [struct msghdr m; m.msg_control;],
+fptools_cv_struct_msghdr_msg_control=yes, fptools_cv_struct_msghdr_msg_control=no)])
+if test $fptools_cv_struct_msghdr_msg_control = yes; then
+  AC_DEFINE(HAVE_MSGHDR_MSG_CONTROL)
+fi
+AC_SUBST(HAVE_MSGHDR_MSG_CONTROL)dnl
+])
+
+dnl
+dnl Check to see whether 'struct msghdr' contains msg_accrights
+dnl 
+AC_DEFUN(FPTOOLS_MSGHDR_MSG_ACCRIGHTS,
+[AC_CACHE_CHECK([for msg_accrights in struct msghdr], fptools_cv_struct_msghdr_msg_accrights,
+[AC_TRY_COMPILE([#include <sys/uio.h>
+#include <sys/socket.h>], [struct msghdr m; m.msg_accrights;],
+fptools_cv_struct_msghdr_msg_accrights=yes, fptools_cv_struct_msghdr_msg_accrights=no)])
+if test $fptools_cv_struct_msghdr_msg_accrights = yes; then
+  AC_DEFINE(HAVE_MSGHDR_MSG_ACCRIGHTS)
+fi
+AC_SUBST(HAVE_MSGHDR_MSG_ACCRIGHTS)dnl
+])
+